Copyright © 2001-2005 Oren Ben-Kiki, Clark Evans, Brian Ingerson
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.
Unordered set of non-equal values.
A set is an unordered collection of nodes such that no two nodes are equal. While sets are a fundamental mathematical type, YAML only supports them as the domains of a mapping. Hence the YAML syntax for a set is a mapping with all-null values.
Most programming languages do not have a built-in native data type
for supporting sets. Such data types are usually provided by
libraries. If no such data type is available, an application may
resort to loading a “
into a native hash table where all values are null.
!!set” tag may be given
explicitly. Alternatively, the application may choose to implicitly
type mappings with all-null values to sets. In this case, an
!!map” transfer must
be given to mappings that have all-null values but do not represent