Skip to content

ParsedJsonDocumentBuilder.ToParsedJsonDocument Method

Definition

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

ToParsedJsonDocument()

Hands off the built value as a new, self-contained ParsedJsonDocument, and disposes this builder (returning it to the pool).

public ParsedJsonDocument<TElement> ToParsedJsonDocument<TElement>()
    where TElement : struct, IJsonElement<TElement>

Type Parameters

Parameter Description
TElement The element type of the resulting document.

Returns

ParsedJsonDocument<TElement>

A ParsedJsonDocument owning pooled memory. The caller must dispose it.

Exceptions

Exception Description
InvalidOperationException The builder has not been initialized with a value.
ObjectDisposedException The builder has been disposed.

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