-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | API for parsing "aeson" JSON tree into Haskell types
--
-- A flexible parser DSL of JSON AST produced by the "aeson" library with
-- automated and highly detailed error reporting. Provides a featureful
-- toolkit for parsing real-world documents with schemas of any
-- complexity or ambiguity, which the FromJSON instances are
-- simply not fit for.
@package aeson-value-parser
@version 0.17
module Aeson.ValueParser
-- | JSON Value AST parser.
--
-- Its Alternative instance implements the logic of choosing
-- between the possible types of JSON values.
data Value a
run :: Value a -> Value -> Either Error a
data Error
Error :: [Text] -> Text -> Error
object :: Object a -> Value a
array :: Array a -> Value a
null :: Value ()
nullable :: Value a -> Value (Maybe a)
string :: String a -> Value a
number :: Number a -> Value a
bool :: Value Bool
fromJSON :: FromJSON a => Value a
data String a
text :: String Text
matchedText :: (Text -> Either Text a) -> String a
parsedText :: Parser a -> String a
data Number a
scientific :: Number Scientific
integer :: (Integral a, Bounded a) => Number a
floating :: RealFloat a => Number a
matchedScientific :: (Scientific -> Either Text a) -> Number a
matchedInteger :: (Integral integer, Bounded integer) => (integer -> Either Text a) -> Number a
matchedFloating :: RealFloat floating => (floating -> Either Text a) -> Number a
-- | JSON Value parser.
data Object a
field :: Text -> Value a -> Object a
oneOfFields :: [Text] -> Value a -> Object a
fieldMap :: (Eq a, Hashable a) => String a -> Value b -> Object (HashMap a b)
foldlFields :: (state -> Text -> field -> state) -> state -> Value field -> Object state
-- | JSON Value parser.
data Array a
element :: Int -> Value a -> Array a
elementVector :: Value a -> Array (Vector a)
foldlElements :: (state -> Int -> element -> state) -> state -> Value element -> Array state
foldrElements :: (Int -> element -> state -> state) -> state -> Value element -> Array state
instance Control.Monad.Error.Class.MonadError Aeson.ValueParser.Error.Error Aeson.ValueParser.Array
instance GHC.Base.MonadPlus Aeson.ValueParser.Array
instance GHC.Base.Monad Aeson.ValueParser.Array
instance GHC.Base.Alternative Aeson.ValueParser.Array
instance GHC.Base.Applicative Aeson.ValueParser.Array
instance GHC.Base.Functor Aeson.ValueParser.Array
instance Control.Monad.Error.Class.MonadError Aeson.ValueParser.Error.Error Aeson.ValueParser.Object
instance GHC.Base.MonadPlus Aeson.ValueParser.Object
instance GHC.Base.Monad Aeson.ValueParser.Object
instance GHC.Base.Alternative Aeson.ValueParser.Object
instance GHC.Base.Applicative Aeson.ValueParser.Object
instance GHC.Base.Functor Aeson.ValueParser.Object
instance GHC.Base.Alternative Aeson.ValueParser.Number
instance GHC.Base.Applicative Aeson.ValueParser.Number
instance GHC.Base.Functor Aeson.ValueParser.Number
instance GHC.Base.Alternative Aeson.ValueParser.String
instance GHC.Base.Applicative Aeson.ValueParser.String
instance GHC.Base.Functor Aeson.ValueParser.String
instance GHC.Base.Applicative Aeson.ValueParser.Value
instance GHC.Base.Functor Aeson.ValueParser.Value
instance Control.Monad.Fail.MonadFail Aeson.ValueParser.Array
instance Control.Monad.Fail.MonadFail Aeson.ValueParser.Object
instance GHC.Base.Alternative Aeson.ValueParser.Value