Yup! YAML is defined as a “strict superset” of JSON (or at least, it was the last time I checked).
It’s a lot like markdown and HTML; when you want to write something deeply structured and somewhat complex you can always drop back/down to the format with explicit closing delimiters and it just works™.
If yaml didn’t have anchors and 8 different white space formats, it’d be a great replacement for this kind of thing.
But yaml is a mess, and you’d think you could parse it easily, but you can’t.
As someone who works with YAML regularly:
Fuck YAML.
As someone who runs Home Assistant:
Fuck YAML.
YAML is redeemed by one thing only:
All JSON is valid YAML.
No way. You’re telling me I can just write json instead?
Yup! YAML is defined as a “strict superset” of JSON (or at least, it was the last time I checked).
It’s a lot like markdown and HTML; when you want to write something deeply structured and somewhat complex you can always drop back/down to the format with explicit closing delimiters and it just works™.
I have a fundamental disdain for formats with restrictive white space definitions (I’m looking too at you Python)
I’ve never had this issue with Python, but makefile has given me plenty of whitespace issues.
Should have added if it cares about tabs vs spaces.
But my vertical tabs!
The author knew it was a bad idea
I want to like yaml, I really do, but why are there so many different ways of specifying the same thing?
Is there a reason? Norway!
import yaml:)I’m a fan of NestedText. It’s no panacea but I’d argue it’s the most well-considered and useful file format for structured data in plain text.
There just needs to be one universal standard that handles everyone’s use cases
No, for multiple standards that handle their usecase good.
https://xkcd.com/927/