Skip to content

ComplexValueBuilder.AddPropertyValueFromJson Method

Definition

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

Overloads

Method Description
AddPropertyValueFromJson(ReadOnlySpan<byte>, ReadOnlySpan<char>) Parses a JSON value from the given character span and adds it as a property value to the current object.
AddPropertyValueFromJson(ReadOnlySpan<char>, ReadOnlySpan<char>) Parses a JSON value from the given character span and adds it as a property value to the current object.

AddPropertyValueFromJson(ReadOnlySpan<byte>, ReadOnlySpan<char>)

Source: ComplexValueBuilder.cs

Parses a JSON value from the given character span and adds it as a property value to the current object.

public void AddPropertyValueFromJson(ReadOnlySpan<byte> propertyName, ReadOnlySpan<char> json)

Parameters

Name Type Description
propertyName ReadOnlySpan<byte> The property name as a UTF-8 byte span.
json ReadOnlySpan<char> A span of characters containing a valid JSON value.

Exceptions

Exception Description
JsonException json does not represent a valid single JSON value.

Remarks

The parsed value is stored in a workspace-managed builder, so its lifetime is tied to the workspace. No explicit disposal is required by the caller.

Applies To

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

AddPropertyValueFromJson(ReadOnlySpan<char>, ReadOnlySpan<char>)

Source: ComplexValueBuilder.cs

Parses a JSON value from the given character span and adds it as a property value to the current object.

public void AddPropertyValueFromJson(ReadOnlySpan<char> propertyName, ReadOnlySpan<char> json)

Parameters

Name Type Description
propertyName ReadOnlySpan<char> The property name as a character span.
json ReadOnlySpan<char> A span of characters containing a valid JSON value.

Exceptions

Exception Description
JsonException json does not represent a valid single JSON value.

Remarks

The parsed value is stored in a workspace-managed builder, so its lifetime is tied to the workspace. No explicit disposal is required by the caller.

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