Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Exactly. I legit tried studying it and after half hour, I gave up on that piece of shit.
-
msdsk31801yI hate indentation sensitive markup I hate indentation sensitive markup I hate indentation sensitive markup I hate indentation sensitive markup I hate indentation sensitive markup I hate indentation sensitive markup
-
JSON is a subset of YAML.
But YAML just sucks.
Without an generator / im|exporter its errorprone to write... And the YAML spec has quite a few loopholes, so what works in one language might not work at all in another language.
Plus the funky quoting issues as (data-)types don't exist in YAML.
Any larger YAML file is just a nuclear fission bomb waiting to make your life as miserable as it can get. -
@kobenz
Yes. We're both right. The important nit bit is that its up to the parser to support it, but e.g. YQ explicitly supports it.
https://mikefarah.gitbook.io/yq/...
Some people love to debate whether JSON truly is a subset of YAML or not...
But imho thats just a waste of breath. ;) -
How to love yaml:
Don’t use it for data transfer and serialization.
Use it for configuration.
You are welcome. -
Protip: if you ever want to figure out where a subkey ends in a YAML file, you can set your cursor to the beginning of the key and tap the down arrow until there's something to the left of the cursor.
If you want to figure out where a subkey ends in a JSON file, you can set your cursor to the opening bracket and go to matching pair using your text editor's corresponding command. -
YAML is great if you don't know about 95% of the spec and stick to using the simple part
-
@kobenz Am I the only one finding that the relevant whitespace is the least of the problems that Python has?
YAML is a pile of shit.
rant