String JSON = \"http://www.json-generator.com/j/cglqaRcMSW?indent=4\"; JSONObject jsonObject = new JSONObject(JSON); JSONObject getSth = jsonObject.getJSONObject(\"
I had similar issue due to a small mistake, when i was trying to convert a List to json. If a List is converted to json it will return JSONArray not JSONObject.