Reading JSON data that begins with [ and ends with ]
问题 I'm using Java with a plugin for NetBeans called CODAPPS to retrieve, parse, and display JSON data. I'm following an example that used JSON data produced by Google's Firebase database, but I'm using SlashDB instead. For some reason the JSON data from SlashDB begins and ends with [ and ] , respectively. I get the following error: org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1] at org.json.JSONTokener.syntaxError(JSONTokener.java:433) at org.json