News for hackers. Stuff that matters.
Re:Bad JSON Parsers by skykooler on Friday November 08, 2019 @11:18AM (#21483644)
General limits for what? If you can segfault a program with 28kb of JSON, that's far below the maximum many APIs will return, so you'd need to do some sort of pre-parsing of the JSON to determine the nesting level before parsing it...
Re:Bad JSON Parsers by vbezhenar on Friday November 08, 2019 @11:20AM (#21483657)
For example Java won't segfault. It'll throw stackoverflow exception which will be caught and served with some standard error like HTTP 500. It shouldn't affect other queries.
Re:Bad JSON Parsers by tracker1 on Friday November 08, 2019 @12:46PM (#21484755)
Well, recursion tests would be more for input... I usually limit all POST data to 5-10k and don't like to go over that. I also tend to use chunked uploads, that are a little slower, but serve to limit the size and time of any inbound work.