80,472
社区成员




{
"title":"555",
"type":"record",
"language":"zh-hans",
"uid":"1",
"status":"1",
"body":"数据",
"field_record_ftate":[{"value":{"date":"2010-01-27"}}],
"field_record_state":[{"value":{"date":"2010-01-27"}}]
}
public static void demo() {
String jsonstr = "{\"info\":[{\"name\":\"123\",\"xy\":111},{\"name\":\"123\",\"xy\":111},{\"name\":\"123\",\"xy\":111}]}";
JSONObject obj;
try {
obj = new JSONObject(jsonstr);
JSONArray array = obj.getJSONArray("info");
for (int i = 0; i < array.length(); i++) {
JSONObject item = (JSONObject) array.get(i);
System.out.println(item.getString("name") + "_________"
+ item.getString("xy"));
}
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}