我正在尝试解析jsonArray
但无法理解这种格式,如何解析这种类型jsonArray
?
谁能帮我?
"rows": [
[
"/farmfresh",
"20171211",
"4"
],
[
"/farmfresh/product/d",
"20171215",
"4"
],
[
"/farmfresh/product/h",
"20171222",
"2"
]
]
Try this
try
{
JSONObject resObject = new JSONObject("your json response");
JSONArray jsonArray = resObject.getJSONArray("rows");
for (int i = 0; i < jsonArray.length(); i++) {
JSONArray jsonArray1 = jsonArray.getJSONArray(i);
for (int j = 0; j < jsonArray1.length(); j++) {
Log.i("Value","->" +jsonArray1.getString(j));
}
}
}
catch (JSONException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
OUTPUT
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)