mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-19 09:12:34 +03:00
18 lines
384 B
Idris
18 lines
384 B
Idris
import Language.JSON
|
|
|
|
someJSON : JSON
|
|
someJSON = JObject [
|
|
("a", JNull),
|
|
("b", JBoolean True),
|
|
("c", JNumber 1),
|
|
("d", JString "Hello, world"),
|
|
("e", JArray [JNull, JString "Lorem ipsum"]),
|
|
("f", JObject [("key", JString "value")])
|
|
]
|
|
|
|
main : IO ()
|
|
main = do
|
|
putStrLn $ show someJSON
|
|
putStrLn $ show @{Idris} someJSON
|
|
putStrLn $ format 4 someJSON
|