JsonElement.GetUtf16String Method
Definition
Namespace: Corvus.Text.Json
Assembly: Corvus.Text.Json.dll
Source: JsonElement.cs
GetUtf16String()
Gets the value of the element as a UnescapedUtf16JsonString.
public UnescapedUtf16JsonString GetUtf16String()
Returns
The value of the element as an UnescapedUtf16JsonString.
Exceptions
| Exception | Description |
|---|---|
InvalidOperationException |
This value's ValueKind is neither String nor Null. |
ObjectDisposedException |
The parent JsonDocument has been disposed. |
Remarks
The UnescapedUtf16JsonString should be disposed when it is finished with, as it may have rented storage to provide the unescaped value. It is only valid for as long as the source JsonElement is valid.
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