Skip to content

UnescapedUtf16JsonString

Definition

Namespace: Corvus.Text.Json
Assembly: Corvus.Text.Json.dll
Source: UnescapedUtf16JsonString.cs

Represents an Unescaped UTF-16 JSON string.

public readonly struct UnescapedUtf16JsonString : IDisposable

Remarks

This uses a rented buffer to back the string, so it is disposable.

Implements

IDisposable

Constructors

Constructor Description
UnescapedUtf16JsonString(ReadOnlyMemory<char>, char[]) Initializes a new instance of the UnescapedUtf16JsonString struct.

Properties

Property Type Description
Memory ReadOnlyMemory<char> Gets the UTF-16 characters as a read-only memory.
Span ReadOnlySpan<char> Gets the UTF-16 characters as a read-only span.

Methods

Method Description
Dispose() Disposes the unescaped UTF-16 JSON string, returning any rented array pool characters.
TakeOwnership(ref char[]) Take ownership of the Shared characters, if any.

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