Re:YAML: It's Time to Move On
by andybak on Sunday November 14, 2021 @04:32PM
(#29220934)
I was specifically thinking about asking clients to edit or write these files. Isn't that a fairly common use case for config languages?
[ Parent
| on HN ]
If programmers find getting YAML indentation correct difficult how are non-programmers going to fair?
If the HomeAssistant subreddit is anything to go by its their biggest complaint (HA configuration is in YAML).
With that said if they weren't complaining about white space they'd be complainit about missing semicolons, missing/extra commas, missig equals signs, missing closing )]} or whatever.
Are you arguing "braces are easier to get right than indentation" or is this a point specific to YAML's rules? Because I'm not defending the latter but I find it hard to understand I would need to argue against the former.
That's a good point someone brought up in a different comment. I haven't really dealt with those scenarios, so honestly I'll accept that as a reason.
I wish it could be displayed with braces though, I wonder if someone already has built that as an extension for editing / viewing yaml files.
Re:YAML: It's Time to Move On
by colejohnson66 on Sunday November 14, 2021 @04:50PM
(#29221067)
YAML is a superset of JSON. In other words: any syntactically valid JSON file is a valid YAML file. If you want braces like JSOM, but not quoted strings, YAML supports it.
> YAML is a superset of JSON.
That's false. http://p3rl.org/JSON::XS#JSON-and-YAML