3 ms·
TOML is good. CSON is neat, but it never caught on (https://github.com/bevry/cson https://github.com/bevry/cson). There's a very specific, very common, use cas
by wmil 6y ago
TOML is good. CSON is neat, but it never caught on (https://github.com/bevry/cson https://github.com/bevry/cson).
There's a very specific, very common, use case that the people who write most markup parsers refuse to support...
A good config file format needs to:
- be human readable
- be machine modifiable while preserving comments and whitespace
- be unable to run code
- be unable to call a constructor on an object without being whitelisted
- whizzter 6y agoIt's really sad CSON didn't catch on. We have a JSON swagger spec at work and balacing braces,etc is just painful. So for a new project I tried writing a spec in YAML instead and the indentation rules felt quite shaky for me as a beginner (ie i wasn't entirely sure where things ended up with all the modes) so it was a lot of trial-and-error for someone unfamiliar with YAML as me (and it explains why I've kinda stayed away from it because writing it was as hard as reading it sometimes). CSON seems to have a sweet-spot between them with less clutter than JSON but more straightforward block rules than YAML.