YAML in one paragraph
YAML uses indentation to mean structure — two spaces are the convention, tabs are forbidden, and a single misplaced space silently changes meaning (or breaks parsing). Mappings are key: value, lists are - item, and quotes matter less than in JSON but comments (#) are a feature JSON lacks.
Common YAML failures this validator catches
- Tab characters — the #1 YAML error; always caught here.
- Inconsistent indentation — a child more indented than its siblings or a key that "jumps" levels. The converter will flag lines it cannot parse; for strict indentation validation use a full parser like yq or PyYAML.
- Duplicate keys — last one wins silently in most parsers; flagged as a warning.
- Colon without space (
key:value) — valid only inside JSON-style flow or as a value, not as a mapping separator. - Unquoted special values —
yes/no/on/offandnullresolve to booleans/null in YAML 1.1 parsers; quoted if you want strings.
Converter scope
The YAML ↔ JSON converter handles the practical subset: nested mappings, block lists, inline flow ([a, b], {k: v}), strings/numbers/booleans/null, and comments (stripped). Anchors/aliases (&x / *x) and multi-line block scalars (|, >) are not expanded — for those, use a full parser like yq or Python's PyYAML locally.