ARTICLE: "yaml-mapping""Mapping between Factor and YAML types"
{ $heading "Types mapping" }
"The rules in the table below are used to convert between yaml and factor objects."
" They are based on " { $url "http://www.yaml.org/spec/1.2/spec.html" } ", section \"10.3. Core Schema\" and " { $url "http://yaml.org/type/" } ", adapted to factor's conventions."
{ $table
{ { $snippet "yaml" } { $snippet "factor" } }
{ { $snippet "scalars" } "" }
{ "!!null" { $link f } }
{ "!!bool" { $link boolean } }
{ "!!int" { $link integer } }
{ "!!float" { $link float } }
{ "!!str" { $link string } }
{ "!!binary" { $link byte-array } }
{ "!!timestamp""Not supported yet" }
{ { $snippet "sequences" } "" }
{ "!!seq" { $link array } }
{ "!!omap" { $link linked-assoc } }
{ "!!pairs" { $link "alists" } }
{ { $snippet "mappings" } "" }
{ "!!map" { $link hashtable } }
{ "!!set" { $link hash-set } }
}
{ $heading "YAML to Factor Round Tripping" }
"The following YAML types are not preserved:"
{ $list
{ "!!null -> " { $link boolean } " -> !!bool" }
{ "!!pairs -> " { $link "alists" } " -> !!seq" }
}
{ $heading "Factor to YAML Round Tripping" }
"The following Factor types are not preserved, unless another type has precedence:"