The top-level function for converting Lisp objects into a string in the JSON format. It can convert any object that can be converted to a json-exp via the to-json generic function.
WRITE-JSON (DATA &OPTIONAL (STREAM *STANDARD-OUTPUT*))
Write DATA to STREAM in JSON format.
EMIT-JSON-CHAR (CHAR STREAM)
Convert object directly to a JSON representation as a string. Default methods are provided for strings, symbols (which must be keywords), and numbers but there may be situations where it is appropriate to define new methods on this function. In general, however, it is probably better to define a method on to-json to convert the object to a sexp that can be rendered as JSON.
Generic function that can convert an arbitrary Lisp object to a json-exp, i.e. a sexp that can then be rendered as json. To make an arbitrary class convertable to JSON, add a method to this generic function that generates a json-exp.
EMIT-JSON (OBJECT STREAM)
Emit object to stream as JSON.