This question has been asked earlier, but I am unable to figure out the error in my code from the responses to those questions.
I am trying to convert a java s
You are passing into the JSONObject constructor an instance of a StringBuilder class.
JSONObject
StringBuilder
This is using the JSONObject(Object) constructor, not the JSONObject(String) one.
JSONObject(Object)
JSONObject(String)
Your code should be:
JSONObject jsonObj = new JSONObject(jsonString.toString());