3 ms·
YAML and TOML wouldn't have been necessary if JSON had been slightly more expressive. If JSON had * comments * bareword (not double quoted) object key name
by quotemstr 6y ago
YAML and TOML wouldn't have been necessary if JSON had been slightly more expressive. If JSON had
* comments
* bareword (not double quoted) object key names
it'd be a much more suitable configuration file format for everything, and I don't think we'd see the motivation to make things like TOML and YAML.
- Anaminus 6y agoJSON5 pretty much addresses all the problems with JSON as a config format. I'd love for it to just replace JSON entirely. https://json5.org/ https://json5.org/
- quotemstr 6y agoGenerally looks good, but ugh, I dislike allowing single quotes. Allowing single quotes has close to zero ergonomic value but increases the number of ways to write the same fundamental thing. But that's a minor quibble. If everyone adopted this thing instead of legacy JSON, we'd be better-off.
- gridlockd 6y agoHaving two ways to quote is a useful feature, not just one way to do the same thing. Javascript already has this, so allowing single quotes simplifies copypasting object literals, which is a common use case.
- tornato7 6y agoThat looks really nice. I might start using it for configuration.
- ratbeard 6y agoYep. And trailing commas,
- fanf2 6y agoYAML and JSON are about the same age: YAML dates from 2001 and JSON 2001/2.