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

◆ ValidateEnd()

void System.Text.Json.Utf8JsonWriter.ValidateEnd ( byte token)
inlineprivate

Definition at line 511 of file Utf8JsonWriter.cs.

512 {
513 if (_bitStack.CurrentDepth <= 0 || _tokenType == JsonTokenType.PropertyName)
514 {
515 ThrowHelper.ThrowInvalidOperationException(ExceptionResource.MismatchedObjectArray, 0, token, _tokenType);
516 }
517 if (token == 93)
518 {
519 if (_inObject)
520 {
521 ThrowHelper.ThrowInvalidOperationException(ExceptionResource.MismatchedObjectArray, 0, token, _tokenType);
522 }
523 }
524 else if (!_inObject)
525 {
526 ThrowHelper.ThrowInvalidOperationException(ExceptionResource.MismatchedObjectArray, 0, token, _tokenType);
527 }
529 }

References System.Text.Json.Utf8JsonWriter._bitStack, System.Text.Json.Utf8JsonWriter._inObject, System.Text.Json.Utf8JsonWriter._tokenType, System.Text.Json.BitStack.CurrentDepth, System.Text.Json.BitStack.Pop(), and System.Text.Json.ThrowHelper.ThrowInvalidOperationException().

Referenced by System.Text.Json.Utf8JsonWriter.WriteEndSlow().