lab01: impl json

This commit is contained in:
2026-02-02 09:38:15 -08:00
parent 14461fa7ef
commit 3b111eb7d6
2 changed files with 64 additions and 0 deletions

15
lab01/jsonDriver.hs Normal file
View 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