JPathQuery

Namespace: SnowBank.Data.Json.JPath · class

Represents a query in a JSON Document

Properties

Expression

JPathExpression Expression { get; }

Parse expression that represents this query

Text

string Text { get; }

Original text of this query

Methods

FirstOrDefault

JsonValue FirstOrDefault(JsonValue root)

Return the first value that match this query, or Missing if no match was found

static JsonValue FirstOrDefault(JsonValue root, string queryText)

Return the first value that match the given JPath query, or Missing if no match was found

static JsonValue FirstOrDefault(JsonValue root, JPathExpression expression)

Return the first value that match the given JPath expression, or Missing if no match was found

GetHashCode

int GetHashCode()

Parse

static JPathQuery Parse(string queryText)

Parse the given JPath query

ParseExpression

static JPathExpression ParseExpression(string queryText)

Parse the given JPath expression

Select

IEnumerable<JsonValue> Select(JsonValue root)

Return all the nodes that match this query, or an empty sequence if no match was found

static IEnumerable<JsonValue> Select(JsonValue root, string queryText)

Returns all the nodes that match the given JPath query, or an empty sequence if no match was found

static IEnumerable<JsonValue> Select(JsonValue root, JPathExpression expression)

Return all the nodes that match the given JPath expression

ToString

string ToString()