Illustrate how list nesting can break parsing.

Section: Common YAML errors

Bad list indentation

yaml
yaml
users:
- name: Jonathan
 role: admin
Explanation

List item indentation must be consistent and nested fields aligned correctly.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Common YAML errors
Duplicate key example
Show why repeated keys are dangerous.
OpenIn sheetyamlsame section
Missing space after colon
Show a syntax issue many parsers reject.
OpenIn sheetyamlsame section
Run strict linting on a file
Catch common syntax and style problems in one pass.
OpenIn sheetbashsame section
Debug with Python safe_load
Confirm whether a parser can load a YAML document.
OpenIn sheetbash1 tag match
Parse YAML with Ruby
Use Ruby's YAML parser to validate a file.
OpenIn sheetbash1 tag match
Round-trip through JSON
Convert YAML to JSON to inspect the normalized data model.
OpenIn sheetbash1 tag match