Welcome
  About
  Download
  Discuss
  Get Started
  FAQ
  Links

 

  Reference
  Specification
# A YAML reference card
--- #YAML:1.0

Collection indicators:
    '? ' : Key indicator.
    ': ' : Key / value separator.
    '- ' : Nested series entry indicator.
    ', ' : Separate in-line branch entries.
    '[]' : Surround in-line series branch.
    '{}' : Surround in-line keyed branch.

Scalar indicators:
    '''': Surround in-line unescaped scalar ('' escaped ').
    '"' : Surround in-line escaped scalar (see escape codes below).
    '|' : Block scalar indicator.
    '>' : Folded scalar indicator.
    '-' : Strip chomp modifier ('|-' or '>-').
    '+' : Keep chomp modifier ('|+' or '>+').
    int : Explicit indentation modifier ('|1' or '>2').
        # Modifiers can be combined ('|2-', '>+1').

Alias indicators:
    '&'  : Anchor property.
    '*'  : Alias indicator.

Transfer indicators:
    '!'  : Transfer method indicator.
    '!!' : Transfer method with private type family.
    '^'  : Establish/use global type family prefix.
    '|'  : Separate global type family from format.

Document indicators:
    '#'  : Directive indicator.
   '---' : Document header.
   '...' : Document terminator.

Misc indicators:
   ' # ' : Throwaway comment indicator.
    '='  : Default value map key.
   '<='  : Insert keys from map key.

Core types: ### Almost never given explicitly
    '!map' : [ Hash table, dictionary, mapping ]
    '!seq' : [ List, array, tuple, vector, sequence ]
    '!str' : Unicode string

Language Independent Scalar types:
    [ , ~, null, Nil ]        : Null (no value).
    [ 1234, 0x4D2, 02333 ]    : [ Decimal int, Hexadecimal int, Octal int ]
    [ 1,230.15, 12.3015e+02 ] : [ Fixed float, Exponential float ]
    [ .inf, -.Inf, .NAN ]     : [ Infinity (float), Negative, Not a number ]
    [ +, true, Yes, ON  ]     : Boolean true
    [ -, false, No, OFF ]     : Boolean false
    ? !binary >
	R0lG...BADS=
    : >-
        Base 64 binary value.

Escape codes:
 Numeric   : { "\xXX": 8-bit, "\uXXXX": 16-bit, "\UXXXXXXXX": 32-bit }
 Protective: { "\\": '\', "\"": '"', "\ ": ' ' }
 C: { "\a": BEL, "\b": BS, "\f": FF, "\n": LF, "\r": CR, "\t": TAB, "\v": VTAB }
 Additional: { "\e": ESC, "\0": NUL, "\_": NBSP, "\N": NEL, "\L": LS, "\P": PS }
...