我得到的JSON響應我要分析此如何解析JSON響應的JSON數組中的Android
[
{
"fbuid": "100000462110782"
},
{
"fullname": "Arun Pathania"
},
{
"fbuid": "100000257902867"
},
{
"fullname": "Shiju vargheae"
},
{
"fbuid": "100003337246078"
},
{
"fullname": "Smart Buzz"
}
]
我試過如下:
JSONArray jArray = new JSONArray(result);
for (int i=0; i < jArray.length(); i++) {
JSONObject oneObject = jArray.getJSONObject(i); // Pulling items from the array
u_id_json = oneObject.getString("fbuid");
u_name_json = oneObject.getString("fullname");
}
錯誤
error is coming is :--org.json.JSONException: No value for fullname –
請告訴我如何解析此android
很簡單,但你有什麼試過? – 2013-05-07 07:02:29
在stackoverflow上有數百個例子,你是否先嚐試搜索? – 2013-05-07 07:03:17
http://stackoverflow.com/questions/9605913/how-to-parse-json-in-android http://stackoverflow.com/questions/9715856/parsing-this-json – 2013-05-07 07:05:01