NAME
Zuzu::Module::JSON - std/data/json bindings for ZuzuScript.
DESCRIPTION
Implements the std/data/json module. The importer provides a single class named JSON. If JSON::XS is installed, it will be used as the underlying backend; otherwise JSON::PP is used.
CLASSES
JSON
Constructor options:
utf8(default true)pretty(default false)canonical(default false)
Instance methods:
encode(value)Encodes a ZuzuScript value as JSON text.
decode(json)Decodes JSON text and returns the corresponding ZuzuScript value.
load(path)Reads JSON text from a
std/ioPathand decodes it. Throws if given anything other thanPath.dump(path, value)Encodes
valueand writes JSON text to astd/ioPath. Throws if given anything other thanPath.
COPYRIGHT AND LICENCE
Zuzu::Module::JSON 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.