5 ms·
And the required double quotes around strings. YAML’s string handling is a lot easier to deal with.
by JoBrad 7y ago
And the required double quotes around strings. YAML’s string handling is a lot easier to deal with.
- jtdev 7y agoIt’s also a lot less obvious. What’s so difficult about wrapping a string in double quotes?
- h1d 7y agoIt gets annoying when you have to do what seems unnecessary.
- Griffinsauce 7y agoIt's not really unnecessary when someone can write an entire article on how unfathomable the output is without them.
- acdha 7y agoIt’s easier until you hit one of the cases where a particular value is interpreted as a different type, possibly in a very confusing context. I’ve seen that bite enough people that I end up quoting strings to avoid confusion.
- heavenlyblue 7y agoIt’s also extremely hard to learn as a beginner. “Hey, I deleted a character in a string and now I am getting this weird schema validation exception”.
- acdha 7y agoOr “Why did it break when I changed the version from 3.7 to 3.7.1?”
- zzo38computer 7y agoI think it is good to require quotation marks for strings, at least for values (although I could live with it if quotation marks for strings are allowed even if not required, since then, if you do not like the feature of not having quotation marks for strings, you can just not use that feature). Maybe it would be sense if quotation marks were not required for keys with only a restricted character set which are not an empty string, though.
- JoBrad 7y agoNo quotes around keys would be sufficient, honestly. I use YAML a lot for API documentation, and there are still some cases where wrapping your values in quotes is necessary. But requiring it for keys becomes very annoying.