Mapping between Factor and YAML types
YAML serialization

Prev:yaml-docs> ( str -- arr )
Next:Special mapping keys


Types mapping
The rules in the table below are used to convert between yaml and factor objects. They are based on http://www.yaml.org/spec/1.2/spec.html, section "10.3. Core Schema" and http://yaml.org/type/, adapted to factor's conventions.
yamlfactor
scalars
!!nullf
!!boolboolean
!!intinteger
!!floatfloat
!!strstring
!!binarybyte-array
!!timestamptimestamp
sequences
!!seqarray
!!omaplinked-assoc
!!pairsAssociation lists
mappings
!!maphashtable
!!sethash-set
special keys
!!mergeyaml-merge
!!valueyaml-value


YAML to Factor Round Tripping
The following YAML types are not preserved:
!!null -> boolean -> !!bool
!!pairs -> Association lists -> !!seq


Factor to YAML Round Tripping
The following Factor types are not preserved, unless another type has precedence:
assoc -> !!map -> hashtable
set -> !!set -> hash-set
sequence -> !!seq -> array

Examples of type precedence which preserves type: byte-array over sequence.