Yaml
Simplified YAML parser (pure March, no FFI).
Supports: block mappings, block sequences, flow mappings {}, flow sequences [], plain scalars (string/int/bool/null), single-quoted and double-quoted strings, comments (#), document separator (---), inline comments.
Does NOT support: anchors (&), aliases (*), explicit tags (!!), multi-document streams, merge keys (<<), block scalars (| and >).
Public API: Yaml.parse(src) : Result(YamlValue, YamlError) Yaml.parse_exn(src) : YamlValue (panics on error) Yaml.to_string(v) : String Yaml.get(v, key) : Option(YamlValue) Yaml.get_in(v, keys) : Option(YamlValue) Yaml.get_str(v, key) : Option(String) Yaml.get_int(v, key) : Option(Int) Yaml.get_bool(v, key) : Option(Bool) Yaml.get_seq(v) : Option(List(YamlValue))
Types
Functions
Navigate nested YMap values by a list of keys.
Parse a YAML string. Returns Ok(YamlValue) or Err(YamlError). Supports: block mappings, block sequences, scalars, flow {}/[], comments.
Yaml.parse("name: alice\\nage: 30")