Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

org.json.JSONException: Value null of type org.json.JSONObject$1 cannot be converted to JSONObject

String crappyPrefix = "null";

if(result.startsWith(crappyPrefix)){
    result = result.substring(crappyPrefix.length(), result.length());
}
JSONObject jo = new JSONObject(result);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Value #null #type #converted #JSONObject
ADD COMMENT
Topic
Name
9+2 =