IJsonDocument.TryGetNamedPropertyValue Method
Definition
Namespace: Corvus.Text.Json.Internal
Assembly: Corvus.Text.Json.dll
Overloads
| Method | Description |
|---|---|
| TryGetNamedPropertyValue(int, ReadOnlySpan<char>, JsonElement) | Tries to get the value of a named property as a JSON element. |
| TryGetNamedPropertyValue(int, ReadOnlySpan<byte>, JsonElement) | Tries to get the value of a named property as a JSON element. |
| TryGetNamedPropertyValue(int, ReadOnlySpan<byte>, TElement) | Tries to get the value of a named property as a JSON element. |
| TryGetNamedPropertyValue(int, ReadOnlySpan<char>, TElement) | Tries to get the value of a named property as a JSON element. |
| TryGetNamedPropertyValue(int, ReadOnlySpan<char>, IJsonDocument?, int) | Tries to get the value of a named property as a mutable JSON element. |
| TryGetNamedPropertyValue(int, ReadOnlySpan<byte>, IJsonDocument?, int) | Tries to get the value of a named property as a mutable JSON element. |
TryGetNamedPropertyValue(int, ReadOnlySpan<char>, 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, out JsonElement value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
propertyName |
ReadOnlySpan<char> |
The name of the property. |
value |
JsonElement |
The value of the property. |
Returns
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>, 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, out JsonElement value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
propertyName |
ReadOnlySpan<byte> |
The name of the property. |
value |
JsonElement |
The value of the property. |
Returns
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>, 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, out 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 |
TElement |
The value of the property. |
Returns
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>, 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, out 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 |
TElement |
The value of the property. |
Returns
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>, IJsonDocument?, 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, out IJsonDocument? elementParent, out int elementIndex)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
propertyName |
ReadOnlySpan<char> |
The name of the property. |
elementParent |
IJsonDocument? |
The parent document of the retrieved value. |
elementIndex |
int |
The index of the retrieved value in the parent document. |
Returns
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>, IJsonDocument?, 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, out IJsonDocument? elementParent, out int elementIndex)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
propertyName |
ReadOnlySpan<byte> |
The name of the property. |
elementParent |
IJsonDocument? |
The parent document of the retrieved value. |
elementIndex |
int |
The index of the retrieved value in the parent document. |
Returns
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