org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,

The json is invalid or you try to map to a different model.

Solutions on the web

via GitHub by edvardasast
, 1 year ago
A JSONObject text must begin with '{' at 1 [character 2 line 1]
via netbeans.org by Unknown author, 1 year ago
via netbeans.org by Unknown author, 1 year ago
via GitHub by shilad
, 8 months ago
A JSONObject text must begin with '{' at 1 [character 2 line 1]
via Stack Overflow by santafebound
, 7 months ago
A JSONObject text must begin with '{' at 1 [character 2 line 1]
via GitHub by saisubramaniam
, 6 months ago
A JSONObject text must begin with '{' at 1 [character 2 line 1]
org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
at org.json.JSONTokener.syntaxError(JSONTokener.java:451)
at org.json.JSONObject.(JSONObject.java:195)
at org.json.JSONObject.(JSONObject.java:319)
at org.parse4j.command.ParseResponse.getJsonObject(ParseResponse.java:83)
at org.parse4j.command.ParseResponse.getException(ParseResponse.java:71)
at org.parse4j.ParseQuery.find(ParseQuery.java:598)
at org.parse4j.ParseQuery.find(ParseQuery.java:469)
at org.parse4j.ParseQuery$FindInBackgroundThread.run(ParseQuery.java:618)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

88 times, 7 months ago
3 times, 10 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.