JsonDocument.TryGetRawSpans Method
Definition
Namespace: Corvus.Text.Json.Internal
Assembly: Corvus.Text.Json.dll
Source: JsonDocument.cs
TryGetRawSpans(ReadOnlyMemory<byte>, ReadOnlySpan<byte>, ReadOnlySpan<byte>)
Tries to get direct access to the document's rows and UTF-8 text as spans, for documents whose rows are all local: the spans an evaluation reads, built without going through ReadOnlyMemory, and the text as memory for the values it hands on. Valid until the document is disposed or mutated.
public virtual bool TryGetRawSpans(out ReadOnlyMemory<byte> utf8Memory, out ReadOnlySpan<byte> rows, out ReadOnlySpan<byte> utf8)
Parameters
| Name | Type | Description |
|---|---|---|
utf8Memory |
ReadOnlyMemory<byte> |
The UTF-8 text as memory. |
rows |
ReadOnlySpan<byte> |
The metadata rows. |
utf8 |
ReadOnlySpan<byte> |
The UTF-8 text the rows index into. |
Returns
true if direct access is available for this document type.
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