3 ms·
Piling on to the general theme of the rest of the comments here: I really wish there was a more popular middle-ground between YAML and JSON. People use YAML be
by burke 10y ago
Piling on to the general theme of the rest of the comments here:
I really wish there was a more popular middle-ground between YAML and JSON. People use YAML because it's the next step up from JSON if you need comments, etc., but I think most purposes would be better served by the likes of JSON5, HJSON, or TOML (for example) if only any of those were as popular as JSON and YAML.
I implemented a YAML parser from spec last month. It (YAML) goes to great lengths to provide human-friendly features, trading off computer-friendliness to an fairly extreme extent.
Eliminating 'plain' scalars (unquoted strings-as-values), folded multiline literals, tags, anchors/aliases, and possibly directives, as a sort of reduced yaml would make the language a lot less silly for the kinds of things a lot of people end up using it for.
- crdoconnor 10y agoJSON5, HJSON and TOML are not as readable or editable as YAML. They may have a slight advantage over the default spec of YAML but they don't stack up well against YAML with the features you mentioned removed. I really don't think an entirely new standard is warranted.
- burke 10y agoRight. My hypothesis here is that, if there were, instead of JSON and YAML to choose from, three standards, one of which were something slightly less human-friendly but much simpler than YAML, I think it would be widely adopted. I think YAML is more widely-used than it would otherwise be, in a broader variety of domains, simply because the only popular alternative doesn't have comments. I'm not drawing from this any sort of conclusion that we should try to push one of these alternatives as viable, just lamenting the state of things.
- mst 10y agoingy and I already invented that. It's called JSONY.