3 ms·
I mean the example given with the star looks fine to me? Crucially it's not whitespace sensitive. YAML is a terrible terrible thing and yet another place we've
by Guid_NewGuid 4y ago
I mean the example given with the star looks fine to me? Crucially it's not whitespace sensitive. YAML is a terrible terrible thing and yet another place we've collectively lost the plot.
- KerrAvon 4y agoThe point is that most of the text would be markup/structure and not actual content/values.
- mdaniel 4y agoI get baited into these discussion all the time, but I'll point out that since YAML is as superset of JSON you're free to keep using JSON if you prefer it. But let's just be real that omitting the `"` everywhere is a clearer separation between content and encoding, and then representing multi-line strings is hands-down easier in yaml than JSON inst: Type: AWS::EC2::Instance Properties: UserData: | #!/bin/sh echo "hello, world!" cat >/root/.ssh/authorized_keys <<FOO ssh-rsa cafebabedeadbeef FOO versus { "inst": { "Type": "AWS::EC2::Instance", "Properties": { "UserData": "#!/bin/sh\necho \"hello, world!\"\ncat >/root/.ssh/authorized_keys <<FOO\nssh-rsa cafebabedeadbeef\nFOO\n" } } }