4 ms·
JSON without comments is hell, forcing one to 1) convert JSON configuration to YAML. 2) add comments to YAML and admire it. 3) convert YAML to JSON for sendin
by gjvc 3y ago
JSON without comments is hell, forcing one to 1) convert JSON configuration to YAML. 2) add comments to YAML and admire it. 3) convert YAML to JSON for sending to the server.
- coldtea 3y agoYAML is an order of magnitude more hell...
- johnchristopher 3y agoBut TOML is worse, right ? I can't write nor read TOML to save my life... :(
- rascul 3y agoTOML is much simpler in general but it does have its warts. It's basically just key = "value" pairs in [sections] for the simple stuff.
- coldtea 3y agoI think it's saner, but still has some bizarre design choices
- TheFlyingFish 3y agoThis is just my personal opinion, but I think YAML is more intuitive but has a lot more footguns and gotchas, while TOML is more consistent but less obvious (ironically, given the name.) This may contribute to YAML's popularity in CI systems, because CI systems often need to be adjusted by someone who isn't super familiar with the syntax, and YAML is easier to intuit than TOML.
- sethammons 3y agoI literally cannot count the number of times significant whitespace has broken a yaml file I've edited followed by a completely useless error on line 1. I don't have this problem in python. I loath yaml.
- usrusr 3y agoFortunately it's only forcing one to convert to a JSON variant that does not forbid comments (starting as simple as wrapping the entire thing in console.log JSON.stringify). I'll happily leave the YAML authoring to YAML inventors, supposedly it makes them happy.
- dekobon 3y agoIt isn't documented, but if I recall correctly UNIT supports JSON with comments.