-
Notifications
You must be signed in to change notification settings - Fork 4
json
Turtle Kitty edited this page Aug 9, 2015
·
2 revisions
This object contains two functions: parse and stringify.
(def t (text: { "foo": 1, "bar": [ 2, 3 ], "baz": { "x": 1, "y": 2 }}))
-> "{ \"foo\": 1, \"bar\": [ 2, 3 ], \"baz\": { \"x\": 1, \"y\": 2 }}"
(def r (: foo 1 bar '(2 3) baz (: x 1 y 2)))
-> (record: baz (record: y 2 x 1) foo 1 bar (2 3))
(json.parse t)
-> (record: baz (record: x 1 y 2) bar (vector: 2 3) foo 1)
(json.stringify r)
-> "{\"bar\":[2,3],\"foo\":1,\"baz\":{\"x\":1,\"y\":2}}"