chickadee » medea » read-json

(read-json [port-or-string] #!key consume-trailing-whitespace)procedure

Reads a JSON document from port-or-string which is (current-input-port) by default. The returned object is assembled according to the current json-parsers parameter.

By default trailing whitespace in the input is consumed (as per the grammar defined in RFC 4627). To disable this behavior (e.g. to allow early return when streaming a sequence of JSON documents) the keyword argument consume-trailing-whitespace can be passed as #f.