News for hackers. Stuff that matters.
Re:Parsing JSON is a Minefield by jacobparker on Monday April 23, 2018 @08:27AM (#16902749)
> As the robustness principle goes [...]

"The Harmful Consequences of the Robustness Principle" https://tools.ietf.org/html/draft-thomson-postel-was-wrong-0...

Re:Parsing JSON is a Minefield by meuk on Saturday April 28, 2018 @08:05AM (#16947270)
I want to upvote this so many more times than I'm able to.

The principle is even more harmful, because it sounds so logical. If many JSON parser accept your JSON object which is not valid JSON, any new parser that doesn't accept it will be booed as a faulty parser.

If your input is not according to spec, throw an error. The sender is wrong. They deserve to know it and need to fix their output.

Re:Parsing JSON is a Minefield by craftyguy on Tuesday April 24, 2018 @10:36AM (#16912904)
The author advocates adding previously invalid extensions to the spec as they come up, as an alternate way to handle 'robustness'. How would this not rapidly lead to a bloated, buggy, unmaintainable spec?