Liking cljdoc? Tell your friends :D

puppetlabs.kitchensink.json

Cheshire related functions

This front-ends the common set of core cheshire functions:

  • generate-string
  • generate-stream
  • parse-string
  • parse-stream

This namespace when 'required' will also setup some common JSON encoders globally, so you can avoid doing this for each call.

Cheshire related functions

This front-ends the common set of core cheshire functions:

* generate-string
* generate-stream
* parse-string
* parse-stream

This namespace when 'required' will also setup some common JSON encoders
globally, so you can avoid doing this for each call.
raw docstring

*instant-encoder*clj

source

*localdate-encoder*clj

source

*localdatetime-encoder*clj

source

add-common-json-encoders!clj

Registers some common encoders for cheshire JSON encoding.

This is a memoize function, to avoid unnecessary calls to add-encoder.

Ideally this function should be called once in your app, for example your main class.

Encoders currently include:

  • java.time.Instant
  • java.time.LocalDate
  • java.time.LocalDateTime
Registers some common encoders for cheshire JSON encoding.

This is a memoize function, to avoid unnecessary calls to add-encoder.

Ideally this function should be called once in your app, for example your
main class.

Encoders currently include:

* java.time.Instant
* java.time.LocalDate
* java.time.LocalDateTime
sourceraw docstring

add-common-json-encoders!*clj

(add-common-json-encoders!*)

Non-memoize version of add-common-json-encoders!

Non-memoize version of add-common-json-encoders!
sourceraw docstring

default-pretty-optsclj

source

generate-pretty-streamclj

(generate-pretty-stream obj writer)
(generate-pretty-stream obj writer opts)

Thinly wraps cheshire.core/generate-stream, adding pretty printing from default-pretty-opts

Thinly wraps cheshire.core/generate-stream, adding pretty printing
from `default-pretty-opts`
sourceraw docstring

generate-pretty-stringclj

(generate-pretty-string obj)
(generate-pretty-string obj opts)

Thinly wraps cheshire.core/generate-string, adding pretty printing from default-pretty-opts

Thinly wraps cheshire.core/generate-string, adding pretty printing
from `default-pretty-opts`
sourceraw docstring

generate-streamclj

source

generate-stringclj

source

parse-streamclj

source

parse-stringclj

source

spit-jsonclj

(spit-json f obj & options)

Similar to clojure.core/spit, but writes the Clojure datastructure as JSON to f

Similar to clojure.core/spit, but writes the Clojure
datastructure as JSON to `f`
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