YAML tip: why `country: NO` can turn into `false`
by•
A classic YAML gotcha: in YAML 1.1 parsers, unquoted values like NO, no, off and yes become booleans. So a list of country codes with Norway in it (NO) can quietly turn into false. The fix is to quote values like that ("NO") or use a parser that follows YAML 1.2. I wrote up the details here: https://pastekit.dev/errors/yaml.... PasteKit's YAML formatter runs entirely in your browser, nothing gets uploaded, and errors show the line and column. What's the strangest YAML bug you've run into?
2 views


Replies
Be the first to reply
Have a question or a thought to share? Add a comment above to start the conversation.