Dictionaries and lists

# comments start with "#"
# dictionary are written like "key: value"
name: Martin D'vloper
languages:
  perl: Elite
  python: Elite
  pascal: Lame

# list items beginn with a "- "
foods:
  - Apple
  - Orange
  - Strawberry
  - Mango

# booleans are lower case
employed: true

Multiline strings

# Literal Block Scalar
Multiline: |
  exactly as you see
  will appear these three
  lines of poetry
# Folded Block Scalar
Multiline: <
  this is really a
  single line of text
  despite appearances

Inheritance

parent: &defaults
  a: 2
  b: 3

child:
  <<: *defaults
  b: 4

Reference content

values: &ref
  - These values
  - will be reused below
  
other_values:
  <<: *ref
0 Comments for this cheatsheet. Write yours!