I have this JSON coming from one of our REST service:
[
\"{\\\"category_name\\\":[\\\"Industry Components\\\"],\\\"categoryId\\\":[1]}\",
\"{\\\"category
If you get JSONObject text must begin with '{' exception. Then first off all check what did u pass to the JSONObject constructor.
You should pass the right json.txt file.So make sure what are u passing to jsonobject.
String request = FileUtils.readFileToString(new File("/home/achaure/Downloads/Amol/KountRestTest/Documents/request.txt"));
JSONObject jsonObject = new JSONObject(request);