219 references to ExceptionResource
System.Text.Json (219)
System\Text\Json\Document\JsonDocument.Parse.cs (3)
460ExceptionResource.ExpectedJsonTokens); 486ExceptionResource.ExpectedJsonTokens); 608ExceptionResource.ExpectedStartOfValueNotFound,
System\Text\Json\Reader\Utf8JsonReader.cs (70)
286ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedJsonTokens); 742ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ObjectDepthTooLarge); 756ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.MismatchedObjectArray, JsonConstants.CloseBrace); 762ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeObjectEnd); 776ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ArrayDepthTooLarge); 790ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.MismatchedObjectArray, JsonConstants.CloseBracket); 796ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeArrayEnd); 865ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 925ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ZeroDepthAtEnd); 935ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidEndOfJsonNonPrimitive); 947private bool HasMoreData(ExceptionResource resource) 1098ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidEndOfJsonNonPrimitive); 1125ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfValueNotFound, marker); 1188ExceptionResource resource; 1192resource = ExceptionResource.ExpectedTrue; 1195resource = ExceptionResource.ExpectedFalse; 1199resource = ExceptionResource.ExpectedNull; 1223ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, _buffer[_consumed - 1]); 1247if (!HasMoreData(ExceptionResource.ExpectedValueAfterPropertyNameNotFound)) 1260if (!HasMoreData(ExceptionResource.ExpectedValueAfterPropertyNameNotFound)) 1270ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedSeparatorAfterPropertyNameNotFound, first); 1315ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfStringNotFound); 1356ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidCharacterAfterEscapeWithinString, currentByte); 1379ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidCharacterWithinString, currentByte); 1389ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfStringNotFound); 1412ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidHexCharacterWithinString, nextByte); 1477ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, nextByte); 1501ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedNextDigitEValueNotFound, nextByte); 1530ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, data[i]); 1550ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1559ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundAfterSign, nextByte); 1597JsonHelpers.IsInRangeInclusive(nextByte, '0', '9') ? ExceptionResource.InvalidLeadingZeroInNumber : ExceptionResource.ExpectedEndOfDigitNotFound, 1644ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1652ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundAfterDecimal, nextByte); 1666ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1680ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1690ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundAfterSign, nextByte); 1752ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndAfterSingleJson, marker); 1766ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound); 1777if (!HasMoreData(ExceptionResource.ExpectedStartOfPropertyOrValueNotFound)) 1803ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeObjectEnd); 1805ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 1818ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeArrayEnd); 1833ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.FoundInvalidCharacter, marker); 1879ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndAfterSingleJson, first); 1891ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueAfterComment, first); 1903ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound); 1914if (!HasMoreData(ExceptionResource.ExpectedStartOfPropertyOrValueNotFound)) 1947ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeObjectEnd); 1950ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 1970ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeArrayEnd); 2007ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 2049ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 2118private bool SkipAllComments(scoped ref byte marker, ExceptionResource resource) 2174ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, marker); 2222ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndAfterSingleJson, marker); 2235ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound); 2246if (!HasMoreData(ExceptionResource.ExpectedStartOfPropertyOrValueNotFound)) 2253if (!SkipAllComments(ref marker, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound)) 2271ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeObjectEnd); 2274ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, marker); 2287ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeArrayEnd); 2303ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.FoundInvalidCharacter, marker); 2332ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfValueNotFound, JsonConstants.Slash); 2338ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfValueNotFound, JsonConstants.Slash); 2443ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfLineSeparator); 2457ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfCommentNotFound); 2509ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidCharacterAtStartOfComment, marker); 2515ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfDataWhileReadingComment);
System\Text\Json\Reader\Utf8JsonReader.MultiSegment.cs (80)
172ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 233ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ZeroDepthAtEnd); 243ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidEndOfJsonNonPrimitive); 278private bool HasMoreDataMultiSegment(ExceptionResource resource) 465ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidEndOfJsonNonPrimitive); 471ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidEndOfJsonNonPrimitive); 502ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfValueNotFound, marker); 654ExceptionResource resource; 658resource = ExceptionResource.ExpectedTrue; 661resource = ExceptionResource.ExpectedFalse; 665resource = ExceptionResource.ExpectedNull; 688ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, _buffer[_consumed - 1]); 712if (!HasMoreDataMultiSegment(ExceptionResource.ExpectedValueAfterPropertyNameNotFound)) 725if (!HasMoreDataMultiSegment(ExceptionResource.ExpectedValueAfterPropertyNameNotFound)) 735ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedSeparatorAfterPropertyNameNotFound, first); 781ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfStringNotFound); 803ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfStringNotFound); 855ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidCharacterAfterEscapeWithinString, currentByte); 873ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidHexCharacterWithinString, nextByte); 890ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfStringNotFound); 909ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidCharacterWithinString, currentByte); 920ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfStringNotFound); 992ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidCharacterAfterEscapeWithinString, currentByte); 1010ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidHexCharacterWithinString, nextByte); 1027ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfStringNotFound); 1051ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidCharacterWithinString, currentByte); 1062ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfStringNotFound); 1173ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, nextByte); 1199ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedNextDigitEValueNotFound, nextByte); 1232ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, data[i]); 1264ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1271ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1286ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundAfterSign, nextByte); 1341JsonHelpers.IsInRangeInclusive(nextByte, '0', '9') ? ExceptionResource.InvalidLeadingZeroInNumber : ExceptionResource.ExpectedEndOfDigitNotFound, 1433ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1440ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1453ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundAfterDecimal, nextByte); 1467ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1475ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1495ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1503ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1518ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundAfterSign, nextByte); 1584ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndAfterSingleJson, marker); 1598ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound); 1606ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound); 1618if (!HasMoreDataMultiSegment(ExceptionResource.ExpectedStartOfPropertyOrValueNotFound)) 1644ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeObjectEnd); 1646ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 1659ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeArrayEnd); 1674ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.FoundInvalidCharacter, marker); 1720ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndAfterSingleJson, first); 1732ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueAfterComment, first); 1744ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound); 1752ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound); 1764if (!HasMoreDataMultiSegment(ExceptionResource.ExpectedStartOfPropertyOrValueNotFound)) 1797ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeObjectEnd); 1800ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 1820ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeArrayEnd); 1857ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 1901ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 1970private bool SkipAllCommentsMultiSegment(scoped ref byte marker, ExceptionResource resource) 2026ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, marker); 2078ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndAfterSingleJson, marker); 2091ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound); 2099ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound); 2111if (!HasMoreDataMultiSegment(ExceptionResource.ExpectedStartOfPropertyOrValueNotFound)) 2118if (!SkipAllCommentsMultiSegment(ref marker, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound)) 2136ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeObjectEnd); 2139ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, marker); 2152ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeArrayEnd); 2167ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.FoundInvalidCharacter, marker); 2242ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfDataWhileReadingComment); 2249ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfDataWhileReadingComment); 2262ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidCharacterAtStartOfComment, marker); 2279ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfDataWhileReadingComment); 2293ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfDataWhileReadingComment); 2496ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfLineSeparator); 2578ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfDataWhileReadingComment); 2585ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfDataWhileReadingComment);
System\Text\Json\Serialization\JsonSerializer.Read.Utf8JsonReader.cs (3)
357ThrowHelper.ThrowJsonReaderException(ref reader, ExceptionResource.ExpectedOneCompleteToken); 372ThrowHelper.ThrowJsonReaderException(ref reader, ExceptionResource.NotEnoughData); 456ExceptionResource.ExpectedStartOfValueNotFound,
System\Text\Json\ThrowHelper.cs (49)
370public static void ThrowJsonReaderException(ref Utf8JsonReader json, ExceptionResource resource, byte nextByte = default, ReadOnlySpan<byte> bytes = default) 376public static JsonException GetJsonReaderException(ref Utf8JsonReader json, ExceptionResource resource, byte nextByte, ReadOnlySpan<byte> bytes) 397private static string GetResourceString(ref Utf8JsonReader json, ExceptionResource resource, byte nextByte, string characters) 404case ExceptionResource.ArrayDepthTooLarge: 407case ExceptionResource.MismatchedObjectArray: 410case ExceptionResource.TrailingCommaNotAllowedBeforeArrayEnd: 413case ExceptionResource.TrailingCommaNotAllowedBeforeObjectEnd: 416case ExceptionResource.EndOfStringNotFound: 419case ExceptionResource.RequiredDigitNotFoundAfterSign: 422case ExceptionResource.RequiredDigitNotFoundAfterDecimal: 425case ExceptionResource.RequiredDigitNotFoundEndOfData: 428case ExceptionResource.ExpectedEndAfterSingleJson: 431case ExceptionResource.ExpectedEndOfDigitNotFound: 434case ExceptionResource.ExpectedNextDigitEValueNotFound: 437case ExceptionResource.ExpectedSeparatorAfterPropertyNameNotFound: 440case ExceptionResource.ExpectedStartOfPropertyNotFound: 443case ExceptionResource.ExpectedStartOfPropertyOrValueNotFound: 446case ExceptionResource.ExpectedStartOfPropertyOrValueAfterComment: 449case ExceptionResource.ExpectedStartOfValueNotFound: 452case ExceptionResource.ExpectedValueAfterPropertyNameNotFound: 455case ExceptionResource.FoundInvalidCharacter: 458case ExceptionResource.InvalidEndOfJsonNonPrimitive: 461case ExceptionResource.ObjectDepthTooLarge: 464case ExceptionResource.ExpectedFalse: 467case ExceptionResource.ExpectedNull: 470case ExceptionResource.ExpectedTrue: 473case ExceptionResource.InvalidCharacterWithinString: 476case ExceptionResource.InvalidCharacterAfterEscapeWithinString: 479case ExceptionResource.InvalidHexCharacterWithinString: 482case ExceptionResource.EndOfCommentNotFound: 485case ExceptionResource.ZeroDepthAtEnd: 488case ExceptionResource.ExpectedJsonTokens: 491case ExceptionResource.NotEnoughData: 494case ExceptionResource.ExpectedOneCompleteToken: 497case ExceptionResource.InvalidCharacterAtStartOfComment: 500case ExceptionResource.UnexpectedEndOfDataWhileReadingComment: 503case ExceptionResource.UnexpectedEndOfLineSeparator: 506case ExceptionResource.InvalidLeadingZeroInNumber: 518public static void ThrowInvalidOperationException(ExceptionResource resource, int currentDepth, int maxDepth, byte token, JsonTokenType tokenType) 593public static InvalidOperationException GetInvalidOperationException(ExceptionResource resource, int currentDepth, int maxDepth, byte token, JsonTokenType tokenType) 609private static string GetResourceString(ExceptionResource resource, int currentDepth, int maxDepth, byte token, JsonTokenType tokenType) 614case ExceptionResource.MismatchedObjectArray: 620case ExceptionResource.DepthTooLarge: 623case ExceptionResource.CannotStartObjectArrayWithoutProperty: 626case ExceptionResource.CannotStartObjectArrayAfterPrimitiveOrClose: 629case ExceptionResource.CannotWriteValueWithinObject: 632case ExceptionResource.CannotWritePropertyWithinArray: 637case ExceptionResource.CannotWriteValueAfterPrimitiveOrClose: 640case ExceptionResource.CannotWriteWithinString:
System\Text\Json\Writer\Utf8JsonWriter.cs (6)
648ThrowInvalidOperationException(ExceptionResource.CannotWriteWithinString); 657ThrowInvalidOperationException(ExceptionResource.CannotStartObjectArrayWithoutProperty); 664ThrowInvalidOperationException(ExceptionResource.CannotStartObjectArrayAfterPrimitiveOrClose); 1245private void ThrowInvalidOperationException(ExceptionResource resource) 1251=> ThrowHelper.ThrowInvalidOperationException(ExceptionResource.MismatchedObjectArray, currentDepth: default, maxDepth: _options.MaxDepth, token, _tokenType); 1256=> ThrowHelper.ThrowInvalidOperationException(ExceptionResource.DepthTooLarge, _currentDepth, _options.MaxDepth, token: default, tokenType: default);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Helpers.cs (2)
68ThrowInvalidOperationException(ExceptionResource.CannotWriteWithinString); 72ThrowInvalidOperationException(ExceptionResource.CannotWritePropertyWithinArray);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Helpers.cs (6)
58ThrowInvalidOperationException(ExceptionResource.CannotWriteWithinString); 67ThrowInvalidOperationException(ExceptionResource.CannotWriteValueWithinObject); 73ThrowInvalidOperationException(ExceptionResource.CannotWriteValueAfterPrimitiveOrClose); 107ThrowInvalidOperationException(ExceptionResource.CannotWriteValueWithinObject); 113ThrowInvalidOperationException(ExceptionResource.CannotWriteValueAfterPrimitiveOrClose); 121ThrowInvalidOperationException(ExceptionResource.CannotWriteWithinString);