-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Kitchen sink for querying JSON -- -- The library complements json-syntax by making available several common -- access patterns. The utilities provided by this library only query -- JSON. They do not update it. @package json-query @version 0.1.0.0 module Json.Path -- | A path to an object. data Path -- | JSON path element of a key into an object, "object.key". Key :: {-# UNPACK #-} !ShortText -> !Path -> Path -- | JSON path element of an index into an array, "array[index]". Negative -- numbers result in undefined behavior. Index :: {-# UNPACK #-} !Int -> !Path -> Path Nil :: Path encode :: Path -> ShortText builderUtf8 :: Path -> Builder -- | Search for an element at the given path. query :: Path -> Value -> Maybe Value reverse :: Path -> Path instance GHC.Show.Show Json.Path.Path instance GHC.Classes.Eq Json.Path.Path module Json.Parser newtype Parser a Parser :: (Path -> Either Path a) -> Parser a [$sel:runParser:Parser] :: Parser a -> Path -> Either Path a newtype MemberParser a MemberParser :: (Path -> SmallArray Member -> Either Path a) -> MemberParser a [$sel:runMemberParser:MemberParser] :: MemberParser a -> Path -> SmallArray Member -> Either Path a run :: Parser a -> Either Path a key :: ShortText -> (Value -> Parser a) -> MemberParser a members :: MemberParser a -> SmallArray Member -> Parser a -- | Run the same parser against every element in a SmallArray. This -- adjusts the context at each element. smallArray :: (Value -> Parser a) -> SmallArray Value -> Parser (SmallArray a) object :: Value -> Parser (SmallArray Member) array :: Value -> Parser (SmallArray Value) number :: Value -> Parser Scientific boolean :: Value -> Parser Bool string :: Value -> Parser ShortText int :: Scientific -> Parser Int word16 :: Scientific -> Parser Word16 word64 :: Scientific -> Parser Word64 fail :: Parser a -- | Run a parser in a modified context. contextually :: (Path -> Path) -> Parser a -> Parser a instance GHC.Base.Functor Json.Parser.Parser instance GHC.Base.Functor Json.Parser.MemberParser instance GHC.Base.Applicative Json.Parser.MemberParser instance GHC.Base.Applicative Json.Parser.Parser instance GHC.Base.Monad Json.Parser.Parser