Skip to content

ComplexValueBuilder.Apply Method

Definition

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

Apply(ref T)

Apply an object instance value to the document.

public void Apply<T>(ref T value)
    where T : struct, IJsonElement<T>

Type Parameters

Parameter Description
T The type of the value.

Parameters

Name Type Description
value ref T The value to apply.

Exceptions

Exception Description
InvalidOperationException Thrown if the value is not a JSON object.

Remarks

The value must be a JSON object. Its properties will be set on the current document, replacing any existing values if present.

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