I absolutely hate YAML. I thought it was only going to be like that only when I started using it, that it would get better with time, but it really hasn't.
My personal opinion:
isn't more readable than JSON
editor support is an abomination (VS Code and IntelliJ), it never gets the indentation right
extremely beginner unfriendly, I bet no one who is looking at YAML for the first won't be sure what is the syntax for what
a looot of stuff is valid YAML and there are many ways to write the same things (arrays, I'm looking at you), which again, leads to confusion
the YAML spec is HUGE and it contains the whole JSON spec inside of it, which again, just leads to confusion
I agree with you in the points you dislike. They are definitely an issue. However, it is more readable than JSON for non-developers. And sometimes that is more important.
As far as I've noticed, JSON is used in places where the data transfer takes place , and the data is parsed, and the user doesn't manually deal with it. YAML files are used when user deals with providing inputs or configuration.
See the main advantage of YAML is readability. So the user is less prone to errors like missing a comma or missing a curly bracket. 🙂
JSON is used for anything API related. Any payload of data transferred between servers, clients, or any other API is very likely to be JSON, unless its XML YAML is generally used for configuration purposes, although JSON is quite popular for that purpose too.
I absolutely hate YAML. I thought it was only going to be like that only when I started using it, that it would get better with time, but it really hasn't.
My personal opinion:
I agree with you in the points you dislike. They are definitely an issue.
However, it is more readable than JSON for non-developers. And sometimes that is more important.
Yes Nico. You just give them a template and they will easily fill it in, in case of YAML.
Thanks for sharing your perspective Sebastijan. 🙂
Me too.
I find it's indentation poor. Curly braces are works for me. I can easily follow the nesting 💯
Which do you think is more used in the Industry? YAML vs JSON
As far as I've noticed, JSON is used in places where the data transfer takes place , and the data is parsed, and the user doesn't manually deal with it.
YAML files are used when user deals with providing inputs or configuration.
See the main advantage of YAML is readability. So the user is less prone to errors like missing a comma or missing a curly bracket. 🙂
JSON is used for anything API related. Any payload of data transferred between servers, clients, or any other API is very likely to be JSON, unless its XML
YAML is generally used for configuration purposes, although JSON is quite popular for that purpose too.
Yes, that's on point. Thanks 🙂
JSON. But for DevOps you will need yaml
Excellent explanation of how YAML is used! Your example makes everything very clear.
Thanks
Thanks a lot Bruce! This motivates me to write more... 🙂
I don't think it's readable than JSON.
I find it hard to follow. Due to lack of curly braces. I dislike indentation poor when nesting.