Skip to content

IJsonDocument.TryFindNextDescendantPropertyValue Method

Definition

Namespace: Corvus.Text.Json.Internal
Assembly: Corvus.Text.Json.dll
Source: IJsonDocument.cs

TryFindNextDescendantPropertyValue(int, ref int, ReadOnlySpan<byte>, ref int)

Advances a linear scan over the subtree rooted at the element at elementIndex, returning the next property value whose unescaped name matches utf8PropertyName.

public abstract bool TryFindNextDescendantPropertyValue(int elementIndex, ref int scanIndex, ReadOnlySpan<byte> utf8PropertyName, ref int valueIndex)

Parameters

Name Type Description
elementIndex int The index of the root element of the subtree to scan.
scanIndex ref int On entry, the current scan cursor (initialize to elementIndex + DbRow.Size before the first call). On exit, updated so the next call resumes where this one left off.
utf8PropertyName ReadOnlySpan<byte> The unescaped UTF-8 property name to search for.
valueIndex ref int When this method returns true, the metadata-DB index of the matched property's value. When it returns false, set to -1.

Returns

bool

true if a matching property was found; false if the scan is complete.

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