4 ms·
Please don't do things like this. It only encourages people to be lazy about producing conforming documents, and different parsers that try to compensate for sy
by peterkelly 10y ago
Please don't do things like this. It only encourages people to be lazy about producing conforming documents, and different parsers that try to compensate for syntax errors are going to do so in different ways. We learnt this the hard way with HTML.
- mwkaufma 10y agoExactly. When you design for sloppy inputs, you're vulnerable to malicious inputs.
- ludamad 10y agoI'm not quite seeing who you think would be encouraged here. Bad JSON output is usually created in a rush by someone who didn't test their output. It's unlikely that someone who does test their JSON output would become lazy because a few lenient parsers exist.
- hueving 10y agoOnce there are parsers accepting bad input, people will inevitably test with those parsers and assume their output is okay.