Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/JSON/Clojure/json.clj
Normal file
10
Task/JSON/Clojure/json.clj
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
(use 'clojure.data.json)
|
||||
|
||||
; Load as Clojure data structures and bind the resulting structure to 'json-map'.
|
||||
(def json-map (read-json "{ \"foo\": 1, \"bar\": [10, \"apples\"] }"))
|
||||
|
||||
; Use pr-str to print out the Clojure representation of the JSON created by read-json.
|
||||
(pr-str json-map)
|
||||
|
||||
; Pretty-print the Clojure representation of JSON. We've come full circle.
|
||||
(pprint-json json-map)
|
||||
Loading…
Add table
Add a link
Reference in a new issue