Tips for Writing in YAML

The following tips could help you minimize syntax errors when writing in YAML:

  • Use a text editor that supports colour coding and validates YAML.
  • Set the text editor encoding to UTF-8.
  • Do not use tabs. Use only space characters in the YAML syntax.
  • YAML is case sensitive.
  • YAML considers that a line indented with more spaces than the section or parameter on the previous line is nested inside that section or parameter in a parent/child relationship. If you want to nest several lines in the same parent section, you should indent all children lines with the same number of spaces.