I am having an escaped string in a variable and I am trying to make JSON object out of the string. It's throwing the Exception which looks like this :
org.json.JSONException: Missing value at character 1
After thorough research, I couldn't find an answer in a stack overflow.
If the string is escaped you need to unescape it before trying to make JSONObject out of it. Below is the sample snippet.
String escapedString = StringEscapeUtils.unescapeJava(escapedString);
JSONObject Json = new JSONObject(escapedString);
I open to hear any other best solutions other than what I mentioned here.