-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | XPath-like syntax for querying JSON
--   
--   JPath is XPath-inspired query language to query JSON data.
@package hjpath
@version 3.0.1


-- | I wanted to insert a description here, but got tired fighting with
--   haddock escaping. Documentation:
--   <a>http://bitcheese.net/wiki/code/hjpath</a>
module Text.JSON.JPath

-- | Evaluates JPath query on JSON String
jPath :: (HJsonLike j, QueryLike q) => q -> j -> [j]

-- | Modifies JSON content under JPath expression
jPathModify :: (HJsonLike j, QueryLike q) => q -> (Json -> Json) -> j -> j

-- | JPath query building blocks
data QueryElement

-- | Look up element in object
ObjectLookup :: String -> QueryElement

-- | Look up array element (from 0 forward or from -1 backward)
ArrayLookup :: Integer -> QueryElement

-- | Matches any child element (array or hash entries)
WildcardLookup :: QueryElement

-- | Matches any number of child entries
DeepLookup :: QueryElement

-- | Class that allows type to be used as JSON, all you need to implement
--   is converting to and from Text.HJson.Json
class HJsonLike a

-- | Class that allows type to be used as JPath query
class QueryLike a
instance GHC.Show.Show Text.JSON.JPath.QueryElement
instance Text.JSON.JPath.HJsonLike GHC.Base.String
instance Text.JSON.JPath.HJsonLike Text.HJson.Json
instance Text.JSON.JPath.QueryLike GHC.Base.String
instance Text.JSON.JPath.QueryLike Text.JSON.JPath.QueryElement
instance Text.JSON.JPath.QueryLike [Text.JSON.JPath.QueryElement]
