Zuzu::Module::YAML(3)

NAME
Zuzu::Module::YAML - std/data/yaml bindings for ZuzuScript.

DESCRIPTION
Implements the "std/data/yaml" module. The importer provides a single class named "YAML".

CLASSES

  YAML
Constructor options:

•   "pretty" (default false)

    Preserves the trailing newline generated by the YAML emitter.

•   "canonical" (default false)

    Accepted for API compatibility with "std/data/json" and "std/data/toml".

Instance methods:

•   encode(value)

    Encodes a ZuzuScript value as YAML text.

•   decode(yaml)

    Decodes YAML text and returns the corresponding ZuzuScript value.

•   load(path)

    Reads YAML text from a "std/io" "Path" and decodes it. Throws if given anything other than "Path".

•   "dump(path, value)"

    Encodes "value" and writes YAML text to a "std/io" "Path". Throws if given anything other than "Path".

COPYRIGHT AND LICENCE
Zuzu::Module::YAML is copyright Toby Inkster.

It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.