Safe Haskell | None |
---|---|
Language | Haskell98 |
A JSON API which describes itself.
- object :: Text -> Consumer Object Doc a -> Consumer Value Doc a
- key :: Text -> Consumer Value Doc a -> Consumer Object Doc a
- keyMaybe :: Text -> Consumer Value Doc a -> Consumer Object Doc (Maybe a)
- array :: Text -> Consumer Value Doc a -> Consumer Value Doc (Vector a)
- string :: Text -> Consumer Value Doc Text
- integer :: Text -> Consumer Value Doc Integer
- double :: Text -> Consumer Value Doc Double
- bool :: Text -> Consumer Value Doc Bool
- null :: Text -> Consumer Value Doc ()
- label :: Text -> Consumer s Doc a -> Consumer s Doc a
- info :: Text -> Consumer s Doc a -> Consumer s Doc a
- data Doc
Consumers
:: Text | Description of what the object is. |
-> Consumer Object Doc a | An object consumer. |
-> Consumer Value Doc a |
Consume an object.
:: Text | The key to lookup. |
-> Consumer Value Doc a | A value consumer of the object at the key. |
-> Consumer Object Doc a |
Consume from object at the given key.
:: Text | The key to lookup. |
-> Consumer Value Doc a | A value consumer of the object at the key. |
-> Consumer Object Doc (Maybe a) |
Optionally consume from object at the given key, only if it exists.
:: Text | Description of this array. |
-> Consumer Value Doc a | Consumer for each element in the array. |
-> Consumer Value Doc (Vector a) |
Consume an array.
Consume a string.
Consume an integer.
Consume an double.
Annotations
Wrap a consumer with a label e.g. a type tag.
Wrap a consumer with some handy information.