I am getting an exception while working with JSON library to get data on an android application. It says JSONObject cannot be converted to JSONarray -
this android (java) code, trying fetch data using json library (volley). private void makejsonarrayrequest() { jsonarrayrequest req = new jsonarrayrequest(urljsonarry, new response.listener<jsonarray>() { @override public void onresponse(jsonarray response) { log.d(tag, response.tostring()); try { // parsing json array response // loop through each json object jsonresponse = ""; (int = 0; < response.length(); i++) { jsonobject person = (jsonobject) response.get(i); string name = person.getstring("id"); string email = person.getstring("title"); jsonresponse += "name: " + name + "\n\n"; ...