YAML Gotchas Guide: Norway Problem, Octal Literals, and Boolean Traps
Avoid notorious YAML pitfalls: the Norway problem (NO parsed as false), octal number literals, multi-document files, and duplicate key behavior.
Published:
Tags: yaml, debugging, configuration
YAML Gotchas Guide: Norway Problem, Octal Literals, and Boolean Traps YAML has a well-deserved reputation for silent bugs. Unlike JSON, where a malformed document is a parse error, YAML will happily parse something that looks like one thing and produces another. These aren't YAML bugs — they're YAML 1.1 spec features that made sense in 2005 and have caused production incidents ever since. This guide covers the specific footguns you'll encounter in real YAML files, why they exist, and how to avoid them. -----|---------|-------| | PyYAML (Python) | 1.1 | Default; still has 1.1 behaviors | | ruamel.yaml (Python) | 1.2 | Explicit for 1.2 mode | | js-yaml (Node.js) | 1.1 (mostly) | for 1.2 booleans | | go-yaml v3 (Go) | 1.1 | No easy mode switch | | SnakeYAML (Java) | 1.1 | | Unless you…
All articles · theproductguy.in