yamleam/decoder

Bridge from YamlNode to gleam/dynamic so that the stdlib gleam/dynamic/decode decoders work over a parsed YAML tree.

The conversion is straightforward because the Erlang term shapes produced by dynamic.from for Gleam primitives match what the stdlib decoders expect:

YAMLGleamErlang
YamlNullNilnil atom
YamlBoolBooltrue / false atom
YamlIntIntinteger
YamlFloatFloatfloat
YamlStringStringbinary
YamlListList(Dynamic)list
YamlMapDict(String, Dynamic)map

Values

Search Document