Liking cljdoc? Tell your friends :D

io.github.ralfspoeth.cljson

Read JSON into plain Clojure data, built on the Java library io.github.ralfspoeth/greyson.

Reading is a two-step process:

  1. read-json / read-json-str parse text into Greyson's immutable JsonValue tree.
  2. ->clj converts that tree into maps, vectors, strings, BigDecimals, booleans and nil.

Writing mirrors this: ->greyson turns Clojure data into a Greyson JsonValue, and write-json / write-json-str turn Clojure data or a JsonValue into JSON text.

Example:

(->clj (read-json-str "{"a": [1, true, null]}")) ;; => {"a" [1M true nil]}

Read JSON into plain Clojure data, built on the Java library
io.github.ralfspoeth/greyson.

Reading is a two-step process:

  1. `read-json` / `read-json-str` parse text into Greyson's
     immutable `JsonValue` tree.
  2. `->clj` converts that tree into maps, vectors, strings,
     BigDecimals, booleans and nil.

Writing mirrors this: `->greyson` turns Clojure data into a
Greyson `JsonValue`, and `write-json` / `write-json-str` turn
Clojure data or a `JsonValue` into JSON text.

Example:

  (->clj (read-json-str "{\"a\": [1, true, null]}"))
  ;; => {"a" [1M true nil]}
raw docstring

io.github.ralfspoeth.cljson.impl

Implementation details of io.github.ralfspoeth.cljson. Not part of the public API; may change without notice.

Implementation details of io.github.ralfspoeth.cljson.
Not part of the public API; may change without notice.
raw 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