Skip to content

JsonWorkspace.RentWriterAndBuffer Method

Definition

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

Overloads

Method Description
RentWriterAndBuffer(int, ref IByteBufferWriter) Rents a UTF-8 JSON writer and associated buffer writer from the pool.
RentWriterAndBuffer(JsonWriterOptions, int, ref IByteBufferWriter) Rents a UTF-8 JSON writer and associated buffer writer from the pool, using the specified writer options instead of the workspace defaults.

RentWriterAndBuffer(int, ref IByteBufferWriter)

Source: JsonWorkspace.cs

Rents a UTF-8 JSON writer and associated buffer writer from the pool.

public Utf8JsonWriter RentWriterAndBuffer(int defaultBufferSize, ref IByteBufferWriter bufferWriter)

Parameters

Name Type Description
defaultBufferSize int The default buffer size to use for the buffer writer.
bufferWriter ref IByteBufferWriter When this method returns, contains the rented buffer writer.

Returns

Utf8JsonWriter

A rented UTF-8 JSON writer configured with the workspace options.

Applies To

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

RentWriterAndBuffer(JsonWriterOptions, int, ref IByteBufferWriter)

Source: JsonWorkspace.cs

Rents a UTF-8 JSON writer and associated buffer writer from the pool, using the specified writer options instead of the workspace defaults.

public Utf8JsonWriter RentWriterAndBuffer(JsonWriterOptions options, int defaultBufferSize, ref IByteBufferWriter bufferWriter)

Parameters

Name Type Description
options JsonWriterOptions The writer options to configure the returned writer instance.
defaultBufferSize int The default buffer size to use for the buffer writer.
bufferWriter ref IByteBufferWriter When this method returns, contains the rented buffer writer.

Returns

Utf8JsonWriter

A rented UTF-8 JSON writer configured with the specified options.

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