This library provides JSON parser and writer.
Controls mapping of JSON map and array. The value must be either
'vector
or 'alist
. The first one is compatible with Chicken
Scheme's json module, the latter one is compatible with Gauche's
rfc.json
module. By default, it's set to vector
for backward
compatibility.
Conversion rules for vector
:
JSON array <-> list
JSON map <-> vector
JSON boolean <-> boolean
JSON null <-> symbol `null`
Conversion rules for alist
:
JSON array <-> vector
JSON map <-> alist
JSON boolean <-> boolean
JSON null <-> symbol `null`
This parameter affects the read and write procedures.
Reads JSON from given port and returns representing S-expression.
Writes the given S-expression JSON representing object to given port.
Writes the given S-expression JSON representing object to given port.
The written JSON doesn't have excess space.
Writes the given S-expression JSON representing object to given port.
The written JSON is formatted to human readable.
Returns #t
if the given obj is &json-read
or &json-write
respectively,
otherwise #f
.