Common YAML Mistakes and Tips
A collection of common YAML problems, such as indentation and type inference, and how to solve them.
The most common mistake in YAML is indentation. Tab characters cannot be used; you must use spaces, and items at the same level must be aligned to the same number of spaces.
Automatic type inference also requires care. Unquoted yes/no/on/off are read as booleans, and a value like 08 may be interpreted differently depending on the context. To make sure something is a string, wrap it in quotes.
Use block scalars (| or >) for long strings, and when a value contains characters with special meaning — such as a colon, hash, or square bracket — wrap it in quotes to prevent misinterpretation.