android解析复杂的json串,用的是Gson 50
Json过长放不下.....放了一个简单的例子{"a":"100","b":[{"b1":"b_value1","b2":"b_value2","b3":[{"d1":"...
Json过长放不下.....放了一个简单的例子
{
"a": "100",
"b": [
{
"b1": "b_value1",
"b2": "b_value2",
"b3": [
{
"d1": "value1",
"d2": "value2"
}
]
},
{
"b1": "b_value1",
"b2": "b_value2",
"b3": [
{
"d1": "value1",
"d2": "value2"
}
]
}
],
"c": {
"c1": "c_value1",
"c2": "c_value2"
}
}
解析不出来,到多层的数组那就报错
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 572 展开
{
"a": "100",
"b": [
{
"b1": "b_value1",
"b2": "b_value2",
"b3": [
{
"d1": "value1",
"d2": "value2"
}
]
},
{
"b1": "b_value1",
"b2": "b_value2",
"b3": [
{
"d1": "value1",
"d2": "value2"
}
]
}
],
"c": {
"c1": "c_value1",
"c2": "c_value2"
}
}
解析不出来,到多层的数组那就报错
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 572 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询