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

◆ ValidateStateAtEndOfData()

bool System.Text.Json.Utf8JsonReader.ValidateStateAtEndOfData ( )
inlineprivate

Definition at line 2090 of file Utf8JsonReader.cs.

2091 {
2092 if (_bitStack.CurrentDepth != 0)
2093 {
2094 ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ZeroDepthAtEnd, 0);
2095 }
2096 if (_readerOptions.CommentHandling == JsonCommentHandling.Allow && _tokenType == JsonTokenType.Comment)
2097 {
2098 return false;
2099 }
2100 if (_tokenType != JsonTokenType.EndArray && _tokenType != JsonTokenType.EndObject)
2101 {
2102 ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidEndOfJsonNonPrimitive, 0);
2103 }
2104 return true;
2105 }

References System.Text.Json.Utf8JsonReader._bitStack, System.Text.Json.Utf8JsonReader._readerOptions, System.Text.Json.Utf8JsonReader._tokenType, System.Text.Json.JsonReaderOptions.CommentHandling, System.Text.Json.BitStack.CurrentDepth, System.Text.Json.Dictionary, and System.Text.Json.ThrowHelper.ThrowJsonReaderException().

Referenced by System.Text.Json.Utf8JsonReader.HasMoreDataMultiSegment().