(json-str {:a "a value"}) "{\"a\":\"a value\"}" (json-str {[1 2] [1,2,3]}) "{\"[1 2]\":[1,2,3]}"
(json-str 1) "1"
Reads one JSON value from input String or Reader. If keywordize? is
(defn json-str "Converts x to a JSON-formatted string." [x] (let [sw (StringWriter.) out (PrintWriter. sw)] (write-json x out) (.toString sw)))
Comments top
No comments for json-str. Log in to add a comment.