Skip to content

FixedJsonValueDocument<T>.ForNumberFromSpan Method

Definition

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

ForNumberFromSpan(ReadOnlySpan<byte>)

Creates a FixedJsonValueDocument for a number value from a span, copying the data into the document's internal buffer (zero heap allocation).

public static FixedJsonValueDocument<T> ForNumberFromSpan(ReadOnlySpan<byte> rawUtf8Number)

Parameters

Name Type Description
rawUtf8Number ReadOnlySpan<byte> The raw UTF-8 number bytes (unquoted). Must be <= 64 bytes.

Returns

FixedJsonValueDocument<T>

A pooled document instance wrapping the number value.

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