Skip to content

Instantly share code, notes, and snippets.

@KGOH
Last active December 9, 2020 11:19
Show Gist options
  • Save KGOH/201c7ce0b00a06064ec6d6704b154bb4 to your computer and use it in GitHub Desktop.
Save KGOH/201c7ce0b00a06064ec6d6704b154bb4 to your computer and use it in GitHub Desktop.
(-> {:keyword-key "value0",
"test key with whitespaces" "value1",
"another key" "value2"}
clojure.data.json/write-str
(clojure.data.json/read-str :key-fn keyword)
prn-str
read-string)
;; => {:keyword-key "value0",
;; :test key,
;; with whitespaces,
;; "value1" :another,
;; key "value2"}
(-> {:keyword-key "value0",
"test key with whitespaces" "value1",
"another key" "value2"}
clojure.data.json/write-str
clojure.data.json/read-str
prn-str
read-string)
;; => {"keyword-key" "value0",
;; "test key with whitespaces" "value1",
;; "another key" "value2"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment