3 ms·
Adding comments to json is the one breaking change the world needs. As a parser if you stumble over a comment it's your fault! nothing in the world could stop y
by singularity2001 4y ago
Adding comments to json is the one breaking change the world needs. As a parser if you stumble over a comment it's your fault! nothing in the world could stop you from just sanely ignoring comments.
- alpaca128 4y agoJSON5 exists and allows both comments and trailing commas. It's basically like defining objects in plain JavaScript syntax.
- jgalt212 4y agowhat's the difference between JSON5 and the config language that vs code uses ,JSON + comments (as best I can tell).
- nicoburns 4y agoJSON5 also allows extra things like single-quoting strings and multiline strings. VS Code uses JSONC which is strictly trailing commas and comments on top of JSON