Monday, 19 August 2013

Value at poiComment of type org.json.JSONObject cannot be converted to JSONArray

Value at poiComment of type org.json.JSONObject cannot be converted to
JSONArray

Good Morning people, my head is going to explode cause of this error
Value {...} at poiComment of type org.json.JSONObject cannot be converted
to JSONArray
this is the json file:
{
"poiComment": [
{
"id": "1",
"poiComment": "I'm at The Pine. http://4sq.com/a1UXvc"
},
{
"id": "2",
"poiComment": "bday dinner w. my bff <3 (@ The Pine)
http://4sq.com/a1UXvc"
},
{
"id": "3",
"poiComment": "I'm at The Pine. http://4sq.com/a1UXvc"
}
]
}
and i use this way (last time i used a jsonobject it worked):
JSONObject jso1 = new JSONObject(response1);
JSONArray jArray1 = jso1.getJSONArray("poiComment");
How is it possible??
Thanks in advance for help

No comments:

Post a Comment