这不是一个重复的问题 请不要将其标记为重复。 这个Json可以用GSON库解析吗?
{"keyobject": {"keyarray": ["key1", "key2", "key3"]},
"valueobject": [{"valuearray": ["arr1_val1", "arr1_val2","arr1_val3"]},
{"valuearray": ["arr2_val1", "arr2_val2","arr2_val3"]}]}
答案 0 :(得分:1)
这个怎么样?
class Outer {
KeyObject keyobject;
List<ValueObject> valueobject;
}
class KeyObject {
List<String> keyarray;
}
class ValueObject {
List<String> valuearray;
}
Outer outer = gson.fromJson(json, Outer.class);