我有如下的 j-son 响应,
{
"client_id": "1",
"template_id": "4",
"scrolling_text": "scrolling Text for android",
"bottom": "scrolling Text for android",
"Left": [
"http://www.qwerty.com/iDigitalSign/img/files/20130925043454Chrysanthemum.jpg",
"http://www.qwerty.com/iDigitalSign/img/files/RightTulips.jpg"
],
"Right": [
"http://www.qwerty.com/iDigitalSign/img/files/BottomKit_Kat_Dancing_Kids_TV_Commercial_-_YouTube.3gp"
]
}
我的解析
InputStream in = response.getEntity().getContent();
Json_response json_res_class = new Json_response();
String a = json_res_class.convertStreamToString(in);
try {
jsonarray = new JSONArray("[" + a + "]");
json = jsonarray.getJSONObject(0);
String client_id = json.getString("client_id");
String template_id = json.getString("template_id");
scrolling_text = json.getString("scrolling_text");
String bottom = json.getString("bottom");
Left = json.getString("Left");
videoPath = json.getString("Right");
} catch (Exception e) {
e.printStackTrace();
}
我解析了所有的东西,但我想把左对象的值一个接一个地放在数组列表中。我不知道该怎么做,谁能知道帮我解决这个问题