DEPRECATED
Methods used for extending JSON generation to different Java classes. Has the same public API as core.clj so they can be swapped in and out.
DEPRECATED Methods used for extending JSON generation to different Java classes. Has the same public API as core.clj so they can be swapped in and out.
(add-encoder cls encoder)
Provide an encoder for a type not handled by Cheshire.
ex. (add-encoder java.net.URL encode-string)
See encode-str, encode-map, etc, in the cheshire.custom namespace for encoder examples.
Provide an encoder for a type not handled by Cheshire. ex. (add-encoder java.net.URL encode-string) See encode-str, encode-map, etc, in the cheshire.custom namespace for encoder examples.
(encode-bool b jg)
Encode a Boolean object to the json generator.
Encode a Boolean object to the json generator.
(encode-date d jg)
Encode a date object to the json generator.
Encode a date object to the json generator.
(encode-int n jg)
Encode anything implementing java.lang.Number to the json generator.
Encode anything implementing java.lang.Number to the json generator.
(encode-long n jg)
Encode anything implementing java.lang.Number to the json generator.
Encode anything implementing java.lang.Number to the json generator.
(encode-map m jg)
Encode a clojure map to the json generator.
Encode a clojure map to the json generator.
(encode-named k jg)
Encode a keyword to the json generator.
Encode a keyword to the json generator.
(encode-nil _ jg)
Encode null to the json generator.
Encode null to the json generator.
(encode-number n jg)
Encode anything implementing java.lang.Number to the json generator.
Encode anything implementing java.lang.Number to the json generator.
(encode-ratio n jg)
Encode a clojure.lang.Ratio to the json generator.
Encode a clojure.lang.Ratio to the json generator.
(encode-seq s jg)
Encode a seq to the json generator.
Encode a seq to the json generator.
(encode-str s jg)
Encode a string to the json generator.
Encode a string to the json generator.
(encode-symbol s jg)
Encode a clojure symbol to the json generator.
Encode a clojure symbol to the json generator.
(remove-encoder cls)
Remove encoder for a given type.
ex. (remove-encoder java.net.URL)
Remove encoder for a given type. ex. (remove-encoder java.net.URL)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close