Home JsonPathIdentifier Class
JsonPathIdentifier Class
Cancel

JsonPathIdentifier Class

Namespace: Json.Schema.Data.Keywords

Inheritance: JsonPathIdentifier 🡒 object

Implemented interfaces:

  • IDataResourceIdentifier

Handles data references that are JSON Paths.

Properties

NameTypeSummary
QueryJsonPathGets the JSON Path query.

Constructors

JsonPathIdentifier(JsonPath query)

Creates a new Json.Schema.Data.Keywords.JsonPathIdentifier.

Declaration

1
public JsonPathIdentifier(JsonPath query)
ParameterTypeDescription
queryJsonPath 

Methods

TryResolve(JsonElement root, out JsonElement value)

Attempts to resolve a value from the specified JSON element.

Declaration

1
public bool TryResolve(JsonElement root, out JsonElement value)
ParameterTypeDescription
rootJsonElementThe root System.Text.Json.JsonElement to search for the desired value.
valueout JsonElementWhen this method returns, contains the resolved System.Text.Json.JsonElement if the operation succeeds; otherwise,

Returns

true if the value was successfully resolved; otherwise, false.

Contents