RFC 8259 compliant parser for JSON, within the Haskell type system.
λ> :kind! Decode "{ \"a\" : null, \"hey\" : \"lol\", \"sub\" : { \"subObj\" : [\"foo\",true], \"key\" : false }}" :: Value
= 'Object
'[ '("a", 'Null), '("hey", 'JString "lol"),
'("sub",
'Object
'[ '("subObj", 'Array '[ 'JString "foo", 'Bool 'True]),
'("key", 'Bool 'False)])]
- Finish floating point numbers
- Thread through
Either
- Augment JSON spec imp. to add types - aka. schema support.
- Reification functions for parsing, encoding, schema documentation.
Still experimental, could potentially be used for reifying parsers, encoders and extended to support JSON schema. Could also validate jq
/ jsonpath
queries against the defined schema.
BSD3 2022-2023 (c) David Johnson.