Nested lists in YAML - YAML Examples



Example 1: Sequence of Scalars

- Mark McGwire- Sammy Sosa- Ken Griffey

Example 2: Named Sequence of Scalars

american:  - Boston Red Sox   - Detroit Tigers   - New York Yankees

Example 3 Compact Nested Mapping

- item    : Super Hoop  quantity: 1- item    : Basketball  quantity: 4- item    : Big Shoes  quantity: 1

Example 4: sequence of sequences

-  - This is a sequence  - inside another sequence

OR

- - This is a sequence  - inside another sequence

Example 5: sequence of sequences(upto 3 level)

-   -     - Nested sequence indicators    - can be collapsed

OR

- - - Nested sequence indicators    - can be collapsed