As a data format, yaml is extremely complicated and it has many footguns. In this post I explain some of those pitfalls by means of an example, and I suggest a few simpler and safer yaml alternatives.
A 10 minute read covering some YAML edge-cases that you should have in mind when writing complex YAML files
They are both serialization formats that are supposed to be able to represent the same thing. Converting between these 2 formats is used in the article as a way to highlight yaml’s parsing quirks (since JSON only has a single way to represent the false boolean value, it makes it clear that the no value in yaml is interpreted as a boolean false and not as the "no" string)
Anyway, I disagree with your point about YAML and JSON not being interchangeable
They are both serialization formats that are supposed to be able to represent the same thing. Converting between these 2 formats is used in the article as a way to highlight yaml’s parsing quirks (since JSON only has a single way to represent the
false
boolean value, it makes it clear that theno
value in yaml is interpreted as a booleanfalse
and not as the"no"
string)Anyway, I disagree with your point about YAML and JSON not being interchangeable