Permalink
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (47 sloc) 715 Bytes
=== Spec Example 2.26. Ordered Mappings
--- from: http://www.yaml.org/spec/1.2/spec.html#id2761780
--- tags: spec mapping
--- in-yaml(<)
# Ordered maps are represented as
# A sequence of mappings, with
# each mapping having one key
--- !!omap
- Mark McGwire: 65
- Sammy Sosa: 63
- Ken Griffy: 58
--- in-json
[
{
"Mark McGwire": 65
},
{
"Sammy Sosa": 63
},
{
"Ken Griffy": 58
}
]
--- out-yaml(<)
--- !!omap
- Mark McGwire: 65
- Sammy Sosa: 63
- Ken Griffy: 58
--- test-event
+STR
+DOC ---
+SEQ <tag:yaml.org,2002:omap>
+MAP
=VAL :Mark McGwire
=VAL :65
-MAP
+MAP
=VAL :Sammy Sosa
=VAL :63
-MAP
+MAP
=VAL :Ken Griffy
=VAL :58
-MAP
-SEQ
-DOC
-STR