1073 references to JsonTokenType
Aspire.Dashboard (11)
Components\Dialogs\TextVisualizerDialog.razor.cs (11)
198case JsonTokenType.StartObject: 201case JsonTokenType.EndObject: 204case JsonTokenType.StartArray: 207case JsonTokenType.EndArray: 210case JsonTokenType.PropertyName: 213case JsonTokenType.String: 216case JsonTokenType.Number: 226case JsonTokenType.True: 229case JsonTokenType.False: 232case JsonTokenType.Null: 235case JsonTokenType.Comment:
Aspire.Hosting.Azure (1)
Provisioning\Provisioners\AzureProvisioner.cs (1)
539if (reader.TokenType == JsonTokenType.PropertyName)
Microsoft.AspNetCore.Components.Server (2)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (2)
23while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) 25if (reader.TokenType == JsonTokenType.PropertyName)
Microsoft.AspNetCore.Components.WebAssembly (2)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (2)
23while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) 25if (reader.TokenType == JsonTokenType.PropertyName)
Microsoft.AspNetCore.Components.WebView (2)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (2)
23while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) 25if (reader.TokenType == JsonTokenType.PropertyName)
Microsoft.AspNetCore.Grpc.JsonTranscoding (19)
Internal\Json\DurationConverter.cs (1)
20if (reader.TokenType != JsonTokenType.String)
Internal\Json\EnumConverter.cs (3)
23case JsonTokenType.String: 38case JsonTokenType.Number: 40case JsonTokenType.Null:
Internal\Json\FieldMaskConverter.cs (1)
24if (reader.TokenType != JsonTokenType.String)
Internal\Json\Int64Converter.cs (1)
18if (reader.TokenType == JsonTokenType.String)
Internal\Json\NullValueConverter.cs (3)
19case JsonTokenType.String: 28case JsonTokenType.Number: 30case JsonTokenType.Null:
Internal\Json\TimestampConverter.cs (1)
20if (reader.TokenType != JsonTokenType.String)
Internal\Json\UInt64Converter.cs (1)
19if (reader.TokenType == JsonTokenType.String)
Internal\Json\ValueConverter.cs (8)
25case JsonTokenType.StartObject: 32case JsonTokenType.StartArray: 39case JsonTokenType.Comment: 41case JsonTokenType.String: 44case JsonTokenType.Number: 47case JsonTokenType.True: 50case JsonTokenType.False: 53case JsonTokenType.Null:
Microsoft.AspNetCore.Http.Connections.Common (25)
NegotiateProtocol.cs (8)
169case JsonTokenType.PropertyName: 198if (reader.TokenType == JsonTokenType.StartObject) 202else if (reader.TokenType == JsonTokenType.EndArray) 225case JsonTokenType.EndObject: 281case JsonTokenType.PropertyName: 298case JsonTokenType.String: 301case JsonTokenType.EndArray: 314case JsonTokenType.EndObject:
src\SignalR\common\Shared\SystemTextJsonExtensions.cs (17)
23if (reader.TokenType != JsonTokenType.StartObject) 34public static string GetTokenString(JsonTokenType tokenType) 38case JsonTokenType.None: 40case JsonTokenType.StartObject: 42case JsonTokenType.StartArray: 44case JsonTokenType.PropertyName: 54if (reader.TokenType != JsonTokenType.StartArray) 66JsonTokenType.False => false, 67JsonTokenType.True => true, 76if (reader.TokenType != JsonTokenType.String) 78throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.String}."); 88if (reader.TokenType == JsonTokenType.Null) 93if (reader.TokenType != JsonTokenType.Number) 95throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}."); 105if (reader.TokenType == JsonTokenType.Null) 110if (reader.TokenType != JsonTokenType.Number) 112throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}.");
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\SharedTypes.cs (1)
990if (reader.TokenType == JsonTokenType.EndObject)
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (1)
990if (reader.TokenType == JsonTokenType.EndObject)
Microsoft.AspNetCore.OpenApi (23)
Schemas\OpenApiJsonSchema.cs (3)
21if (reader.TokenType != JsonTokenType.StartObject) 30case JsonTokenType.PropertyName: 34case JsonTokenType.EndObject:
Schemas\OpenApiJsonSchema.Helpers.cs (20)
22if (reader.TokenType == JsonTokenType.Null) 27if (reader.TokenType == JsonTokenType.StartArray) 31while (reader.TokenType != JsonTokenType.EndArray) 40if (reader.TokenType == JsonTokenType.Null) 57if (reader.TokenType == JsonTokenType.Null) 62if (reader.TokenType != JsonTokenType.StartObject) 69while (reader.TokenType != JsonTokenType.EndObject) 71if (reader.TokenType != JsonTokenType.PropertyName) 91if (reader.TokenType == JsonTokenType.Null) 96if (reader.TokenType == JsonTokenType.True || reader.TokenType == JsonTokenType.False) 102if (reader.TokenType == JsonTokenType.Number) 129if (reader.TokenType == JsonTokenType.String) 135if (reader.TokenType == JsonTokenType.StartArray) 139while (reader.TokenType != JsonTokenType.EndArray) 147if (reader.TokenType == JsonTokenType.StartObject) 152while (reader.TokenType != JsonTokenType.EndObject) 154if (reader.TokenType != JsonTokenType.PropertyName) 183if (reader.TokenType == JsonTokenType.StartArray) 283if (reader.TokenType == JsonTokenType.False)
Microsoft.AspNetCore.SignalR.Common (21)
Protocol\HandshakeProtocol.cs (4)
133if (reader.TokenType == JsonTokenType.PropertyName) 150else if (reader.TokenType == JsonTokenType.EndObject) 188if (reader.TokenType == JsonTokenType.PropertyName) 203else if (reader.TokenType == JsonTokenType.EndObject)
src\SignalR\common\Shared\SystemTextJsonExtensions.cs (17)
23if (reader.TokenType != JsonTokenType.StartObject) 34public static string GetTokenString(JsonTokenType tokenType) 38case JsonTokenType.None: 40case JsonTokenType.StartObject: 42case JsonTokenType.StartArray: 44case JsonTokenType.PropertyName: 54if (reader.TokenType != JsonTokenType.StartArray) 66JsonTokenType.False => false, 67JsonTokenType.True => true, 76if (reader.TokenType != JsonTokenType.String) 78throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.String}."); 88if (reader.TokenType == JsonTokenType.Null) 93if (reader.TokenType != JsonTokenType.Number) 95throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}."); 105if (reader.TokenType == JsonTokenType.Null) 110if (reader.TokenType != JsonTokenType.Number) 112throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}.");
Microsoft.AspNetCore.SignalR.Protocols.Json (36)
Protocol\JsonHubProtocol.cs (19)
157case JsonTokenType.PropertyName: 164throw new InvalidDataException($"Expected '{TypePropertyName}' to be of type {JsonTokenType.Number}."); 175if (reader.TokenType != JsonTokenType.StartArray) 178$"Expected '{StreamIdsPropertyName}' to be of type {SystemTextJsonExtensions.GetTokenString(JsonTokenType.StartArray)}."); 183while (reader.TokenType != JsonTokenType.EndArray) 197if (reader.TokenType != JsonTokenType.String) 199throw new InvalidDataException($"Expected '{TargetPropertyName}' to be of type {JsonTokenType.String}."); 291if (reader.TokenType != JsonTokenType.StartArray) 293throw new InvalidDataException($"Expected '{ArgumentsPropertyName}' to be of type {SystemTextJsonExtensions.GetTokenString(JsonTokenType.StartArray)}."); 318while (reader.CurrentDepth == initialDepth && reader.TokenType == JsonTokenType.StartArray || 341case JsonTokenType.EndObject: 485if (reader.TokenType != JsonTokenType.StartObject) 487throw new InvalidDataException($"Expected '{HeadersPropertyName}' to be of type {JsonTokenType.StartObject}."); 494case JsonTokenType.PropertyName: 499if (reader.TokenType != JsonTokenType.String) 501throw new InvalidDataException($"Expected header '{propertyName}' to be of type {JsonTokenType.String}."); 506case JsonTokenType.Comment: 508case JsonTokenType.EndObject: 841while (reader.TokenType != JsonTokenType.EndArray && reader.CurrentDepth > depth)
src\SignalR\common\Shared\SystemTextJsonExtensions.cs (17)
23if (reader.TokenType != JsonTokenType.StartObject) 34public static string GetTokenString(JsonTokenType tokenType) 38case JsonTokenType.None: 40case JsonTokenType.StartObject: 42case JsonTokenType.StartArray: 44case JsonTokenType.PropertyName: 54if (reader.TokenType != JsonTokenType.StartArray) 66JsonTokenType.False => false, 67JsonTokenType.True => true, 76if (reader.TokenType != JsonTokenType.String) 78throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.String}."); 88if (reader.TokenType == JsonTokenType.Null) 93if (reader.TokenType != JsonTokenType.Number) 95throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}."); 105if (reader.TokenType == JsonTokenType.Null) 110if (reader.TokenType != JsonTokenType.Number) 112throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}.");
Microsoft.AspNetCore.SignalR.StackExchangeRedis (17)
src\SignalR\common\Shared\SystemTextJsonExtensions.cs (17)
23if (reader.TokenType != JsonTokenType.StartObject) 34public static string GetTokenString(JsonTokenType tokenType) 38case JsonTokenType.None: 40case JsonTokenType.StartObject: 42case JsonTokenType.StartArray: 44case JsonTokenType.PropertyName: 54if (reader.TokenType != JsonTokenType.StartArray) 66JsonTokenType.False => false, 67JsonTokenType.True => true, 76if (reader.TokenType != JsonTokenType.String) 78throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.String}."); 88if (reader.TokenType == JsonTokenType.Null) 93if (reader.TokenType != JsonTokenType.Number) 95throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}."); 105if (reader.TokenType == JsonTokenType.Null) 110if (reader.TokenType != JsonTokenType.Number) 112throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}.");
Microsoft.CodeAnalysis.LanguageServer.Protocol (50)
Protocol\Converters\FormattingOptionsConverter.cs (9)
23Debug.Assert(reader.TokenType == JsonTokenType.StartObject); 34while (reader.TokenType == JsonTokenType.Comment); 54if (reader.TokenType == JsonTokenType.EndObject) 67if (reader.TokenType == JsonTokenType.Comment) 72if (reader.TokenType != JsonTokenType.PropertyName) 104JsonTokenType.Number => reader.GetInt32(), 105JsonTokenType.String => reader.GetString(), 106JsonTokenType.True => reader.GetBoolean(), 107JsonTokenType.False => reader.GetBoolean(),
Protocol\Converters\NaturalObjectConverter.cs (8)
36case JsonTokenType.Null: 39case JsonTokenType.False or JsonTokenType.True: 42case JsonTokenType.Number: 54case JsonTokenType.String: 57case JsonTokenType.StartArray: 59while (reader.Read() && reader.TokenType != JsonTokenType.EndArray) 66case JsonTokenType.StartObject:
Protocol\Converters\StringEnumConverter.cs (2)
40if (reader.TokenType == JsonTokenType.String) 44else if (reader.TokenType == JsonTokenType.Null)
Protocol\Converters\SumConverter.cs (12)
101public IReadOnlyList<UnionTypeInfo> GetApplicableInfos(JsonTokenType startingTokenType) 105JsonTokenType.StartArray 107JsonTokenType.Number or 108JsonTokenType.String or 109JsonTokenType.True or 110JsonTokenType.False 112JsonTokenType.StartObject 188if (reader.TokenType == JsonTokenType.Null) 281case JsonTokenType.True: 282case JsonTokenType.False: 285case JsonTokenType.Number: 297case JsonTokenType.String:
Protocol\Converters\TextDocumentSyncConverter.cs (3)
16if (reader.TokenType == JsonTokenType.Number) 31else if (reader.TokenType == JsonTokenType.String) 36else if (reader.TokenType == JsonTokenType.StartObject)
Protocol\Internal\Converters\ClassifiedTextElementConverter.cs (3)
22if (reader.TokenType == JsonTokenType.EndObject) 27if (reader.TokenType == JsonTokenType.PropertyName) 36if (reader.TokenType == JsonTokenType.EndArray)
Protocol\Internal\Converters\ClassifiedTextRunConverter.cs (1)
17if (reader.TokenType == JsonTokenType.StartObject)
Protocol\Internal\Converters\ContainerElementConverter.cs (4)
21if (reader.TokenType == JsonTokenType.StartObject) 28if (reader.TokenType == JsonTokenType.EndObject) 33if (reader.TokenType == JsonTokenType.PropertyName) 42if (reader.TokenType == JsonTokenType.EndArray)
Protocol\Internal\Converters\ImageElementConverter.cs (3)
18if (reader.TokenType == JsonTokenType.StartObject) 25if (reader.TokenType == JsonTokenType.EndObject) 31if (reader.TokenType == JsonTokenType.PropertyName)
Protocol\Internal\Converters\ImageIdConverter.cs (1)
17if (reader.TokenType == JsonTokenType.StartObject)
Protocol\Internal\Converters\ObjectContentConverter.cs (4)
40if (reader.TokenType == JsonTokenType.Null) 45else if (reader.TokenType == JsonTokenType.StartObject) 68else if (reader.TokenType == JsonTokenType.String) 72else if (reader.TokenType == JsonTokenType.Number)
Microsoft.Extensions.DependencyModel (15)
Utf8JsonReaderExtensions.cs (15)
16=> reader.TokenType == JsonTokenType.PropertyName; 28if (reader.TokenType == JsonTokenType.String) 52if (reader.TokenType != JsonTokenType.StartObject) 60if (reader.TokenType != JsonTokenType.EndObject) 69if (reader.TokenType != JsonTokenType.StartArray) 76while (reader.Read() && reader.TokenType == JsonTokenType.String) 81if (reader.TokenType != JsonTokenType.EndArray) 93if (reader.TokenType == JsonTokenType.Null) 97if (reader.TokenType != JsonTokenType.String) 109if (reader.TokenType == JsonTokenType.Null) 113if (reader.TokenType != JsonTokenType.True && reader.TokenType != JsonTokenType.False) 124if (reader.TokenType == JsonTokenType.Null) 128if (reader.TokenType != JsonTokenType.True && reader.TokenType != JsonTokenType.False)
Microsoft.JSInterop (18)
Implementation\JSObjectReferenceJsonWorker.cs (2)
27while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) 29if (reader.TokenType == JsonTokenType.PropertyName)
Infrastructure\ByteArrayJsonConverter.cs (5)
26if (reader.TokenType == JsonTokenType.String && reader.TryGetBytesFromBase64(out var bytes)) 38if (reader.TokenType != JsonTokenType.StartObject) 43if (reader.Read() && reader.TokenType == JsonTokenType.PropertyName) 49else if (!reader.Read() || reader.TokenType != JsonTokenType.Number) 63if (reader.Read() && reader.TokenType != JsonTokenType.EndObject)
Infrastructure\DotNetDispatcher.cs (7)
230if (!reader.Read() || reader.TokenType != JsonTokenType.StartArray) 238while (index < parameterTypes.Length && reader.Read() && reader.TokenType != JsonTokenType.EndArray) 241if (reader.TokenType == JsonTokenType.StartObject && IsIncorrectDotNetObjectRefUse(parameterType, reader)) 256if (!reader.Read() || reader.TokenType != JsonTokenType.EndArray) 271jsonReader.TokenType == JsonTokenType.PropertyName && 317if (!reader.Read() || reader.TokenType != JsonTokenType.StartArray) 334if (!reader.Read() || reader.TokenType != JsonTokenType.EndArray)
Infrastructure\DotNetObjectReferenceJsonConverter.cs (2)
26while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) 28if (reader.TokenType == JsonTokenType.PropertyName)
Infrastructure\JSStreamReferenceJsonConverter.cs (2)
29while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) 31if (reader.TokenType == JsonTokenType.PropertyName)
Microsoft.ML.SearchSpace (8)
Converter\ParameterConverter.cs (8)
19case JsonTokenType.StartObject: 22case JsonTokenType.String: 24case JsonTokenType.Number: 35case JsonTokenType.True: 37case JsonTokenType.False: 39case JsonTokenType.Null: 41case JsonTokenType.StartArray: 43while (reader.Read() && reader.TokenType != JsonTokenType.EndArray)
Microsoft.ML.SearchSpace.Tests (22)
ParameterTest.cs (9)
76parameter = Parameter.FromEnum(JsonTokenType.None); 77parameter.AsType<JsonTokenType>().Should().Be(JsonTokenType.None); 96parameter["JTokenType"].AsType<JsonTokenType>().Should().Be(JsonTokenType.Null); 118parameter["JTokenType"].AsType<JsonTokenType>().Should().Be(JsonTokenType.Null); 171public JsonTokenType JTokenType { get; set; } = JsonTokenType.Null;
SearchSpaceTest.cs (13)
111param.BasicSS.JTokenType.Should().Be(JsonTokenType.None); 125param.BasicSS.JTokenType.Should().Be(JsonTokenType.StartArray); 158parameter.JTokenType.Should().Be(JsonTokenType.None); 176param.BasicSS.JTokenType.Should().Be(JsonTokenType.Null); 188JTokenType = JsonTokenType.Null, 200param.JTokenType.Should().Be(JsonTokenType.Null); 322public JsonTokenType JTokenType { get; set; } 347[Choice(new object[] { JsonTokenType.None, JsonTokenType.EndObject, JsonTokenType.StartArray, JsonTokenType.Null }, defaultValue: JsonTokenType.Null)] 348public JsonTokenType JTokenType { get; set; }
Microsoft.ML.Tokenizers (2)
Utils\StringSpanOrdinalKey.cs (2)
153if (reader.TokenType == JsonTokenType.EndObject) 158if (reader.TokenType == JsonTokenType.PropertyName)
System.Text.Json (797)
src\libraries\System.Text.Json\Common\JsonNumberHandling.cs (4)
16/// Numbers will only be read from <see cref="JsonTokenType.Number"/> tokens and will only be written as JSON numbers (without quotes). 21/// Numbers can be read from <see cref="JsonTokenType.String"/> tokens. 22/// Does not prevent numbers from being read from <see cref="JsonTokenType.Number"/> token. 37/// The "NaN", "Infinity", and "-Infinity" <see cref="JsonTokenType.String"/> tokens can be read as
System\Text\Json\Document\JsonDocument.cs (63)
114internal JsonTokenType GetJsonTokenType(int index) 127Debug.Assert(!isPropertyName || row.TokenType is JsonTokenType.PropertyName); 138CheckExpectedType(JsonTokenType.StartArray, row.TokenType); 149CheckExpectedType(JsonTokenType.StartObject, row.TokenType); 160CheckExpectedType(JsonTokenType.StartArray, row.TokenType); 236if (includeQuotes && row.TokenType == JsonTokenType.String) 258Debug.Assert(row.TokenType == JsonTokenType.PropertyName); 271if (row.TokenType == JsonTokenType.String) 285internal string? GetString(int index, JsonTokenType expectedType) 291JsonTokenType tokenType = row.TokenType; 293if (tokenType == JsonTokenType.Null) 350isPropertyName ? JsonTokenType.PropertyName : JsonTokenType.String, 385return GetString(index - DbRow.Size, JsonTokenType.PropertyName)!; 393Debug.Assert(row.TokenType is JsonTokenType.PropertyName); 404CheckExpectedType(JsonTokenType.String, row.TokenType); 425CheckExpectedType(JsonTokenType.Number, row.TokenType); 447CheckExpectedType(JsonTokenType.Number, row.TokenType); 469CheckExpectedType(JsonTokenType.Number, row.TokenType); 491CheckExpectedType(JsonTokenType.Number, row.TokenType); 513CheckExpectedType(JsonTokenType.Number, row.TokenType); 535CheckExpectedType(JsonTokenType.Number, row.TokenType); 557CheckExpectedType(JsonTokenType.Number, row.TokenType); 579CheckExpectedType(JsonTokenType.Number, row.TokenType); 601CheckExpectedType(JsonTokenType.Number, row.TokenType); 623CheckExpectedType(JsonTokenType.Number, row.TokenType); 645CheckExpectedType(JsonTokenType.Number, row.TokenType); 667CheckExpectedType(JsonTokenType.String, row.TokenType); 702CheckExpectedType(JsonTokenType.String, row.TokenType); 737CheckExpectedType(JsonTokenType.String, row.TokenType); 806case JsonTokenType.StartObject: 810case JsonTokenType.StartArray: 814case JsonTokenType.String: 817case JsonTokenType.Number: 820case JsonTokenType.True: 823case JsonTokenType.False: 826case JsonTokenType.Null: 845case JsonTokenType.String: 848case JsonTokenType.Number: 851case JsonTokenType.True: 854case JsonTokenType.False: 857case JsonTokenType.Null: 860case JsonTokenType.StartObject: 863case JsonTokenType.EndObject: 866case JsonTokenType.StartArray: 869case JsonTokenType.EndArray: 872case JsonTokenType.PropertyName: 883Debug.Assert(row.TokenType == JsonTokenType.String || row.TokenType == JsonTokenType.PropertyName); 914Debug.Assert(row.TokenType == JsonTokenType.PropertyName); 964JsonTokenType tokenType = reader.TokenType; 971if (tokenType == JsonTokenType.StartObject) 985else if (tokenType == JsonTokenType.EndObject) 987int rowIndex = database.FindIndexOfFirstUnsetSizeOrLength(JsonTokenType.StartObject); 1002else if (tokenType == JsonTokenType.StartArray) 1016else if (tokenType == JsonTokenType.EndArray) 1018int rowIndex = database.FindIndexOfFirstUnsetSizeOrLength(JsonTokenType.StartArray); 1048else if (tokenType == JsonTokenType.PropertyName) 1068Debug.Assert(tokenType >= JsonTokenType.String && tokenType <= JsonTokenType.Null); 1077if (tokenType == JsonTokenType.String) 1110private static void CheckExpectedType(JsonTokenType expected, JsonTokenType actual)
System\Text\Json\Document\JsonDocument.DbRow.cs (6)
50internal JsonTokenType TokenType => (JsonTokenType)(unchecked((uint)_numberOfRowsAndTypeUnion) >> 28); 61internal DbRow(JsonTokenType jsonTokenType, int location, int sizeOrLength) 63Debug.Assert(jsonTokenType > JsonTokenType.None && jsonTokenType <= JsonTokenType.Null); 73internal bool IsSimpleValue => TokenType >= JsonTokenType.PropertyName;
System\Text\Json\Document\JsonDocument.MetadataDb.cs (14)
216internal void Append(JsonTokenType tokenType, int startLocation, int length) 220(tokenType == JsonTokenType.StartArray || tokenType == JsonTokenType.StartObject) == 307internal int FindIndexOfFirstUnsetSizeOrLength(JsonTokenType lookupType) 309Debug.Assert(lookupType == JsonTokenType.StartObject || lookupType == JsonTokenType.StartArray); 313private int FindOpenElement(JsonTokenType lookupType) 338internal JsonTokenType GetJsonTokenType(int index) 343return (JsonTokenType)(union >> 28); 359if (start.TokenType == JsonTokenType.StartObject) 362end.TokenType == JsonTokenType.EndObject, 365else if (start.TokenType == JsonTokenType.StartArray) 368end.TokenType == JsonTokenType.EndArray, 388if (start.TokenType == JsonTokenType.String)
System\Text\Json\Document\JsonDocument.Parse.cs (26)
353/// is <see cref="JsonTokenType.PropertyName"/> or <see cref="JsonTokenType.None"/>, the 393/// is <see cref="JsonTokenType.PropertyName"/> or <see cref="JsonTokenType.None"/>, the 449case JsonTokenType.None: 452case JsonTokenType.PropertyName: 475case JsonTokenType.StartObject: 476case JsonTokenType.StartArray: 509reader.TokenType == JsonTokenType.EndObject || 510reader.TokenType == JsonTokenType.EndArray); 515case JsonTokenType.False: 516case JsonTokenType.True: 517case JsonTokenType.Null: 535case JsonTokenType.Number: 550case JsonTokenType.String: 672private static JsonDocument CreateForLiteral(JsonTokenType tokenType) 676case JsonTokenType.False: 679case JsonTokenType.True: 683Debug.Assert(tokenType == JsonTokenType.Null); 726JsonTokenType tokenType = JsonTokenType.None) 730tokenType != JsonTokenType.Null && 731tokenType != JsonTokenType.False && 732tokenType != JsonTokenType.True); 737if (tokenType == JsonTokenType.String || tokenType == JsonTokenType.Number)
System\Text\Json\Document\JsonDocument.TryGetProperty.cs (6)
17CheckExpectedType(JsonTokenType.StartObject, row.TokenType); 59Debug.Assert(row.TokenType != JsonTokenType.PropertyName); 73Debug.Assert(row.TokenType == JsonTokenType.PropertyName); 117CheckExpectedType(JsonTokenType.StartObject, row.TokenType); 150Debug.Assert(row.TokenType != JsonTokenType.PropertyName); 164Debug.Assert(row.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Document\JsonElement.ArrayEnumerator.cs (1)
27Debug.Assert(target.TokenType == JsonTokenType.StartArray);
System\Text\Json\Document\JsonElement.cs (28)
34private JsonTokenType TokenType 38return _parent?.GetJsonTokenType(_idx) ?? JsonTokenType.None; 355JsonTokenType type = TokenType; 358type == JsonTokenType.True ? true : 359type == JsonTokenType.False ? false : 362static bool ThrowJsonElementWrongTypeException(JsonTokenType actualType) 386return _parent.GetString(_idx, JsonTokenType.String); 1448if (TokenType == JsonTokenType.Null) 1476if (TokenType == JsonTokenType.Null) 1504if (TokenType == JsonTokenType.Null) 1582JsonTokenType tokenType = TokenType; 1584if (tokenType != JsonTokenType.StartArray) 1586ThrowHelper.ThrowJsonElementWrongTypeException(JsonTokenType.StartArray, tokenType); 1608JsonTokenType tokenType = TokenType; 1610if (tokenType != JsonTokenType.StartObject) 1612ThrowHelper.ThrowJsonElementWrongTypeException(JsonTokenType.StartObject, tokenType); 1656case JsonTokenType.None: 1657case JsonTokenType.Null: 1659case JsonTokenType.True: 1661case JsonTokenType.False: 1663case JsonTokenType.Number: 1664case JsonTokenType.StartArray: 1665case JsonTokenType.StartObject: 1671case JsonTokenType.String: 1673case JsonTokenType.Comment: 1674case JsonTokenType.EndArray: 1675case JsonTokenType.EndObject: 1677Debug.Fail($"No handler for {nameof(JsonTokenType)}.{TokenType}");
System\Text\Json\Document\JsonElement.ObjectEnumerator.cs (1)
27Debug.Assert(target.TokenType == JsonTokenType.StartObject);
System\Text\Json\Document\JsonElement.Parse.cs (4)
22/// is <see cref="JsonTokenType.PropertyName"/> or <see cref="JsonTokenType.None"/>, the 87/// is <see cref="JsonTokenType.PropertyName"/> or <see cref="JsonTokenType.None"/>, the
System\Text\Json\Document\JsonProperty.cs (3)
40/// This value's <see cref="Type"/> is not <see cref="JsonTokenType.PropertyName"/>. 60/// This value's <see cref="Type"/> is not <see cref="JsonTokenType.PropertyName"/>. 80/// This value's <see cref="Type"/> is not <see cref="JsonTokenType.PropertyName"/>.
System\Text\Json\JsonHelpers.cs (8)
23Debug.Assert(reader.TokenType is JsonTokenType.String or JsonTokenType.PropertyName); 86JsonTokenType tokenType = reader.TokenType; 87if (tokenType is JsonTokenType.StartObject or JsonTokenType.StartArray) 156public static bool IsInRangeInclusive(JsonTokenType value, JsonTokenType lowerBound, JsonTokenType upperBound)
System\Text\Json\Nodes\JsonNode.Parse.cs (2)
25/// is <see cref="JsonTokenType.PropertyName"/> or <see cref="JsonTokenType.None"/>, the
System\Text\Json\Reader\JsonReaderHelper.cs (13)
49internal static JsonValueKind ToValueKind(this JsonTokenType tokenType) 53case JsonTokenType.None: 55case JsonTokenType.StartArray: 57case JsonTokenType.StartObject: 59case JsonTokenType.String: 60case JsonTokenType.Number: 61case JsonTokenType.True: 62case JsonTokenType.False: 63case JsonTokenType.Null: 75public static bool IsTokenTypePrimitive(JsonTokenType tokenType) => 76(tokenType - JsonTokenType.String) <= (JsonTokenType.Null - JsonTokenType.String);
System\Text\Json\Reader\JsonReaderState.cs (4)
22internal readonly JsonTokenType _tokenType; 23internal readonly JsonTokenType _previousTokenType; 63JsonTokenType tokenType, 64JsonTokenType previousTokenType,
System\Text\Json\Reader\Utf8JsonReader.cs (106)
35private JsonTokenType _tokenType; 36private JsonTokenType _previousTokenType; 110if (TokenType is JsonTokenType.StartArray or JsonTokenType.StartObject) 124public readonly JsonTokenType TokenType => _tokenType; 284if (_isFinalBlock && TokenType is JsonTokenType.None && !_readerOptions.AllowMultipleValues) 303/// When <see cref="TokenType"/> is <see cref="JsonTokenType.PropertyName" />, the reader first moves to the property value. 304/// When <see cref="TokenType"/> (originally, or after advancing) is <see cref="JsonTokenType.StartObject" /> or 305/// <see cref="JsonTokenType.StartArray" />, the reader advances to the matching 306/// <see cref="JsonTokenType.EndObject" /> or <see cref="JsonTokenType.EndArray" />. 326if (TokenType is JsonTokenType.PropertyName) 334if (TokenType is JsonTokenType.StartObject or JsonTokenType.StartArray) 362/// When <see cref="TokenType"/> is <see cref="JsonTokenType.PropertyName" />, the reader first moves to the property value. 363/// When <see cref="TokenType"/> (originally, or after advancing) is <see cref="JsonTokenType.StartObject" /> or 364/// <see cref="JsonTokenType.StartArray" />, the reader advances to the matching 365/// <see cref="JsonTokenType.EndObject" /> or <see cref="JsonTokenType.EndArray" />. 403if (TokenType is JsonTokenType.PropertyName) 412if (TokenType is not (JsonTokenType.StartObject or JsonTokenType.StartArray)) 440/// (i.e. other than <see cref="JsonTokenType.String"/> or <see cref="JsonTokenType.PropertyName"/>). 470/// (i.e. other than <see cref="JsonTokenType.String"/> or <see cref="JsonTokenType.PropertyName"/>). 511/// (i.e. other than <see cref="JsonTokenType.String"/> or <see cref="JsonTokenType.PropertyName"/>). 690private static bool IsTokenTypeString(JsonTokenType tokenType) 692return tokenType == JsonTokenType.PropertyName || tokenType == JsonTokenType.String; 749_tokenType = JsonTokenType.StartObject; 767_tokenType = JsonTokenType.EndObject; 783_tokenType = JsonTokenType.StartArray; 801_tokenType = JsonTokenType.EndArray; 844if (_tokenType == JsonTokenType.None) 855if (_tokenType == JsonTokenType.StartObject) 876_tokenType = JsonTokenType.StartObject; 883else if (_tokenType == JsonTokenType.StartArray) 895else if (_tokenType == JsonTokenType.PropertyName) 928if (_readerOptions.CommentHandling == JsonCommentHandling.Allow && _tokenType == JsonTokenType.Comment) 933if (_tokenType is not JsonTokenType.EndArray and not JsonTokenType.EndObject) 965_tokenType = JsonTokenType.StartObject; 975_tokenType = JsonTokenType.StartArray; 992_tokenType = JsonTokenType.Number; 1001_isNotPrimitive = _tokenType is JsonTokenType.StartObject or JsonTokenType.StartArray; 1066return ConsumeLiteral(JsonConstants.FalseValue, JsonTokenType.False); 1070return ConsumeLiteral(JsonConstants.TrueValue, JsonTokenType.True); 1074return ConsumeLiteral(JsonConstants.NullValue, JsonTokenType.Null); 1096if (_isNotPrimitive && IsLastSpan && _tokenType != JsonTokenType.EndArray && _tokenType != JsonTokenType.EndObject) 1133private bool ConsumeLiteral(ReadOnlySpan<byte> literal, JsonTokenType tokenType) 1212_tokenType = JsonTokenType.Number; 1275_tokenType = JsonTokenType.PropertyName; 1301_tokenType = JsonTokenType.String; 1400_tokenType = JsonTokenType.String; 1701JsonTokenType prevTokenType = _tokenType; 1733if (_tokenType == JsonTokenType.Comment) 1841Debug.Assert(_tokenType == JsonTokenType.Comment); 1845_tokenType = _inObject ? JsonTokenType.StartObject : JsonTokenType.StartArray; 1852Debug.Assert(_tokenType != JsonTokenType.Comment); 1872if (_bitStack.CurrentDepth == 0 && _tokenType != JsonTokenType.None) 1889if (_previousTokenType <= JsonTokenType.StartObject || _previousTokenType == JsonTokenType.StartArray || _trailingCommaBeforeComment) 1991else if (_tokenType == JsonTokenType.None) 2002else if (_tokenType == JsonTokenType.StartObject) 2017_tokenType = JsonTokenType.StartObject; 2024else if (_tokenType == JsonTokenType.StartArray) 2033else if (_tokenType == JsonTokenType.PropertyName) 2043Debug.Assert(_tokenType is JsonTokenType.EndArray or JsonTokenType.EndObject); 2164if (_tokenType == JsonTokenType.StartObject) 2184_tokenType = JsonTokenType.StartObject; 2192else if (_tokenType == JsonTokenType.StartArray) 2207else if (_tokenType == JsonTokenType.PropertyName) 2530if (_tokenType != JsonTokenType.Comment) 2534_tokenType = JsonTokenType.Comment; 2548if (_tokenType != JsonTokenType.Comment) 2552_tokenType = JsonTokenType.Comment; 2565JsonTokenType.Comment => nameof(JsonTokenType.Comment), 2566JsonTokenType.EndArray => nameof(JsonTokenType.EndArray), 2567JsonTokenType.EndObject => nameof(JsonTokenType.EndObject), 2568JsonTokenType.False => nameof(JsonTokenType.False), 2569JsonTokenType.None => nameof(JsonTokenType.None), 2570JsonTokenType.Null => nameof(JsonTokenType.Null), 2571JsonTokenType.Number => nameof(JsonTokenType.Number), 2572JsonTokenType.PropertyName => nameof(JsonTokenType.PropertyName), 2573JsonTokenType.StartArray => nameof(JsonTokenType.StartArray), 2574JsonTokenType.StartObject => nameof(JsonTokenType.StartObject), 2575JsonTokenType.String => nameof(JsonTokenType.String), 2576JsonTokenType.True => nameof(JsonTokenType.True),
System\Text\Json\Reader\Utf8JsonReader.MultiSegment.cs (48)
151if (_tokenType == JsonTokenType.None) 162if (_tokenType == JsonTokenType.StartObject) 185_tokenType = JsonTokenType.StartObject; 194else if (_tokenType == JsonTokenType.StartArray) 206else if (_tokenType == JsonTokenType.PropertyName) 236if (_readerOptions.CommentHandling == JsonCommentHandling.Allow && _tokenType == JsonTokenType.Comment) 241if (_tokenType != JsonTokenType.EndArray && _tokenType != JsonTokenType.EndObject) 340_tokenType = JsonTokenType.StartObject; 350_tokenType = JsonTokenType.StartArray; 364_tokenType = JsonTokenType.Number; 372_isNotPrimitive = _tokenType is JsonTokenType.StartObject or JsonTokenType.StartArray; 426return ConsumeLiteralMultiSegment(JsonConstants.FalseValue, JsonTokenType.False); 430return ConsumeLiteralMultiSegment(JsonConstants.TrueValue, JsonTokenType.True); 434return ConsumeLiteralMultiSegment(JsonConstants.NullValue, JsonTokenType.Null); 463if (_isNotPrimitive && IsLastSpan && _tokenType != JsonTokenType.EndArray && _tokenType != JsonTokenType.EndObject) 469if (_isNotPrimitive && IsLastSpan && _tokenType != JsonTokenType.EndArray && _tokenType != JsonTokenType.EndObject) 510private bool ConsumeLiteralMultiSegment(ReadOnlySpan<byte> literal, JsonTokenType tokenType) 678_tokenType = JsonTokenType.Number; 740_tokenType = JsonTokenType.PropertyName; 767_tokenType = JsonTokenType.String; 946_tokenType = JsonTokenType.String; 1097_tokenType = JsonTokenType.String; 1530JsonTokenType prevTokenType = _tokenType; 1565if (_tokenType == JsonTokenType.Comment) 1682Debug.Assert(_tokenType == JsonTokenType.Comment); 1686_tokenType = _inObject ? JsonTokenType.StartObject : JsonTokenType.StartArray; 1693Debug.Assert(_tokenType != JsonTokenType.Comment); 1713if (_bitStack.CurrentDepth == 0 && _tokenType != JsonTokenType.None) 1730if (_previousTokenType <= JsonTokenType.StartObject || _previousTokenType == JsonTokenType.StartArray || _trailingCommaBeforeComment) 1841else if (_tokenType == JsonTokenType.None) 1852else if (_tokenType == JsonTokenType.StartObject) 1868_tokenType = JsonTokenType.StartObject; 1876else if (_tokenType == JsonTokenType.StartArray) 1885else if (_tokenType == JsonTokenType.PropertyName) 1895Debug.Assert(_tokenType == JsonTokenType.EndArray || _tokenType == JsonTokenType.EndObject); 2016if (_tokenType == JsonTokenType.StartObject) 2038_tokenType = JsonTokenType.StartObject; 2048else if (_tokenType == JsonTokenType.StartArray) 2063else if (_tokenType == JsonTokenType.PropertyName) 2207if (_tokenType != JsonTokenType.Comment) 2212_tokenType = JsonTokenType.Comment;
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (78)
18/// Returns <see langword="null" /> when <see cref="TokenType"/> is <see cref="JsonTokenType.Null"/>. 22/// (i.e. other than <see cref="JsonTokenType.String"/>, <see cref="JsonTokenType.PropertyName"/> or 23/// <see cref="JsonTokenType.Null"/>). 29if (TokenType == JsonTokenType.Null) 34if (TokenType != JsonTokenType.String && TokenType != JsonTokenType.PropertyName) 56/// Unlike <see cref="GetString"/>, this method does not support <see cref="JsonTokenType.Null"/>. 64/// (i.e. other than <see cref="JsonTokenType.String"/> or <see cref="JsonTokenType.PropertyName"/>. 71if (_tokenType is not (JsonTokenType.String or JsonTokenType.PropertyName)) 81Debug.Assert(_tokenType is JsonTokenType.String or JsonTokenType.PropertyName or JsonTokenType.Number); 82Debug.Assert(_tokenType != JsonTokenType.Number || !ValueIsEscaped, "Numbers can't contain escape characters."); 120/// Unlike <see cref="GetString"/>, this method does not support <see cref="JsonTokenType.Null"/>. 128/// (i.e. other than <see cref="JsonTokenType.String"/> or <see cref="JsonTokenType.PropertyName"/>. 135if (_tokenType is not (JsonTokenType.String or JsonTokenType.PropertyName)) 145Debug.Assert(_tokenType is JsonTokenType.String or JsonTokenType.PropertyName or JsonTokenType.Number); 146Debug.Assert(_tokenType != JsonTokenType.Number || !ValueIsEscaped, "Numbers can't contain escape characters."); 197Debug.Assert(_tokenType is JsonTokenType.String or JsonTokenType.PropertyName); 241if (TokenType != JsonTokenType.Comment) 254/// Thrown if trying to get the value of a JSON token that is not a boolean (i.e. <see cref="JsonTokenType.True"/> or <see cref="JsonTokenType.False"/>). 259JsonTokenType type = TokenType; 260if (type == JsonTokenType.True) 265else if (type != JsonTokenType.False) 279/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.String"/>. 302/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 336/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 371/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 405/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 439/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 473/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 508/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 543/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 578/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 635/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 692/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 725/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.String"/>. 758/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.String"/>. 791/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.String"/>. 824/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.String"/>. 829if (TokenType != JsonTokenType.String) 852/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 857if (TokenType != JsonTokenType.Number) 887/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 893if (TokenType != JsonTokenType.Number) 923/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 928if (TokenType != JsonTokenType.Number) 958/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 963if (TokenType != JsonTokenType.Number) 993/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 998if (TokenType != JsonTokenType.Number) 1028/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 1034if (TokenType != JsonTokenType.Number) 1064/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 1070if (TokenType != JsonTokenType.Number) 1100/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 1106if (TokenType != JsonTokenType.Number) 1136/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 1141if (TokenType != JsonTokenType.Number) 1166/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 1171if (TokenType != JsonTokenType.Number) 1196/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.Number"/>. 1201if (TokenType != JsonTokenType.Number) 1231/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.String"/>. 1236if (TokenType != JsonTokenType.String) 1296/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.String"/>. 1301if (TokenType != JsonTokenType.String) 1362/// Thrown if trying to get the value of a JSON token that is not a <see cref="JsonTokenType.String"/>. 1367if (TokenType != JsonTokenType.String)
System\Text\Json\Serialization\Converters\Collection\JsonCollectionConverter.cs (9)
75if (reader.TokenType != JsonTokenType.StartArray) 92if (reader.TokenType == JsonTokenType.EndArray) 108if (reader.TokenType == JsonTokenType.EndArray) 124if (reader.TokenType == JsonTokenType.StartArray) 130if (reader.TokenType != JsonTokenType.StartObject) 217if (reader.TokenType == JsonTokenType.EndArray) 264if (reader.TokenType != JsonTokenType.EndObject) 266Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 272Debug.Assert(reader.TokenType is JsonTokenType.EndObject);
System\Text\Json\Serialization\Converters\Collection\JsonDictionaryConverter.cs (8)
87if (reader.TokenType != JsonTokenType.StartObject) 107if (reader.TokenType == JsonTokenType.EndObject) 113Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 133if (reader.TokenType == JsonTokenType.EndObject) 139Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 157if (reader.TokenType != JsonTokenType.StartObject) 240if (reader.TokenType == JsonTokenType.EndObject) 246Debug.Assert(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Collection\MemoryConverter.cs (1)
21if (reader.TokenType is JsonTokenType.Null)
System\Text\Json\Serialization\Converters\Collection\ReadOnlyMemoryConverter.cs (1)
21if (reader.TokenType is JsonTokenType.Null)
System\Text\Json\Serialization\Converters\FSharp\FSharpOptionConverter.cs (2)
36if (!state.IsContinuation && reader.TokenType == JsonTokenType.Null) 85if (reader.TokenType == JsonTokenType.Null)
System\Text\Json\Serialization\Converters\FSharp\FSharpValueOptionConverter.cs (2)
36if (!state.IsContinuation && reader.TokenType == JsonTokenType.Null) 87if (reader.TokenType == JsonTokenType.Null)
System\Text\Json\Serialization\Converters\Node\JsonArrayConverter.cs (2)
27case JsonTokenType.StartArray: 29case JsonTokenType.Null:
System\Text\Json\Serialization\Converters\Node\JsonNodeConverter.cs (7)
43case JsonTokenType.String: 44case JsonTokenType.False: 45case JsonTokenType.True: 46case JsonTokenType.Number: 48case JsonTokenType.StartObject: 50case JsonTokenType.StartArray: 52case JsonTokenType.Null:
System\Text\Json\Serialization\Converters\Node\JsonObjectConverter.cs (2)
52case JsonTokenType.StartObject: 54case JsonTokenType.Null:
System\Text\Json\Serialization\Converters\Node\JsonValueConverter.cs (1)
25if (reader.TokenType is JsonTokenType.Null)
System\Text\Json\Serialization\Converters\Object\ObjectDefaultConverter.cs (8)
30if (reader.TokenType != JsonTokenType.StartObject) 60if (reader.TokenType != JsonTokenType.StartObject) 165JsonTokenType tokenType = reader.TokenType; 166if (tokenType == JsonTokenType.EndObject) 172Debug.Assert(tokenType == JsonTokenType.PropertyName); 282JsonTokenType tokenType = reader.TokenType; 284if (tokenType == JsonTokenType.EndObject) 290Debug.Assert(tokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.cs (9)
43if (reader.TokenType != JsonTokenType.StartObject) 94Debug.Assert(tempReader.TokenType == JsonTokenType.PropertyName); 123if (reader.TokenType != JsonTokenType.StartObject) 292JsonTokenType tokenType = reader.TokenType; 294if (tokenType == JsonTokenType.EndObject) 300Debug.Assert(tokenType == JsonTokenType.PropertyName); 402JsonTokenType tokenType = reader.TokenType; 404if (tokenType == JsonTokenType.EndObject) 410Debug.Assert(tokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\BooleanConverter.cs (1)
25Debug.Assert(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\ByteArrayConverter.cs (1)
12if (reader.TokenType == JsonTokenType.Null)
System\Text\Json\Serialization\Converters\Value\ByteConverter.cs (2)
29Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 40if (reader.TokenType == JsonTokenType.String && (JsonNumberHandling.AllowReadingFromString & handling) != 0)
System\Text\Json\Serialization\Converters\Value\CharConverter.cs (3)
15if (reader.TokenType is not (JsonTokenType.String or JsonTokenType.PropertyName)) 49Debug.Assert(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\DateOnlyConverter.cs (2)
17if (reader.TokenType != JsonTokenType.String) 27Debug.Assert(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\DateTimeConverter.cs (1)
23Debug.Assert(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\DateTimeOffsetConverter.cs (1)
23Debug.Assert(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\DecimalConverter.cs (2)
28Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 39if (reader.TokenType == JsonTokenType.String &&
System\Text\Json\Serialization\Converters\Value\DoubleConverter.cs (2)
29Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 40if (reader.TokenType == JsonTokenType.String)
System\Text\Json\Serialization\Converters\Value\EnumConverter.cs (4)
106case JsonTokenType.String when (_converterOptions & EnumConverterOptions.AllowStrings) != 0: 113case JsonTokenType.Number when (_converterOptions & EnumConverterOptions.AllowNumbers) != 0: 238Debug.Assert(reader.TokenType is JsonTokenType.String or JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\GuidConverter.cs (1)
24Debug.Assert(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\HalfConverter.cs (3)
23if (reader.TokenType != JsonTokenType.Number) 74Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 87if (reader.TokenType == JsonTokenType.String)
System\Text\Json\Serialization\Converters\Value\Int128Converter.cs (3)
23if (reader.TokenType != JsonTokenType.Number) 68Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 81if (reader.TokenType == JsonTokenType.String &&
System\Text\Json\Serialization\Converters\Value\Int16Converter.cs (2)
30Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 41if (reader.TokenType == JsonTokenType.String &&
System\Text\Json\Serialization\Converters\Value\Int32Converter.cs (2)
30Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 41if (reader.TokenType == JsonTokenType.String &&
System\Text\Json\Serialization\Converters\Value\Int64Converter.cs (2)
29Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 40if (reader.TokenType == JsonTokenType.String &&
System\Text\Json\Serialization\Converters\Value\JsonPrimitiveConverter.cs (1)
28if (reader.TokenType != JsonTokenType.PropertyName)
System\Text\Json\Serialization\Converters\Value\MemoryByteConverter.cs (1)
15return reader.TokenType is JsonTokenType.Null ? default : reader.GetBytesFromBase64();
System\Text\Json\Serialization\Converters\Value\NullableConverter.cs (3)
30if (!state.IsContinuation && reader.TokenType == JsonTokenType.Null) 64if (reader.TokenType == JsonTokenType.Null) 87if (reader.TokenType == JsonTokenType.Null)
System\Text\Json\Serialization\Converters\Value\ReadOnlyMemoryByteConverter.cs (1)
15return reader.TokenType is JsonTokenType.Null ? default : reader.GetBytesFromBase64();
System\Text\Json\Serialization\Converters\Value\SByteConverter.cs (2)
29Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 40if (reader.TokenType == JsonTokenType.String &&
System\Text\Json\Serialization\Converters\Value\SingleConverter.cs (2)
30Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 41if (reader.TokenType == JsonTokenType.String)
System\Text\Json\Serialization\Converters\Value\StringConverter.cs (1)
32Debug.Assert(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\TimeOnlyConverter.cs (4)
19if (reader.TokenType != JsonTokenType.String) 29Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 35Debug.Assert(reader.TokenType is JsonTokenType.String or JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\TimeSpanConverter.cs (4)
19if (reader.TokenType != JsonTokenType.String) 29Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 35Debug.Assert(reader.TokenType is JsonTokenType.String or JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\UInt128Converter.cs (3)
23if (reader.TokenType != JsonTokenType.Number) 68Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 81if (reader.TokenType == JsonTokenType.String &&
System\Text\Json\Serialization\Converters\Value\UInt16Converter.cs (2)
30Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 41if (reader.TokenType == JsonTokenType.String &&
System\Text\Json\Serialization\Converters\Value\UInt32Converter.cs (2)
30Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 41if (reader.TokenType == JsonTokenType.String &&
System\Text\Json\Serialization\Converters\Value\UInt64Converter.cs (2)
29Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 40if (reader.TokenType == JsonTokenType.String &&
System\Text\Json\Serialization\Converters\Value\UriConverter.cs (2)
14return reader.TokenType is JsonTokenType.Null ? null : ReadCore(ref reader); 30Debug.Assert(reader.TokenType is JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\VersionConverter.cs (4)
22if (reader.TokenType is JsonTokenType.Null) 27if (reader.TokenType != JsonTokenType.String) 37Debug.Assert(reader.TokenType is JsonTokenType.PropertyName or JsonTokenType.String);
System\Text\Json\Serialization\JsonConverterOfT.cs (13)
62/// and whether <see cref="JsonTokenType.Null"/> should be passed on deserialization. 151if (reader.TokenType == JsonTokenType.Null && !HandleNullOnRead && !state.IsContinuation) 183JsonTokenType originalPropertyTokenType = reader.TokenType; 241Debug.Assert(state.Current.OriginalTokenType == JsonTokenType.None); 499internal void VerifyRead(JsonTokenType tokenType, int depth, long bytesConsumed, bool isValueConverter, ref Utf8JsonReader reader) 505case JsonTokenType.StartArray: 506if (reader.TokenType != JsonTokenType.EndArray) 517case JsonTokenType.StartObject: 518if (reader.TokenType != JsonTokenType.EndObject) 529case JsonTokenType.None: 546if (!CanBePolymorphic && !(HandleNullOnRead && tokenType == JsonTokenType.Null)) 605Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 654if (originalDepth != writer.CurrentDepth || writer.TokenType != JsonTokenType.PropertyName)
System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs (10)
67if (reader.TokenType == JsonTokenType.EndObject) 74Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); 214if (reader.TokenType != JsonTokenType.String) 228if (reader.TokenType != JsonTokenType.String) 246case JsonTokenType.String: 249case JsonTokenType.Number: 261if (reader.TokenType != JsonTokenType.StartArray) 496case JsonTokenType.StartArray: 500case JsonTokenType.EndObject: 509Debug.Assert(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\JsonSerializer.Read.Utf8JsonReader.cs (21)
36/// is <see cref="JsonTokenType.PropertyName"/> or <see cref="JsonTokenType.None"/>, the 90/// is <see cref="JsonTokenType.PropertyName"/> or <see cref="JsonTokenType.None"/>, the 141/// is <see cref="JsonTokenType.PropertyName"/> or <see cref="JsonTokenType.None"/>, the 190/// is <see cref="JsonTokenType.PropertyName"/> or <see cref="JsonTokenType.None"/>, the 251/// is <see cref="JsonTokenType.PropertyName"/> or <see cref="JsonTokenType.None"/>, the 350case JsonTokenType.None: 353case JsonTokenType.PropertyName: 366case JsonTokenType.StartObject: 367case JsonTokenType.StartArray: 389Debug.Assert(reader.TokenType is JsonTokenType.EndObject or JsonTokenType.EndArray); 393case JsonTokenType.Number: 394case JsonTokenType.True: 395case JsonTokenType.False: 396case JsonTokenType.Null: 409case JsonTokenType.String:
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (2)
857if (reader.TokenType == JsonTokenType.Null) 906if (JsonTypeInfo.ElementType == JsonTypeInfo.ObjectType && reader.TokenType == JsonTokenType.Null)
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (2)
279bool isNullToken = reader.TokenType == JsonTokenType.Null; 368bool isNullToken = reader.TokenType == JsonTokenType.Null;
System\Text\Json\Serialization\ReadStackFrame.cs (1)
41public JsonTokenType OriginalTokenType;
System\Text\Json\ThrowHelper.cs (18)
262public static InvalidOperationException GetInvalidOperationException_ExpectedArray(JsonTokenType tokenType) 267public static InvalidOperationException GetInvalidOperationException_ExpectedObject(JsonTokenType tokenType) 273public static void ThrowInvalidOperationException_ExpectedNumber(JsonTokenType tokenType) 279public static void ThrowInvalidOperationException_ExpectedBoolean(JsonTokenType tokenType) 285public static void ThrowInvalidOperationException_ExpectedString(JsonTokenType tokenType) 291public static void ThrowInvalidOperationException_ExpectedPropertyName(JsonTokenType tokenType) 297public static void ThrowInvalidOperationException_ExpectedStringComparison(JsonTokenType tokenType) 303public static void ThrowInvalidOperationException_ExpectedComment(JsonTokenType tokenType) 314private static InvalidOperationException GetInvalidOperationException(string message, JsonTokenType tokenType) 319private static InvalidOperationException GetInvalidOperationException(JsonTokenType tokenType) 326JsonTokenType expectedType, 327JsonTokenType actualType) 497public static void ThrowInvalidOperationException(ExceptionResource resource, int currentDepth, int maxDepth, byte token, JsonTokenType tokenType) 572public static InvalidOperationException GetInvalidOperationException(ExceptionResource resource, int currentDepth, int maxDepth, byte token, JsonTokenType tokenType) 588private static string GetResourceString(ExceptionResource resource, int currentDepth, int maxDepth, byte token, JsonTokenType tokenType) 595message = (tokenType == JsonTokenType.PropertyName) ? 612message = (tokenType == JsonTokenType.PropertyName) ? 718public static void ThrowInvalidOperationException_ExpectedChar(JsonTokenType tokenType)
System\Text\Json\ThrowHelper.Serialization.cs (2)
656public static void ThrowJsonException_MetadataValuesInvalidToken(JsonTokenType tokenType) 668public static void ThrowJsonException_MetadataValueWasNotString(JsonTokenType tokenType)
System\Text\Json\Writer\Utf8JsonWriter.cs (25)
48private JsonTokenType _tokenType; 89internal JsonTokenType TokenType => _tokenType; 464_tokenType = JsonTokenType.StartArray; 477_tokenType = JsonTokenType.StartObject; 539if (_tokenType != JsonTokenType.PropertyName) 541Debug.Assert(_tokenType != JsonTokenType.None && _tokenType != JsonTokenType.StartArray); 547Debug.Assert(_tokenType != JsonTokenType.PropertyName); 548Debug.Assert(_tokenType != JsonTokenType.StartObject); 551if (CurrentDepth == 0 && _tokenType != JsonTokenType.None) 578if (_tokenType is not JsonTokenType.PropertyName and not JsonTokenType.None || _commentAfterNoneOrPropertyName) 599_tokenType = JsonTokenType.StartArray; 613_tokenType = JsonTokenType.StartObject; 650_tokenType = JsonTokenType.StartArray; 675_tokenType = JsonTokenType.StartObject; 805_tokenType = JsonTokenType.StartArray; 830_tokenType = JsonTokenType.StartObject; 895_tokenType = JsonTokenType.EndArray; 907_tokenType = JsonTokenType.EndObject; 962if (_bitStack.CurrentDepth <= 0 || _tokenType == JsonTokenType.PropertyName) 969Debug.Assert(_tokenType != JsonTokenType.None); 989if (_tokenType == JsonTokenType.StartObject || _tokenType == JsonTokenType.StartArray) 1006Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.None);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (7)
28_tokenType = JsonTokenType.String; 78_tokenType = JsonTokenType.String; 102_tokenType = JsonTokenType.String; 305Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 307if (_tokenType != JsonTokenType.None) 355Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 357if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTime.cs (7)
32_tokenType = JsonTokenType.String; 84_tokenType = JsonTokenType.String; 109_tokenType = JsonTokenType.String; 307Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 309if (_tokenType != JsonTokenType.None) 355Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 357if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTimeOffset.cs (7)
31_tokenType = JsonTokenType.String; 83_tokenType = JsonTokenType.String; 108_tokenType = JsonTokenType.String; 306Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 308if (_tokenType != JsonTokenType.None) 354Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 356if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Decimal.cs (7)
31_tokenType = JsonTokenType.Number; 83_tokenType = JsonTokenType.Number; 108_tokenType = JsonTokenType.Number; 300Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 302if (_tokenType != JsonTokenType.None) 345Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 347if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Double.cs (7)
33_tokenType = JsonTokenType.Number; 86_tokenType = JsonTokenType.Number; 112_tokenType = JsonTokenType.Number; 304Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 306if (_tokenType != JsonTokenType.None) 349Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 351if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Float.cs (7)
33_tokenType = JsonTokenType.Number; 86_tokenType = JsonTokenType.Number; 112_tokenType = JsonTokenType.Number; 304Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 306if (_tokenType != JsonTokenType.None) 349Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 351if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.FormattedNumber.cs (3)
38_tokenType = JsonTokenType.Number; 68_tokenType = JsonTokenType.Number; 79_tokenType = JsonTokenType.Number;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Guid.cs (7)
31_tokenType = JsonTokenType.String; 83_tokenType = JsonTokenType.String; 108_tokenType = JsonTokenType.String; 308Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 310if (_tokenType != JsonTokenType.None) 357Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 359if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Helpers.cs (8)
39if (!_inObject || _tokenType == JsonTokenType.PropertyName) 41Debug.Assert(_tokenType != JsonTokenType.StartObject); 52if (!_inObject || _tokenType == JsonTokenType.PropertyName) 54Debug.Assert(_tokenType != JsonTokenType.StartObject); 111Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 113if (_tokenType != JsonTokenType.None) 184Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 186if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Literal.cs (15)
23_tokenType = JsonTokenType.Null; 34_tokenType = JsonTokenType.Null; 45_tokenType = JsonTokenType.Null; 105_tokenType = JsonTokenType.Null; 130_tokenType = JsonTokenType.Null; 146_tokenType = JsonTokenType.True; 151_tokenType = JsonTokenType.False; 204_tokenType = value ? JsonTokenType.True : JsonTokenType.False; 230_tokenType = value ? JsonTokenType.True : JsonTokenType.False; 451Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 453if (_tokenType != JsonTokenType.None) 496Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 498if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.SignedNumber.cs (7)
31_tokenType = JsonTokenType.Number; 83_tokenType = JsonTokenType.Number; 108_tokenType = JsonTokenType.Number; 376Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 378if (_tokenType != JsonTokenType.None) 421Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 423if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.String.cs (25)
38_tokenType = JsonTokenType.PropertyName; 50_tokenType = JsonTokenType.PropertyName; 109_tokenType = JsonTokenType.PropertyName; 211if (_tokenType != JsonTokenType.None) 258_tokenType = JsonTokenType.PropertyName; 268_tokenType = JsonTokenType.PropertyName; 398Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 400if (_tokenType != JsonTokenType.None) 436_tokenType = JsonTokenType.String; 526_tokenType = JsonTokenType.String; 550_tokenType = JsonTokenType.String; 622_tokenType = JsonTokenType.String; 672_tokenType = JsonTokenType.String; 712_tokenType = JsonTokenType.String; 762_tokenType = JsonTokenType.String; 802_tokenType = JsonTokenType.String; 874_tokenType = JsonTokenType.String; 1537Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 1539if (_tokenType != JsonTokenType.None) 1586Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 1588if (_tokenType != JsonTokenType.None) 1638Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 1640if (_tokenType != JsonTokenType.None) 1689Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 1691if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.UnsignedNumber.cs (7)
32_tokenType = JsonTokenType.Number; 86_tokenType = JsonTokenType.Number; 112_tokenType = JsonTokenType.Number; 385Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 387if (_tokenType != JsonTokenType.None) 430Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 432if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Bytes.cs (3)
29_tokenType = JsonTokenType.String; 121if (_tokenType != JsonTokenType.PropertyName) 123if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Comment.cs (6)
56if (_tokenType is JsonTokenType.PropertyName or JsonTokenType.None) 123if (_tokenType != JsonTokenType.None || _commentAfterNoneOrPropertyName) 171if (_tokenType is JsonTokenType.PropertyName or JsonTokenType.None) 229if (_tokenType != JsonTokenType.None || _commentAfterNoneOrPropertyName)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.DateTime.cs (3)
39_tokenType = JsonTokenType.String; 86if (_tokenType != JsonTokenType.PropertyName) 88if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.DateTimeOffset.cs (3)
40_tokenType = JsonTokenType.String; 87if (_tokenType != JsonTokenType.PropertyName) 89if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Decimal.cs (3)
39_tokenType = JsonTokenType.Number; 82if (_tokenType != JsonTokenType.PropertyName) 84if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Double.cs (3)
43_tokenType = JsonTokenType.Number; 86if (_tokenType != JsonTokenType.PropertyName) 88if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Float.cs (3)
43_tokenType = JsonTokenType.Number; 86if (_tokenType != JsonTokenType.PropertyName) 88if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.FormattedNumber.cs (3)
44_tokenType = JsonTokenType.Number; 88if (_tokenType != JsonTokenType.PropertyName) 90if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Guid.cs (3)
39_tokenType = JsonTokenType.String; 87if (_tokenType != JsonTokenType.PropertyName) 89if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Helpers.cs (5)
19if (_tokenType != JsonTokenType.PropertyName) 21Debug.Assert(_tokenType != JsonTokenType.None && _tokenType != JsonTokenType.StartArray); 27Debug.Assert(_tokenType != JsonTokenType.PropertyName); 30if (CurrentDepth == 0 && _tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Literal.cs (5)
21_tokenType = JsonTokenType.Null; 36_tokenType = JsonTokenType.True; 41_tokenType = JsonTokenType.False; 106if (_tokenType != JsonTokenType.PropertyName) 108if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Raw.cs (2)
161_tokenType = JsonTokenType.String; 252_tokenType = JsonTokenType.String;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.SignedNumber.cs (3)
52_tokenType = JsonTokenType.Number; 95if (_tokenType != JsonTokenType.PropertyName) 97if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.String.cs (8)
26_tokenType = JsonTokenType.String; 79_tokenType = JsonTokenType.String; 166if (_tokenType != JsonTokenType.PropertyName) 168if (_tokenType != JsonTokenType.None) 226_tokenType = JsonTokenType.String; 312if (_tokenType != JsonTokenType.PropertyName) 314if (_tokenType != JsonTokenType.None) 364_tokenType = JsonTokenType.String;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.UnsignedNumber.cs (3)
54_tokenType = JsonTokenType.Number; 97if (_tokenType != JsonTokenType.PropertyName) 99if (_tokenType != JsonTokenType.None)