aeson-0.10.0.0: Fast JSON parsing and encoding

Copyright | (c) 2015 Bryan O'Sullivan
License | Apache
Maintainer | Bryan O'Sullivan <bos@serpentine.com>
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell98

Data.Aeson.Internal

Description

Internal types and functions.

Note: all declarations in this module are unstable, and prone to being changed at any time.

Synopsis

- data IResult a
  - = IError JSONPath String
  - | ISuccess a
- data JSONPathElement
- type JSONPath = [JSONPathElement]
- formatError :: JSONPath -> String -> String
- ifromJSON :: FromJSON a => Value -> IResult a
- iparse :: (a -> Parser b) -> a -> IResult b

# Documentation

data IResult a Source

The internal result of running a `Parser`.

Constructors

IError JSONPath String |
ISuccess a |

Instances

Monad IResult Source |
Functor IResult Source |
Applicative IResult Source |
Foldable IResult Source |
Traversable IResult Source |
Alternative IResult Source |
MonadPlus IResult Source |
Eq a => Eq (IResult a) Source |
Show a => Show (IResult a) Source |
Monoid (IResult a) Source |
NFData a => NFData (IResult a) Source |

data JSONPathElement Source

Elements of a JSON path used to describe the location of an error.

Instances

Eq JSONPathElement Source |
Show JSONPathElement Source |
NFData JSONPathElement Source |

type JSONPath = [JSONPathElement] Source

formatError :: JSONPath -> String -> String Source

Annotate an error message with a JSONPath error location.

ifromJSON :: FromJSON a => Value -> IResult a Source

Convert a value from JSON, failing if the types do not match.

iparse :: (a -> Parser b) -> a -> IResult b Source

Run a `Parser`.