2 ms·
I have the same experience. I just think think it is possible to design easy-to-write indentation-sensitive formats but YAML is not. For example is always baffl
by kccqzy 8y ago
I have the same experience. I just think think it is possible to design easy-to-write indentation-sensitive formats but YAML is not. For example is always baffles me that
a:
- b
- c
has a list inside an object but the list is not further indented. There's in fact a hierarchy relationship but absolutely no indentation.
- Rapzid 8y agoYou can indent it though, but the hyphen already means a list item. That is a preferred syntax for many that are used to YAML though.
- kccqzy 8y agoThat's kind of my point. Indentation is optional, so many don't indent, making the resulting document harder to understand.
- emmelaich 8y agoFWIW, I think yaml / ansible linters and style checkers typically require indentation.
- XorNot 8y agoThe hyphen is associated with the a though. In what's posted, a is a list, not a map - the type of the parent is being declared by that hyphen.
- mikepurvis 8y agoThat's at your option, though. It's perfectly valid yaml to indent the list as many spaces as you want.