We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have a very large json file I would like to load and analyse. I am using loadJSONArray() but it is pulling the following error:
Expected a ',' or '}'
If I load a trimmed version (only 1000 elements instead of 10000 elements) it is fine. I think my json is formatted fine, but I guess it could be an error in it, but I was wondering if it was possible there is a limit to the size of the file you can load? The larger file is 12MB and the smaller file 363KB.
If there is a limit, is there a handy way to load the data line by line? Or would it be possible to convert it to a txt file and load it line by line and get to the data I need (maybe using BufferedReader.readLine() and match())?
Thanks, really want to get to grips with this data!!!
David
Answers
OK I have finally found a json validator app that will handle a file of this size (the web based ones all crashed) and it looks like there were a couple errors in the file. Fixed those and Processing seems to handle it fine!
Out of curiosity, what application did you use?
I used JSON Validator https://itunes.apple.com/gb/app/json-validator/id457563999?mt=12
It could handle 10,000 lines (12MB) and 20,000 lines (approx 24MB) but crashed when I tried to paste in any more. Still much better than any web-based app I tried.