DEV Community

Discussion on: YAML vs. XML vs. JSON for Configuration

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

I have to disagree about quotes (standard should always be double quotes, and if single quote only for chars), and there is problem about Yes, No, true, false, date-time.

It is just some JSON over-done.

Otherwise, you are right about circular reference.

Collapse
 
ahferroin7 profile image
Austin S. Hemmelgarn

I'll agree on the point about handling of booleans, it gets a bit tricky at times in YAML, especially since some tools that use YAML accept other things for booleans (for example, lots of stuff accpets on and off as booleans in it's configuration when using YAML).

As far as quotes though, I would argue that it's actually better even for those who are pedantic about quoting that YAML doesn't care. Yes, you might run into existing YAM that quotes things differently than you expect, but OTOH you can use whichever quoting (including none at all in many cases) you prefer and it just works (provided it's not crazy stuff like Lua's multiline string format or Python's triple quotes). If you want to use double quotes for everything, nothing is preventing you from doing that, but for those of us who don't want to have to hit shift dozens of extra times, it's still accommodating.