由网友(羁绊)分享简介:我有一个小问题解析JSON在我的Android应用程序。I've got a little problem with parsing json into my android app.这是我的JSON文件是这样的:This is how my json file looks like:{"internal...
我有一个小问题解析JSON在我的Android应用程序。
I've got a little problem with parsing json into my android app.
这是我的JSON文件是这样的:
This is how my json file looks like:
{
"internalName": "jerry91",
"dataVersion": 0,
"name": "Domin91",
"profileIconId": 578,
"revisionId": 0,
}
正如你可以看到这个结构是一个有点怪异。我不知道怎么读我的应用程序的数据。当我发现这些都是对象不是数组:/
As You can see this structure is a little bit weird. I dont know how to read that data in my app. As I noticed those are all Objects not arrays :/
推荐答案
我会用电子书籍gson.
I would recomment using gson.
下面是一些链接教程:
如何从将Java objecto JSON格式使用GSON 使用GSON 解析JSON文件 简单GSON例如 JSON转换为Java how to convert java objecto from json format using GSON Parse JSON file using GSON Simple GSON example Converting JSON to Java这是替代以GSON你可以使用 杰克逊
An alternative to gson you could use Jackson
杰克逊在5分钟内 如何将Java对象转换为从JSON Jackson in 5 minutes how to convert java object to and from json该库基本分析你的JSON到您指定的Java类。
This Libraries basically parse your JSON to a Java class you specified.
相关推荐
最新文章