Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
64 lines (60 sloc) 873 Bytes
=== Spec Example 2.12. Compact Nested Mapping
--- from: http://www.yaml.org/spec/1.2/spec.html#id2760821
--- tags: spec mapping sequence
--- in-yaml(<)
---
# Products purchased
- item : Super Hoop
quantity: 1
- item : Basketball
quantity: 4
- item : Big Shoes
quantity: 1
--- in-json
[
{
"item": "Super Hoop",
"quantity": 1
},
{
"item": "Basketball",
"quantity": 4
},
{
"item": "Big Shoes",
"quantity": 1
}
]
--- out-yaml(<)
---
- item: Super Hoop
quantity: 1
- item: Basketball
quantity: 4
- item: Big Shoes
quantity: 1
--- test-event
+STR
+DOC ---
+SEQ
+MAP
=VAL :item
=VAL :Super Hoop
=VAL :quantity
=VAL :1
-MAP
+MAP
=VAL :item
=VAL :Basketball
=VAL :quantity
=VAL :4
-MAP
+MAP
=VAL :item
=VAL :Big Shoes
=VAL :quantity
=VAL :1
-MAP
-SEQ
-DOC
-STR