Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetRawValue()

ReadOnlyMemory< byte > System.Text.Json.JsonDocument.GetRawValue ( int index,
bool includeQuotes )
inlinepackage

Definition at line 419 of file JsonDocument.cs.

420 {
422 DbRow dbRow = _parsedData.Get(index);
423 if (dbRow.IsSimpleValue)
424 {
425 if (includeQuotes && dbRow.TokenType == JsonTokenType.String)
426 {
427 return _utf8Json.Slice(dbRow.Location - 1, dbRow.SizeOrLength + 2);
428 }
429 return _utf8Json.Slice(dbRow.Location, dbRow.SizeOrLength);
430 }
432 int location = dbRow.Location;
434 return _utf8Json.Slice(location, dbRow.Location - location + dbRow.SizeOrLength);
435 }
int GetEndIndex(int index, bool includeEndElement)
ReadOnlyMemory< byte > _utf8Json
ReadOnlyMemory< T > Slice(int start)

References System.Text.Json.JsonDocument._parsedData, System.Text.Json.JsonDocument._utf8Json, System.Text.Json.JsonDocument.CheckNotDisposed(), System.Text.Json.Dictionary, System.endIndex, System.Text.Json.JsonDocument.MetadataDb.Get(), System.Text.Json.JsonDocument.GetEndIndex(), System.index, and System.ReadOnlyMemory< T >.Slice().

Referenced by System.Text.Json.JsonDocument.CloneElement(), System.Text.Json.JsonElement.GetRawValue(), System.Text.Json.JsonDocument.GetRawValueAsString(), and System.Text.Json.JsonDocument.GetRootRawValue().