Liking cljdoc? Tell your friends :D

io.pedestal.json.protocols


JSONProcessorcljprotocol

A wrapper around an underlying JSON parsing and encoding library.

A wrapper around an underlying JSON parsing and encoding library.

read-jsonclj

(read-json this reader options)

Reads JSON from the provided Reader.

The JSONProcesser must support the following options:

OptionTypeDescription
:key-fnfnConverts string keys; defaults to keyword
:eof-error?booleanIf true, then throw an exception if the reader is at EOF (default is false)
:eof-valueanyValue to return if reader is at EOF (defaults to :eof)
:value-fnanyPassed 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-jsonclj

(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.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close