YAML
Overview
YAML format backend for Qwiratry, powered by YAMLish 0.1.3+
(required for RakuAST compatibility).
Defines Qwiratry::Format::YAML::Parse and
Qwiratry::Format::YAML::Render implementations loaded through
Qwiratry::Format.make.
The parser lowers YAML mappings to hashes, sequences to arrays, scalars to
Str/Int/Num/Bool, and null forms (such as ~) to undefined
values. Invalid YAML fails hard (throws) so callers and the format
conformance kit can treat parse errors uniformly.
The renderer emits YAML documents via YAMLish's save-yaml. Mapping keys
are sorted by default (:sorted-keys, mapped to YAMLish's :sorted) for
deterministic output.
Methods
parse(Str $input-string)
Parse YAML text into ordinary Raku data structures using YAMLish.
render(Mu $data, Associative :%options)
Render ordinary Raku data structures to YAML text using YAMLish.
%options<sorted-keys> defaults to true and is passed through as
YAMLish's :sorted flag.