Last active
December 9, 2020 11:19
-
-
Save KGOH/201c7ce0b00a06064ec6d6704b154bb4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(-> {: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