I'm parsing this JSON on android -
{
"data": {
"is_silhouette": false,
"url": "https://scontent.xx.fbcdn.net/hphotos-xat1/v/t1.0-9/s180x540/34325347_936407749733967_1354847545689012266_n.jpg?oh=dde033205b1230568dc26b7b01cy5424&oe=56599FD6"
}
}
I have this code -
json = response.getJSONObject();
Log.d("json data",json.toString());
try {
jarray = json.getJSONArray("data");
} catch (JSONException e) {
e.printStackTrace();
}
that gives this error - data of type org.json.JSONObject cannot be converted to JSONArray
Can anyone tell what wrong is there ? Any pointer is appreciated.