env.dev

YAML Syntax Cheat Sheet — Scalars, Collections & Gotchas

Quick reference for YAML syntax: strings, numbers, multiline values, sequences, mappings, anchors, aliases, and common gotchas like the Norway problem.

Last updated:

Loading…

Frequently Asked Questions

What is the Norway problem in YAML?

In YAML 1.1, the country code NO is interpreted as boolean false because YAML treats bare yes/no/on/off as booleans. Always quote country codes and similar values. YAML 1.2 fixes this by only treating true/false as booleans.

Can I use tabs for indentation in YAML?

No. YAML only allows spaces for indentation. Tabs will cause a parse error. Most editors can be configured to insert spaces when you press Tab.