3 ms·
Because humans make stupid accidental mistakes. YAML says there's a world of difference between - flag1 - option2 and -flag1 -option2 but f
by fragmede 9y ago
Because humans make stupid accidental mistakes.
YAML says there's a world of difference between
- flag1
- option2
and
-flag1
-option2
but for a human who just wants their thing to work, that's inscrutable, but in JSON, they become
[
"flag1",
"config2"
]
and
"-flag1 -config2"
respectively.
Personally, live python as config is my preference, followed by YAML because comments, but YAML isn't perfect.
If the options are right next to each other it's clear there's a misalignment:
- option1
-option2
won't work, but
- option1
# if there is a huge explanatory
# multi-line comment
# as is sometimes seen in config
# files, sometimes it can be hard
# to see the misalignment.
- option2