Skip to content

IJsonDocument.TryGetNamedPropertyValue Method

Definition

Namespace: Corvus.Text.Json.Internal
Assembly: Corvus.Text.Json.dll

Overloads

Method Description
TryGetNamedPropertyValue(int, ReadOnlySpan<char>, ref JsonElement) Tries to get the value of a named property as a JSON element.
TryGetNamedPropertyValue(int, ReadOnlySpan<byte>, ref JsonElement) Tries to get the value of a named property as a JSON element.
TryGetNamedPropertyValue(int, ReadOnlySpan<byte>, ref TElement) Tries to get the value of a named property as a JSON element.
TryGetNamedPropertyValue(int, ReadOnlySpan<char>, ref TElement) Tries to get the value of a named property as a JSON element.
TryGetNamedPropertyValue(int, ReadOnlySpan<char>, ref IJsonDocument, ref int) Tries to get the value of a named property as a mutable JSON element.
TryGetNamedPropertyValue(int, ReadOnlySpan<byte>, ref IJsonDocument, ref int) Tries to get the value of a named property as a mutable JSON element.

TryGetNamedPropertyValue(int, ReadOnlySpan<char>, ref JsonElement)

Source: IJsonDocument.cs

Tries to get the value of a named property as a JSON element.

public abstract bool TryGetNamedPropertyValue(int index, ReadOnlySpan<char> propertyName, ref JsonElement value)

Parameters

Name Type Description
index int The index of the element.
propertyName ReadOnlySpan<char> The name of the property.
value ref JsonElement The value of the property.

Returns

bool

true if the property value was retrieved; otherwise, false.

Applies To

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

TryGetNamedPropertyValue(int, ReadOnlySpan<byte>, ref JsonElement)

Source: IJsonDocument.cs

Tries to get the value of a named property as a JSON element.

public abstract bool TryGetNamedPropertyValue(int index, ReadOnlySpan<byte> propertyName, ref JsonElement value)

Parameters

Name Type Description
index int The index of the element.
propertyName ReadOnlySpan<byte> The name of the property.
value ref JsonElement The value of the property.

Returns

bool

true if the property value was retrieved; otherwise, false.

Applies To

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

TryGetNamedPropertyValue(int, ReadOnlySpan<byte>, ref TElement)

Source: IJsonDocument.cs

Tries to get the value of a named property as a JSON element.

public abstract bool TryGetNamedPropertyValue<TElement>(int index, ReadOnlySpan<byte> propertyName, ref TElement value)
    where TElement : struct, IJsonElement<TElement>

Type Parameters

Parameter Description
TElement The type of the JSON element.

Parameters

Name Type Description
index int The index of the element.
propertyName ReadOnlySpan<byte> The name of the property.
value ref TElement The value of the property.

Returns

bool

true if the property value was retrieved; otherwise, false.

Applies To

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

TryGetNamedPropertyValue(int, ReadOnlySpan<char>, ref TElement)

Source: IJsonDocument.cs

Tries to get the value of a named property as a JSON element.

public abstract bool TryGetNamedPropertyValue<TElement>(int index, ReadOnlySpan<char> propertyName, ref TElement value)
    where TElement : struct, IJsonElement<TElement>

Type Parameters

Parameter Description
TElement The type of the JSON element.

Parameters

Name Type Description
index int The index of the element.
propertyName ReadOnlySpan<char> The name of the property.
value ref TElement The value of the property.

Returns

bool

true if the property value was retrieved; otherwise, false.

Applies To

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

TryGetNamedPropertyValue(int, ReadOnlySpan<char>, ref IJsonDocument, ref int)

Source: IJsonDocument.cs

Tries to get the value of a named property as a mutable JSON element.

public abstract bool TryGetNamedPropertyValue(int index, ReadOnlySpan<char> propertyName, ref IJsonDocument elementParent, ref int elementIndex)

Parameters

Name Type Description
index int The index of the element.
propertyName ReadOnlySpan<char> The name of the property.
elementParent ref IJsonDocument The parent document of the retrieved value.
elementIndex ref int The index of the retrieved value in the parent document.

Returns

bool

true if the property value was retrieved; otherwise, false.

Applies To

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

TryGetNamedPropertyValue(int, ReadOnlySpan<byte>, ref IJsonDocument, ref int)

Source: IJsonDocument.cs

Tries to get the value of a named property as a mutable JSON element.

public abstract bool TryGetNamedPropertyValue(int index, ReadOnlySpan<byte> propertyName, ref IJsonDocument elementParent, ref int elementIndex)

Parameters

Name Type Description
index int The index of the element.
propertyName ReadOnlySpan<byte> The name of the property.
elementParent ref IJsonDocument The parent document of the retrieved value.
elementIndex ref int The index of the retrieved value in the parent document.

Returns

bool

true if the property value was retrieved; otherwise, false.

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