RawDocumentAccess
Definition
Namespace: Corvus.Text.Json.Internal
Assembly: Corvus.Text.Json.dll
Source: RawDocumentAccess.cs
Direct, non-virtual access to the metadata rows and UTF-8 text of a document whose rows are all local (a ParsedJsonDocument). Obtained once per operation from TryGetRawAccess; every accessor here is a couple of loads with no disposal check, so callers must not outlive the document.
public readonly struct RawDocumentAccess
Remarks
Indices are the same row indices used throughout IJsonDocument. A simple value occupies one row; an object or array occupies GetNumberOfRows rows followed by its end row.
Methods
| Method | Description |
|---|---|
| GetEndIndex(int) | Gets the index of a container's end row. |
| GetFirstItemIndex(int) | Gets the index of the first property value (for objects) or item (for arrays) of a container. |
| GetNextIndex(int) | Gets the index of the row following the element (its next sibling, or the parent's end row). |
| GetNumberOfRows(int) | Gets the number of rows occupied by a container, excluding its end row. |
| GetPropertyNameRaw(int) | Gets the raw property name text for a property value index (the name row precedes the value row). |
| GetRawValue(int) | Gets the raw UTF-8 text of a simple value (for strings and property names, without quotes and without unescaping; check... |
| GetRawValueMemory(int) | Gets the raw UTF-8 text of a simple value as memory (see GetRawValue). |
| GetSizeOrLength(int) | Gets the byte length of a simple value, or the number of properties/items of a container. |
| GetTokenType(int) | Gets the token type of the element at the index. |
| IsEscaped(int) | Gets a value indicating whether a string or property name contains escape sequences. |
| PropertyNameIsEscaped(int) | Gets a value indicating whether the property name for a value index contains escape sequences. |
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