String JSON = \"http://www.json-generator.com/j/cglqaRcMSW?indent=4\";
JSONObject jsonObject = new JSONObject(JSON);
JSONObject getSth = jsonObject.getJSONObject(\"
In my case the json file encoding was a problem
I was generating JSON file in vb .net with following: My.Computer.FileSystem.WriteAllText("newComponent.json", json.Trim, False)
And I tried all suggestions in this post but none helped.
Eventually in Notepad++ noticed that the file created was in UTF-8-BOM
Not sure how it picked up that encoding but after I switched the encoding to UTF-8, it resolved with no other changes.
Hope this helps someone.