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

◆ Parse() [6/7]

static JsonDocument System.Text.Json.JsonDocument.Parse ( Stream utf8Json,
JsonDocumentOptions options = default(JsonDocumentOptions) )
inlinestatic

Definition at line 1107 of file JsonDocument.cs.

1108 {
1109 if (utf8Json == null)
1110 {
1111 throw new ArgumentNullException("utf8Json");
1112 }
1113 ArraySegment<byte> segment = ReadToEnd(utf8Json);
1114 try
1115 {
1116 return Parse(segment.AsMemory(), options.GetReaderOptions(), segment.Array);
1117 }
1118 catch
1119 {
1120 segment.AsSpan().Clear();
1121 ArrayPool<byte>.Shared.Return(segment.Array);
1122 throw;
1123 }
1124 }
static ArrayPool< T > Shared
Definition ArrayPool.cs:7
static ArraySegment< byte > ReadToEnd(Stream stream)
static void Parse(ReadOnlySpan< byte > utf8JsonSpan, JsonReaderOptions readerOptions, ref MetadataDb database, ref StackRowStack stack)

References System.Text.Json.Dictionary, System.options, System.Text.Json.JsonDocument.Parse(), System.Text.Json.JsonDocument.ReadToEnd(), and System.Buffers.ArrayPool< T >.Shared.