2 # Collection Types #############################################################
3 ################################################################################
5 # http://yaml.org/type/map.html -----------------------------------------------#
8 # Unordered set of key: value pairs.
13 Flow style: !!map { Clark: Evans, Ingy: döt Net, Oren: Ben-Kiki }
15 # http://yaml.org/type/omap.html ----------------------------------------------#
18 # Explicitly typed ordered map (dictionary).
20 - aardvark: African pig-like ant eater. Ugly.
21 - anteater: South-American ant eater. Two species.
22 - anaconda: South-American constrictor snake. Scaly.
25 Numbers: !!omap [ one: 1, two: 2, three : 3 ]
27 # http://yaml.org/type/pairs.html ---------------------------------------------#
30 # Explicitly typed pairs.
35 - meeting: with client.
36 Flow tasks: !!pairs [ meeting: with team, meeting: with boss ]
38 # http://yaml.org/type/set.html -----------------------------------------------#
41 # Explicitly typed set.
42 baseball players: !!set
47 baseball teams: !!set { Boston Red Sox, Detroit Tigers, New York Yankees }
49 # http://yaml.org/type/seq.html -----------------------------------------------#
52 # Ordered sequence of nodes
54 - Mercury # Rotates - no light/dark sides.
55 - Venus # Deadliest. Aptly named.
56 - Earth # Mostly dirt.
60 - Uranus # Where the sun hardly shines.
61 - Neptune # Boring. No rings.
62 - Pluto # You call this a planet?
63 Flow style: !!seq [ Mercury, Venus, Earth, Mars, # Rocks
64 Jupiter, Saturn, Uranus, Neptune, # Gas
68 # Scalar Types #################################################################
69 ################################################################################
71 # http://yaml.org/type/binary.html --------------------------------------------#
74 canonical: !!binary "\
75 R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5\
76 OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+\
77 +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC\
78 AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs="
80 R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5
81 OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+
82 +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC
83 AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=
85 The binary value above is a tiny arrow encoded as a gif image.
87 # http://yaml.org/type/bool.html ----------------------------------------------#
97 # http://yaml.org/type/float.html ---------------------------------------------#
100 canonical: 6.8523015e+5
101 exponentioal: 685.230_15e+03
103 sexagesimal: 190:20:30.15
104 negative infinity: -.inf
107 # http://yaml.org/type/int.html -----------------------------------------------#
113 hexadecimal: 0x_0A_74_AE
114 binary: 0b1010_0111_0100_1010_1110
115 sexagesimal: 190:20:30
117 # http://yaml.org/type/merge.html ---------------------------------------------#
120 - &CENTER { x: 1, y: 2 }
121 - &LEFT { x: 0, y: 2 }
125 # All the following maps are equal:
138 - # Merge multiple maps
139 << : [ *CENTER, *BIG ]
143 << : [ *BIG, *LEFT, *SMALL ]
145 label: big/left/small
147 # http://yaml.org/type/null.html ----------------------------------------------#
150 # This mapping has four keys,
156 # This sequence has five
157 # entries, two have values.
165 # http://yaml.org/type/str.html -----------------------------------------------#
169 # http://yaml.org/type/timestamp.html -----------------------------------------#
172 canonical: 2001-12-15T02:59:43.1Z
173 valid iso8601: 2001-12-14t21:59:43.10-05:00
174 space separated: 2001-12-14 21:59:43.10 -5
175 no time zone (Z): 2001-12-15 2:59:43.10
176 date (00:00:00Z): 2002-12-14
179 # JavaScript Specific Types ####################################################
180 ################################################################################
182 # https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/RegExp
185 simple: !!js/regexp foobar
186 modifiers: !!js/regexp /foobar/mi
188 # https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/undefined
190 undefined: !!js/undefined ~
192 # https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function
194 function: !!js/function >
196 return 'Wow! JS-YAML Rocks!';