(read-json input)
(read-json input keywordize?)
(read-json input keywordize? eof-error? eof-value)
DEPRECATED; replaced by read-str.
Reads one JSON value from input String or Reader. If keywordize? is
true (default), object keys will be converted to keywords. If
eof-error? is true (default), empty input will throw an
EOFException; if false EOF will return eof-value.
Source
(defn read-json
"DEPRECATED; replaced by read-str.
Reads one JSON value from input String or Reader. If keywordize? is
true (default), object keys will be converted to keywords. If
eof-error? is true (default), empty input will throw an
EOFException; if false EOF will return eof-value."
([input]
(read-json input true true nil))
([input keywordize?]
(read-json input keywordize? true nil))
([input keywordize? eof-error? eof-value]
(let [key-fn (if keywordize? keyword identity)]
(condp instance? input
String
(read-str input
:key-fn key-fn
:eof-error? eof-error?
:eof-value eof-value)
java.io.Reader
(read input
:key-fn key-fn
:eof-error? eof-error?
:eof-value eof-value)))))