Skip to content

ParsedJsonDocumentBuilder.Rent Method

Definition

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

Rent(int)

Rents a builder from the thread-local cache, ready to receive a value via ComplexValueBuilder and SetAndDispose.

public static ParsedJsonDocumentBuilder Rent(int initialValueBufferSize)

Parameters

Name Type Description
initialValueBufferSize int The initial size in bytes of the document text buffer. (optional)

Returns

ParsedJsonDocumentBuilder

A rented ParsedJsonDocumentBuilder. Always dispose the builder; disposal is idempotent, so this is safe whether or not ToParsedJsonDocument completed the handoff.

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