We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi... I am trying to read my JSON database, but I get this error: "A JSONObject text must begin with '{'
Apparently, I understand that my database starts with a '[' and I have tried to remove it concerning the dB into a text object, but then I can have the JSON structure...
Also, I can't edit my database, so I have to do it in Processing... Does anyone know how this can be fixed?
I checked some JAVA solutions in stackoverflow but there were not helpful.
I've started praying..... let's see...!
Answers
can you post the first 7 lines of the file?
maybe you have to add { } ...
This is the structure of my JSON:
[{"_id":"0", "message":"Blah", "score":1, "year":2016, "month":2, "day":24, "hour":12, "minute":30, "second":56}]
As I understand, I have to remove the square brackets for the JSONObject to read it properly. The question is how...?
Have you tried JSONArray instead? L-)
https://Processing.org/reference/JSONArray.html
Great, it helped, this is what I did: