JPathExtensions
Namespace: SnowBank.Data.Json · class
Extensions methods for working with JPathQuery
Methods
Find
static JsonValue Find(JsonValue root, string queryText)
Returns the first node that matched the given JPath expression
root— Root node of the queryqueryText— JPath expression
Returns: First matching node, or Missing if none matches the query
static JsonValue Find(JsonValue root, JPathQuery query)
Returns the first node that matched the given JPath query
root— Root node of the queryquery— JPath query
Returns: First matching node, or Missing if none matches the query
FindAll
static List<JsonValue> FindAll(JsonValue root, string queryText)
Returns the list of all the nodes that match the given JPath expression
root— Root node of the queryqueryText— JPath expression
Returns: List of all matching nodes, or empty list if none matches the query
static List<JsonValue> FindAll(JsonValue root, JPathQuery query)
Returns the list of all the nodes that match the given JPath query
root— Root node of the queryquery— JPath query
Returns: List of all matching nodes, or empty list if none matches the query