YAML
Whitespace is the syntax, which is why YAML fails in ways JSON never does.
How it opens
YAML parses into the document shape — one root value, browsed as a tree.
Nothing is chosen by file extension alone: every adapter scores the text itself and the highest confidence wins. When two are close enough that guessing would be a coin flip, the app asks instead of picking.
- extensions · .yaml, .yml
- media type · text/yaml
- shape · document
- extra diagnostics · this adapter lints beyond what parsing reports
Fixing
5 steps run over a YAML document, in this order. Nothing is applied until you say so, and each fix can be kept or dropped on its own.
- Replace tabs in YAML indentation with spaces
- Insert the missing space after a mapping colon (key:value → key: value)
- Comment out later duplicate keys in the same mapping (keep-first) — a judgment call — excluded from safe-repair-on-paste
- Round off-grid indentation to the document's dominant indent step
- Quote yes/no/on/off/y/n scalars that YAML 1.1 parsers read as booleans — reported, never applied unless you ask
Nesting
A YAML value can hold another system's output — a stringified body, an escaped document. Unpack opens it in place, names the parser that opened it, and repeats until nothing parses. Pack restores the original text byte for byte rather than re-serializing from the tree.
A sample
The document below is the fixture this adapter ships and its own tests parse — not an illustration written for this page.