Very large json files cause the json parser to break

0 votes
asked Aug 19, 2021 in Bug by corbym (140 points)
When trying the json parser with very large json files, it appears to break horribly.

I cannot give an example, as it will break, and the data is fairly sensitive. But the JSON file is 19733 lines long and not very deep (not too many sub nodes)...

1 Answer

0 votes
answered Aug 19, 2021 by The-Lu (64,760 points)
commented Aug 19, 2021 by corbym (140 points)
edited Aug 19, 2021 by corbym
Hi

This isn't about line numbers, it's about the JSON SVG generator exploding if the size of the JSON file is too big.

In the latest java version it fails with "stack overflow" (eventually).

I'm not sure what the expected behaviour should be, but I wouldn't expect a stack overflow. Perhaps there's a recursive call going on which is keeping references on the stack, I would only expect a stack overflow if the JSON node depth was large (which in my case it isn't)  rather than the overall size of the json

Cheers
...