3 ms·
JSON parsing is already a minefield. Please see [0], specifically this chart [1]. As mentioned in a sibling comment, I think a new mimetype makes a lot more se
by dmitryminkovsky 6y ago
JSON parsing is already a minefield. Please see [0], specifically this chart [1]. As mentioned in a sibling comment, I think a new mimetype makes a lot more sense sense than stirring this pot further.
[0] http://seriot.ch/parsing_json.php http://seriot.ch/parsing_json.php
[1] http://seriot.ch/json/pruned_results.png http://seriot.ch/json/pruned_results.png
- zeroimpl 6y agoIt is a minefield, but we all walk it all the time. A new mime type doesn’t really help because the parser doesn’t check the mime type, it assumes the programmer did that. I’m not against making a new mime type or specification, but there are already so many and making more doesn’t seem to help. Yes it would be nice if PHP and Python implement the logic for ignoring trailing commas the same way, but 99% of the time that isn’t all that important. Yes there will be cases where it matters and bugs are introduced, but since there already significant differences between JSON parsers I don’t see these kinds of things as making it much worse.