Strings in YAML – To quote or not to quote (2018)

  • For the love of God, save yourself pain. Always quote.

  • I'm surprised in a discussion of when to quote or not quote with YAML the dreaded "yes", "no", "true", "false", "on", and "off" booleans didn't come up.

    Quoting the article:

    > In YAML, you can write a string without quotes, if it doesn't have a special meaning.

    Yeah, about that...

  • Is this even a question? I double quote ALL strings. In fact, my C background makes me use " in Python too, even though single quote ' is acceptable. Somehow " feels more __stringy__.

  • Quote strings, always.