Skip to content

DescendantPropertyEnumerator

Definition

Namespace: Corvus.Text.Json
Assembly: Corvus.Text.Json.dll
Source: DescendantPropertyEnumerator.cs

A zero-allocation enumerator that yields every value in the subtree whose containing property has the specified name.

public readonly struct DescendantPropertyEnumerator

Remarks

The scan is flat: it walks the metadata DB row by row without recursion or enumerator construction, yielding every PropertyName token whose unescaped name equals the target. Values are returned as JsonElement instances pointing at the row immediately after the matching property name. Create via EnumerateDescendantProperties.

Properties

Property Type Description
Current JsonElement Gets the current matched value element.

Methods

Method Description
GetEnumerator() Returns this instance as its own enumerator (supports foreach).
MoveNext() Advances to the next matching descendant property value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests.

Open an issue