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

0

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);
Posted by: Guest on April-26-2021

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

Code answers related to "Javascript"

Browse Popular Code Answers by Language