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