this post was submitted on 03 Jan 2025
99 points (95.4% liked)
Programming
17752 readers
1043 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities [email protected]
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
If you're comparing YAML with JSON, it displays that you understand neither.
JSON is designed for data exchange between systems. YAML is designed to describe data for a single system, and is always subject to individual implementations.
They are not interchangeable concepts.
all json is valid yaml and can be parsed with a yaml parser. Yaml is literally a superset of json. In what world are they not comparable?
YAML 1.2 is a superset of JSON. Every valid JSON is valid YAML 1.2
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