hjpath-3.0.1: XPath-like syntax for querying JSON

Text.JSON.JPath

Description

I wanted to insert a description here, but got tired fighting with haddock escaping. Documentation: http://bitcheese.net/wiki/code/hjpath

Synopsis

Documentation

jPathSource

Arguments

:: (HJsonLike j, QueryLike q) 
=> q

JPath query

-> j

JSON

-> [j]

Results

Evaluates JPath query on JSON String

jPathModifySource

Arguments

:: (HJsonLike j, QueryLike q) 
=> q

JPath query

-> (Json -> Json)

modifier function

-> j

JSON

-> j

Modified JSON

Modifies JSON content under JPath expression

data QueryElement Source

JPath query building blocks

Constructors

ObjectLookup String

Look up element in object

ArrayLookup Integer

Look up array element (from 0 forward or from -1 backward)

WildcardLookup

Matches any child element (array or hash entries)

DeepLookup

Matches any number of child entries

class HJsonLike a Source

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

class QueryLike a Source

Class that allows type to be used as JPath query