Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 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