Sequence Language-Independent Type for YAML™ Version 1.1

Working Draft 2005-01-18

Oren Ben-Kiki

Clark Evans

Brian Ingerson

This document may be freely copied provided it is not modified.

Status

This specification is a draft reflecting consensus reached by members of the yaml-core mailing list. Any questions regarding this draft should be raised on this list.


1. Sequence

URI:

tag:yaml.org,2002:seq

Shorthand:

!!seq

Kind:

Sequence.

Definition:

Collections indexed by sequential integers starting with zero. Example bindings include the Perl array, Python’s list or tuple, and Java’s array or vector.

Resolution and Validation:

This tag accepts all sequence values. It is is typically used as the fall-back tag for sequence nodes.

Example 1. !!seq Examples

# Ordered sequence of nodes
Block style: !!seq
- Mercury   # Rotates - no light/dark sides.
- Venus     # Deadliest. Aptly named.
- Earth     # Mostly dirt.
- Mars      # Seems empty.
- Jupiter   # The king.
- Saturn    # Pretty.
- Uranus    # Where the sun hardly shines.
- Neptune   # Boring. No rings.
- Pluto     # You call this a planet?
Flow style: !!seq [ Mercury, Venus, Earth, Mars,      # Rocks
                    Jupiter, Saturn, Uranus, Neptune, # Gas
                    Pluto ]                           # Overrated