lab01: impl json
This commit is contained in:
15
lab01/jsonDriver.hs
Normal file
15
lab01/jsonDriver.hs
Normal file
@@ -0,0 +1,15 @@
|
||||
import JSON
|
||||
|
||||
testNested = JObject [
|
||||
("name", JObject [("first",JString "Tyrion"), ("last",JString "Lannister")]),
|
||||
("age", JNumber 32),
|
||||
("siblings", JArray [
|
||||
JString "Jamie",
|
||||
JString "Cersei"]),
|
||||
("pet", JNull)]
|
||||
|
||||
main :: IO ()
|
||||
main = let arr = JSON.jsonRightTriangles
|
||||
in do
|
||||
putStrLn $ JSON.toString arr
|
||||
putStrLn $ JSON.toString testNested
|
||||
Reference in New Issue
Block a user