-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | JSON Pointer library
--
-- JSON Pointer library
@package hjsonpointer
@version 0.3.0.1
module Data.Aeson.Pointer
newtype Pointer
Pointer :: [Token] -> Pointer
[_unPointer] :: Pointer -> [Token]
-- | We don't try to distinguish between integer tokens and string tokens
-- since all tokens start as strings, and all tokens can be used to
-- resolve JSON objects.
newtype Token
Token :: Text -> Token
[_unToken] :: Token -> Text
escape :: Pointer -> Text
data FormatError
-- | JSON Pointers must either be empty or start with a /.
InvalidFirstChar :: FormatError
UnescapedTilde :: FormatError
-- | JSON Pointers must either be empty or start with a /. This
-- means that if you're turning a URI Fragment into a JSON Pointer you
-- must drop the initial #.
--
-- Note that the unescaping happening here is not the same as URI
-- decoding. If you are turning a URI fragment into a JSON Pointer you
-- must URI decode the Text before using it as an argument to this
-- function. There's an example of how to do this in the tests using
-- "Network.HTTP.Types.URI.urlDecode" from http-types.
unescape :: Text -> Either FormatError Pointer
-- | For internal use by unescape.
unescapeToken :: Text -> Maybe Token
data ResolutionError
ObjectLookupFailed :: ResolutionError
ArrayIndexInvalid :: ResolutionError
ArrayElemNotFound :: ResolutionError
ExpectedObjectOrArray :: ResolutionError
resolve :: Pointer -> Value -> Either ResolutionError Value
-- | For internal use (or specialized applications that don't want to
-- resolve an entire pointer at once).
resolveToken :: Token -> Value -> Either ResolutionError Value
instance GHC.Show.Show Data.Aeson.Pointer.ResolutionError
instance GHC.Classes.Eq Data.Aeson.Pointer.ResolutionError
instance GHC.Show.Show Data.Aeson.Pointer.FormatError
instance GHC.Classes.Eq Data.Aeson.Pointer.FormatError
instance Test.QuickCheck.Arbitrary.Arbitrary Data.Aeson.Pointer.Pointer
instance GHC.Base.Monoid Data.Aeson.Pointer.Pointer
instance GHC.Show.Show Data.Aeson.Pointer.Pointer
instance GHC.Classes.Eq Data.Aeson.Pointer.Pointer
instance GHC.Show.Show Data.Aeson.Pointer.Token
instance GHC.Classes.Eq Data.Aeson.Pointer.Token
instance Data.Aeson.Types.Class.FromJSON Data.Aeson.Pointer.Pointer
instance Data.Aeson.Types.Class.ToJSON Data.Aeson.Pointer.Pointer
instance Test.QuickCheck.Arbitrary.Arbitrary Data.Aeson.Pointer.Token