4 ms·
An often-heard benefit for using YAML is that JSON does not have comment. What I don't understand is why we would switch to a whole new language. Just add a fil
by hintymad 3y ago
An often-heard benefit for using YAML is that JSON does not have comment. What I don't understand is why we would switch to a whole new language. Just add a filter before loading the configuration, which can't be harder than switching to YAML, right?
Another reason for YAML is that it is easier to read. That I don't understand either. The endless pain of dealing with configuration does seem come from saving a few seconds of parsing off braces and brackets, but from not being about easily figure out what goes wrong, especially when what's wrong is a missing space or tab embedded in hundreds of lines of configurations.
- p10_user 3y agoJust make another named list key called "comment". Problem solved.
- int_19h 3y agoThis is not always an option when JSON is propagated as is, nor does it allow for comments on specific object properties.
- int_19h 3y agohttps://json5.org/ https://json5.org/
- m463 3y agoI like json a lot. That said, I think json would benefit from only two things: 1) comments 2) allow extra commas, like ["a", "b", "c",] or {"a":"b", "c":"d", } or more properly: { "a":"b", "c":"d", }, EDIT: and json5 does both, plus a few more niceties. (hmm. too much?)
- mekster 3y agoNot sure why people just don't settle with TOML.
- xdennis 3y agoIt has atrocious arrays. Example: https://youtu.be/n9mGk8_tQtM?t=367 https://youtu.be/n9mGk8_tQtM?t=367