3 ms·
I think I would genuinely be pretty happy with a well-supported extension of the JSON spec that allows comments. Even if it required an explicit start and end o
by TheSwordsman 6y ago
I think I would genuinely be pretty happy with a well-supported extension of the JSON spec that allows comments. Even if it required an explicit start and end of the comment (/* ... */). I also can't say I want or need anchors/references from YAML, so I think that helps me be quite OK with using JSON.
I appreciate the challenges of writing JSON, but also think it can be easier to spot issues if you have an editor that's doing magic indentation based on the JSON. Give me comments to help the humans, and I'm sold.
- davidpires 6y agoIf you are using JavaScript you can use jsonc [0] it's exactly that just JSON with comments. VSCode and typescript config files already use it by default https://github.com/microsoft/node-jsonc-parser https://github.com/microsoft/node-jsonc-parser
- lioeters 6y agoI like Human JSON: https://hjson.github.io/ https://hjson.github.io/ It has comments and accepts trailing commas.