GUIDE深度 · Deep dive

Common YAML Parse Errors

YAML is sensitive to indentation and colons. The most common failures are tab indentation, inconsistent sibling indentation, unquoted colons in values, and misaligned list items under a key.

更新 2026-11-01 · 公式可核验

Checklist

Use spaces only, never tabs.

Keep sibling keys at exactly the same indentation.

Quote values containing colons or hashes.

Separate multiple documents with ---, do not merge them.

Type traps

yes/no/on/off may become booleans.

Leading zeros or dates may be coerced to numbers/dates.

FAQ

Why does it fail when indentation looks equal?

Tabs or full-width spaces may be mixed in; show whitespace in the editor.

How to locate it fast?

From the error line, walk up to the nearest sibling key.

Sources

Related calculators

YAML to JSONConvert practical YAML (objects, arrays, scalars) to JSON locally.

More guides

Practical YAML SubsetRead guide
KEEP READING

继续读

按顺序读,或跳到同主题的其他指南。

全部指南 →