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

◆ Parse() [3/7]

static JsonDocument System.Text.Json.JsonDocument.Parse ( ReadOnlyMemory< char > json,
JsonDocumentOptions options = default(JsonDocumentOptions) )
inlinestatic

Definition at line 1177 of file JsonDocument.cs.

1178 {
1179 ReadOnlySpan<char> span = json.Span;
1180 int utf8ByteCount = JsonReaderHelper.GetUtf8ByteCount(span);
1182 try
1183 {
1184 int utf8FromText = JsonReaderHelper.GetUtf8FromText(span, array);
1185 return Parse(array.AsMemory(0, utf8FromText), options.GetReaderOptions(), array);
1186 }
1187 catch
1188 {
1189 array.AsSpan(0, utf8ByteCount).Clear();
1191 throw;
1192 }
1193 }
static ArrayPool< T > Shared
Definition ArrayPool.cs:7
static void Parse(ReadOnlySpan< byte > utf8JsonSpan, JsonReaderOptions readerOptions, ref MetadataDb database, ref StackRowStack stack)

References System.array, System.Text.Json.Dictionary, System.Text.Json.JsonReaderHelper.GetUtf8ByteCount(), System.Text.Json.JsonReaderHelper.GetUtf8FromText(), System.options, System.Text.Json.JsonDocument.Parse(), and System.Buffers.ArrayPool< T >.Shared.