this post was submitted on 06 Sep 2024
61 points (73.6% liked)
Programming
17352 readers
358 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 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I don’t like YAML because it’s overly complicated. The specification is like 80 pages long. How the hell did they think that was a good idea?
JSON on the other hand is super simple. It doesn’t do more than it needs to.
Just compare this: https://yaml.org/spec/1.2.2/
With this: https://www.json.org/json-en.html
The entire JSON specification is shorter than just the table of contents of the YAML specification!
Another thing I like about JSON is that you can format it however you want with the whitespace. Want everything on one line? Just write everything on one line!
If data can be represented as a JSON, then there’s generally only one way to represent it in JSON (apart from whitespace). In YAML the same data can be represented in 1000s of different ways. You pick one.
I will never forgive JSON for not allowing commas after the last element in a list.
That lack of trailing comma has been the bane of my existence.
This is the major reason for me. I really liked yaml, because it is way more readable to me than JSON. But then I kept finding new and more confusing yaml features and have realized how over-engineered it is.
Yaml would be great language if it had its features prunned heavy.