Something I forgot to include about strings is that you can also write multiline strings that you don't want to be interpreted as multiline. For example:
single-line-string:>Thisshouldbeoneline
And this is how it'll look like in JSON:
{"single-line-string":"This should be one line\n"}
When using the > character, instead of |, each new line will be interpreted as an empty space.
I use YAML so often on Jekyll.. and I didn't know I could write multiline strings just by add this
|
. Amazing. Thanks.Something I forgot to include about strings is that you can also write multiline strings that you don't want to be interpreted as multiline. For example:
And this is how it'll look like in JSON:
When using the
>
character, instead of|
, each new line will be interpreted as an empty space.I'm glad! Thanks for reading :D