Skip to content

FixedJsonValueDocument<T>.ForUnescapedString Method

Definition

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

Overloads

Method Description
ForUnescapedString(ReadOnlySpan<char>) Creates a FixedJsonValueDocument for a string value from an unescaped char span. JSON escaping and surrounding quotes are applie...
ForUnescapedString(ReadOnlySpan<byte>) Creates a FixedJsonValueDocument for a string value from an unescaped UTF-8 span. JSON escaping and surrounding quotes are appli...

ForUnescapedString(ReadOnlySpan<char>)

Source: FixedJsonValueDocument.cs

Creates a FixedJsonValueDocument for a string value from an unescaped char span. JSON escaping and surrounding quotes are applied automatically.

public static FixedJsonValueDocument<T> ForUnescapedString(ReadOnlySpan<char> value)

Parameters

Name Type Description
value ReadOnlySpan<char> The raw, unescaped string content (no surrounding quotes).

Returns

FixedJsonValueDocument<T>

A pooled document instance wrapping the string value.

Applies To

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

ForUnescapedString(ReadOnlySpan<byte>)

Source: FixedJsonValueDocument.cs

Creates a FixedJsonValueDocument for a string value from an unescaped UTF-8 span. JSON escaping and surrounding quotes are applied automatically.

public static FixedJsonValueDocument<T> ForUnescapedString(ReadOnlySpan<byte> utf8Value)

Parameters

Name Type Description
utf8Value ReadOnlySpan<byte> The raw, unescaped UTF-8 string content (no surrounding quotes).

Returns

FixedJsonValueDocument<T>

A pooled document instance wrapping the string 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