A wrapper around an underlying JSON parsing and encoding library.
A wrapper around an underlying JSON parsing and encoding library.
(read-json this reader options)Reads JSON from the provided Reader.
The JSONProcesser must support the following options:
| Option | Type | Description |
|---|---|---|
| :key-fn | fn | Converts string keys; defaults to keyword |
| :eof-error? | boolean | If true, then throw an exception if the reader is at EOF (default is false) |
| :eof-value | any | Value to return if reader is at EOF (defaults to :eof) |
| :value-fn | any | Passed the key and the value and returns an updated value |
Generally, any additional options are passed through to the underlying JSONProcessor implementation, but care should be given because different implementations will support different options.
Reads JSON from the provided Reader. The JSONProcesser must support the following options: | Option | Type | Description |--- |--- |--- | :key-fn | fn | Converts string keys; defaults to `keyword` | :eof-error? | boolean | If true, then throw an exception if the reader is at EOF (default is false) | :eof-value | any | Value to return if reader is at EOF (defaults to :eof) | :value-fn | any | Passed the key and the value and returns an updated value Generally, any additional options are passed through to the underlying JSONProcessor implementation, but care should be given because different implementations will support different options.
(stream-json this object stream)Writes the object, as JSON, to the given output stream.
Returns the output stream, still open.
Writes the object, as JSON, to the given output stream. Returns the output stream, still open.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |