陈斌彬的技术博客

Stay foolish,stay hungry

How to Debug “json Parsing Error: Value True at Error of Type java.lang.Boolean Cannot Be Converted to JSONObject”

Because the response you are getting it not properly formatted for Json conversion.

JSONObject obj = new JSONObject(response);

Its returning boolean which you are trying to convert into JSONObject.

Edit 1: It might also occur that there is problem while fetching boolean.

Try to fetch it like this:

jsonObject.optBoolean("error");

Resource Reference