JsonPathResult<TValue> Class

Represents the result of evaluating a JSONPath expression against a custom object model. Contains the ordered list of matched nodes.

public sealed class JsonPathResult<TValue> : IEnumerable<JsonPathMatch<TValue>>, IReadOnlyCollection<JsonPathMatch<TValue>>, IReadOnlyList<JsonPathMatch<TValue>>, IEnumerable

Type parameters

TValue
The node type used by the JSONPath navigator.
Implements

Properties

NameDescription
CountGets the number of elements in the collection.

Gets the number of elements in the collection.

public int Count { get; }

Property value

int

Indexers

NameDescription
this[int]Gets the element at the specified index in the read-only list.

Gets the element at the specified index in the read-only list.

public JsonPathMatch<TValue> this[int index] { get; }

Parameters

index int
The zero-based index of the element to get.

Property value

JsonPathMatch<TValue>

Methods

NameDescription
GetEnumerator()Returns an enumerator that iterates through the collection.
System.Collections.IEnumerable.GetEnumerator()Returns an enumerator that iterates through a collection.

GetEnumerator()

JsonPathResult`1.cs

Returns an enumerator that iterates through the collection.

public IEnumerator<JsonPathMatch<TValue>> GetEnumerator()

Returns

IEnumerator<JsonPathMatch<TValue>> An enumerator that can be used to iterate through the collection.

System.Collections.IEnumerable.GetEnumerator()

JsonPathResult`1.cs

Returns an enumerator that iterates through a collection.

IEnumerator IEnumerable.GetEnumerator()

Returns

IEnumerator An IEnumerator object that can be used to iterate through the collection.