-- 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 -- | I wanted to insert a description here, but got tired fighting with -- haddock escaping. Documentation: -- http://bitcheese.net/wiki/code/hjpath 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 data Json :: * JString :: String -> Json JNumber :: Rational -> Json JObject :: Map String Json -> Json JBool :: Bool -> Json JNull :: Json JArray :: [Json] -> Json -- | 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 Show QueryElement instance HJsonLike Json instance HJsonLike String instance QueryLike [QueryElement] instance QueryLike QueryElement instance QueryLike String