Liking cljdoc? Tell your friends :D

std.json


+default-mapper+clj

source

+keyword-case-mapper+clj

source

+keyword-js-mapper+clj

source

+keyword-mapper+clj

source

+keyword-spear-mapper+clj

source

clojure-moduleclj

(clojure-module {:keys [encode-key-fn decode-key-fn encoders date-format]
                 :or {encode-key-fn true decode-key-fn false}})

adds serializers for clojure objects

(clojure-module {}) => com.fasterxml.jackson.databind.module.SimpleModule

adds serializers for clojure objects

(clojure-module {})
=> com.fasterxml.jackson.databind.module.SimpleModule
sourceraw docstring

object-mapperclj

(object-mapper)
(object-mapper options)

creates an object-mapper for json output

(object-mapper {}) => com.fasterxml.jackson.databind.ObjectMapper

creates an object-mapper for json output

(object-mapper {})
=> com.fasterxml.jackson.databind.ObjectMapper
sourceraw docstring

readclj

(read object)
(read object mapper)

reads json as clojure data

(read "{"a":1,"b":2}") => {"a" 1, "b" 2}

reads json as clojure data

(read "{\"a\":1,\"b\":2}")
=> {"a" 1, "b" 2}
sourceraw docstring

ReadValuecljprotocol

-read-valueclj

(-read-value this mapper)
source

sys:resource-jsonclj

(sys:resource-json path)

returns cached json map of on a resource

returns cached json map of on a resource
sourceraw docstring

writeclj

(write object)
(write object mapper)

writes clojure data to json

(write {:a 1 :b 2}) => "{"a":1,"b":2}"

writes clojure data to json

(write {:a 1 :b 2}) => "{\"a\":1,\"b\":2}"
sourceraw docstring

write-bytesclj

(write-bytes object)
(write-bytes object mapper)

writes clojure data to json bytes

(String. (write-bytes {:a 1 :b 2})) => "{"a":1,"b":2}"

writes clojure data to json bytes

(String. (write-bytes {:a 1 :b 2}))
=> "{\"a\":1,\"b\":2}"
sourceraw docstring

write-ppclj

(write-pp object)
(write-pp object mapper)

pretty print json output

pretty print json output
sourceraw docstring

write-toclj

(write-to sink object)
(write-to sink object mapper)

writes clojure data to a sink

(def -out- (java.io.ByteArrayOutputStream.))

(write-to -out- {:a 1 :b 2})

(.toString ^java.io.ByteArrayOutputStream -out-) => "{"a":1,"b":2}"

writes clojure data to a sink

(def -out- (java.io.ByteArrayOutputStream.))

(write-to -out- {:a 1 :b 2})

(.toString ^java.io.ByteArrayOutputStream -out-)
=> "{\"a\":1,\"b\":2}"
sourceraw docstring

WriteValuecljprotocol

-write-valueclj

(-write-value this value mapper)
source

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