JSON.pir - PIR implementation of JSON data interchange format.
_json method to generate a JSON representation of a PMC.
$S0 = _json( $P0 )
To generate a PMC from a JSON string, see "data_json" in compilers.
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.
Required. The PMC to dump.
Optional. Boolean: If true, then the generated string will be very readable for humans. Defaults to false, which will generate the most compact string possible.
- Thunk a better way to deal with the maximum recursion depth exception (Or make it official)