Skip to content

Latest commit

 

History

History
19 lines (11 loc) · 537 Bytes

README.md

File metadata and controls

19 lines (11 loc) · 537 Bytes

vinyl-json

Automatic json instances for Data.Vinyl

Take a look!

example_json = "{\"name\": \"jon\", \"job\":\"Code\", \"age\":42, \"things\":[1,2,3] }"

parsed_example :: Maybe (PlainRec '[("name" ::: Text),
                                    ("job"  ::: Text),
                                    ("age"  ::: Int),
                                    ("things" ::: [Int])])
parsed_example = decode example_json

At the moment, it only works for PlainRecs but more might happen in the future.