3 ms·
If JSON had comments, people would start putting data in comments (mostly annotations probably). What will be next? Allow apostrophes for strings? Add schemas s
by dvh 2y ago
If JSON had comments, people would start putting data in comments (mostly annotations probably). What will be next? Allow apostrophes for strings? Add schemas so that parsing JSON is getting blocked by firewall rules? No thanks.
- jimmaswell 2y agoPeople are already putting comments in JSON, it just goes in a "comment" field. So now resources are wasted processing it as a property instead of ignoring it.
- eadmund 2y agoBy putting it in a "comment" field the comment survives round-tripping, which is a virtue rather than a vice.
- pizza234 2y agoAlready explained in other comments. Devs can put whatever they want in the comments; (third party) parsers won't need to change anything, because they still treats those "special" comments as regular.