TITLE
JSON.pir - PIR implementation of JSON data interchange format.
SYNOPSIS
Use the _json
method to generate a JSON representation of a PMC.
.include 'library/JSON.pir' $S0 = _json( $P0 )
To generate a PMC from a JSON string, see "json/JSON.pir" in compilers.
FUNCTIONS
This library provides the following functions:
- (string) = _json(pmc, ?pretty ) Convert a PMC to a JSON-serialized string. Note: If you pass in a cyclic structure, JSON will eventually throw a maximum recursion depth exception.
TODO
- Thunk a better way to deal with the maximum recursion depth exception (Or make it official)