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.

Qwiratry::Format::YAML v0.0.1

YAML format backend for Qwiratry using YAMLish

Authors

    License

    Dependencies

    Test Dependencies

    Provides

    • Qwiratry::Format::YAML

    Documentation

    The Camelia image is copyright 2009 by Larry Wall. "Raku" is a trademark of the Yet Another Society. All rights reserved.

    Built with Podlite — the markup and publishing tools behind this site.