Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Text.Json.JsonDocument Class Referencesealed

Classes

struct  DbRow
 
struct  MetadataDb
 
struct  StackRow
 
struct  StackRowStack
 

Public Member Functions

void Dispose ()
 
void WriteTo (Utf8JsonWriter writer)
 

Static Public Member Functions

static JsonDocument Parse (ReadOnlyMemory< byte > utf8Json, JsonDocumentOptions options=default(JsonDocumentOptions))
 
static JsonDocument Parse (ReadOnlySequence< byte > utf8Json, JsonDocumentOptions options=default(JsonDocumentOptions))
 
static JsonDocument Parse (Stream utf8Json, JsonDocumentOptions options=default(JsonDocumentOptions))
 
static Task< JsonDocumentParseAsync (Stream utf8Json, JsonDocumentOptions options=default(JsonDocumentOptions), CancellationToken cancellationToken=default(CancellationToken))
 
static JsonDocument Parse (ReadOnlyMemory< char > json, JsonDocumentOptions options=default(JsonDocumentOptions))
 
static JsonDocument Parse (string json, JsonDocumentOptions options=default(JsonDocumentOptions))
 
static bool TryParseValue (ref Utf8JsonReader reader, [NotNullWhen(true)] out JsonDocument? document)
 
static JsonDocument ParseValue (ref Utf8JsonReader reader)
 

Package Functions

JsonTokenType GetJsonTokenType (int index)
 
int GetArrayLength (int index)
 
JsonElement GetArrayIndexElement (int currentIndex, int arrayIndex)
 
int GetEndIndex (int index, bool includeEndElement)
 
ReadOnlyMemory< byte > GetRootRawValue ()
 
ReadOnlyMemory< byte > GetRawValue (int index, bool includeQuotes)
 
string GetString (int index, JsonTokenType expectedType)
 
bool TextEquals (int index, ReadOnlySpan< char > otherText, bool isPropertyName)
 
bool TextEquals (int index, ReadOnlySpan< byte > otherUtf8Text, bool isPropertyName, bool shouldUnescape)
 
string GetNameOfPropertyValue (int index)
 
bool TryGetValue (int index, [NotNullWhen(true)] out byte[] value)
 
bool TryGetValue (int index, out sbyte value)
 
bool TryGetValue (int index, out byte value)
 
bool TryGetValue (int index, out short value)
 
bool TryGetValue (int index, out ushort value)
 
bool TryGetValue (int index, out int value)
 
bool TryGetValue (int index, out uint value)
 
bool TryGetValue (int index, out long value)
 
bool TryGetValue (int index, out ulong value)
 
bool TryGetValue (int index, out double value)
 
bool TryGetValue (int index, out float value)
 
bool TryGetValue (int index, out decimal value)
 
bool TryGetValue (int index, out DateTime value)
 
bool TryGetValue (int index, out DateTimeOffset value)
 
bool TryGetValue (int index, out Guid value)
 
string GetRawValueAsString (int index)
 
string GetPropertyRawValueAsString (int valueIndex)
 
JsonElement CloneElement (int index)
 
void WriteElementTo (int index, Utf8JsonWriter writer)
 
bool TryGetNamedPropertyValue (int index, ReadOnlySpan< char > propertyName, out JsonElement value)
 
bool TryGetNamedPropertyValue (int index, ReadOnlySpan< byte > propertyName, out JsonElement value)
 

Static Package Functions

static JsonDocument ParseRented (PooledByteBufferWriter utf8Json, JsonDocumentOptions options=default(JsonDocumentOptions))
 
static JsonDocument ParseValue (Stream utf8Json, JsonDocumentOptions options)
 
static JsonDocument ParseValue (ReadOnlySpan< byte > utf8Json, JsonDocumentOptions options)
 
static JsonDocument ParseValue (string json, JsonDocumentOptions options)
 
static JsonDocument ParseValue (ReadOnlyMemory< char > json, JsonDocumentOptions options)
 
static bool TryParseValue (ref Utf8JsonReader reader, [NotNullWhen(true)] out JsonDocument document, bool shouldThrow, bool useArrayPools)
 

Properties

bool IsDisposable [get]
 
JsonElement RootElement [get]
 

Private Member Functions

 JsonDocument (ReadOnlyMemory< byte > utf8Json, MetadataDb parsedData, byte[] extraRentedArrayPoolBytes=null, PooledByteBufferWriter extraPooledByteBufferWriter=null, bool isDisposable=true)
 
ReadOnlyMemory< byte > GetPropertyRawValue (int valueIndex)
 
void WriteComplexElement (int index, Utf8JsonWriter writer)
 
ReadOnlySpan< byte > UnescapeString (in DbRow row, out ArraySegment< byte > rented)
 
void WritePropertyName (in DbRow row, Utf8JsonWriter writer)
 
void WriteString (in DbRow row, Utf8JsonWriter writer)
 
void CheckNotDisposed ()
 
void CheckExpectedType (JsonTokenType expected, JsonTokenType actual)
 
bool TryGetNamedPropertyValue (int startIndex, int endIndex, ReadOnlySpan< byte > propertyName, out JsonElement value)
 

Static Private Member Functions

static void ClearAndReturn (ArraySegment< byte > rented)
 
static void Parse (ReadOnlySpan< byte > utf8JsonSpan, JsonReaderOptions readerOptions, ref MetadataDb database, ref StackRowStack stack)
 
static void CheckSupportedOptions (JsonReaderOptions readerOptions, string paramName)
 
static async Task< JsonDocumentParseAsyncCore (Stream utf8Json, JsonDocumentOptions options=default(JsonDocumentOptions), CancellationToken cancellationToken=default(CancellationToken))
 
static JsonDocument CreateForLiteral (JsonTokenType tokenType)
 
static JsonDocument Parse (ReadOnlyMemory< byte > utf8Json, JsonReaderOptions readerOptions, byte[] extraRentedArrayPoolBytes=null, PooledByteBufferWriter extraPooledByteBufferWriter=null)
 
static JsonDocument ParseUnrented (ReadOnlyMemory< byte > utf8Json, JsonReaderOptions readerOptions, JsonTokenType tokenType=JsonTokenType.None)
 
static ArraySegment< byte > ReadToEnd (Stream stream)
 
static async ValueTask< ArraySegment< byte > > ReadToEndAsync (Stream stream, CancellationToken cancellationToken)
 

Private Attributes

ReadOnlyMemory< byte > _utf8Json
 
MetadataDb _parsedData
 
byte[] _extraRentedArrayPoolBytes
 
bool _hasExtraRentedArrayPoolBytes
 
PooledByteBufferWriter _extraPooledByteBufferWriter
 
bool _hasExtraPooledByteBufferWriter
 
 int
 
string _lastIndexAndString = (-1, null)
 

Static Private Attributes

static JsonDocument s_nullLiteral
 
static JsonDocument s_trueLiteral
 
static JsonDocument s_falseLiteral
 

Detailed Description

Definition at line 11 of file JsonDocument.cs.


The documentation for this class was generated from the following file: