Android : Can't extrack information from JSON File

on Tuesday, March 31, 2015


[Android] I have a JSON File that it is composed in this way:



"5":{
"15":{
...
},
"18":{
..
},
"7":{
...
},
"9":{
..
}
}
}


How I can extract the infomation at 15,18,7,9? this number 15, 18 ,7, 9 change from run to another.. My Code is:



JSONObject obj = new JSONObject(file);
JSONArray uno = obj.getJSONArray("5");


and I obtain JSONException!! Anyone can help me?


0 comments:

Post a Comment