108 references to ValueKind
Microsoft.AspNetCore.Authentication (1)
JsonDocumentAuthExtensions.cs (1)
21if (element.TryGetProperty(key, out var property) && property.ValueKind != JsonValueKind.Null)
Microsoft.AspNetCore.Authentication.OAuth (5)
JsonKeyClaimAction.cs (3)
39if (value.ValueKind == JsonValueKind.Array) 46else if (value.ValueKind == JsonValueKind.Object || value.ValueKind == JsonValueKind.Undefined)
JsonSubKeyClaimAction.cs (2)
41if (value.ValueKind == JsonValueKind.Array) 58&& value.ValueKind == JsonValueKind.Object
Microsoft.AspNetCore.Authentication.Test (4)
JwtBearerTests.cs (2)
999Assert.Equal(JsonValueKind.Null, dom.RootElement.GetProperty("issued").ValueKind); 1002Assert.Equal(JsonValueKind.String, expiresElement.ValueKind);
JwtBearerTests_Handler.cs (2)
942Assert.Equal(JsonValueKind.Null, dom.RootElement.GetProperty("issued").ValueKind); 945Assert.Equal(JsonValueKind.String, expiresElement.ValueKind);
Microsoft.AspNetCore.Components.Web (6)
JSComponents\JSComponentInterop.cs (1)
120switch (parameterJsonValue.ValueKind)
WebEventData\ChangeEventArgsReader.cs (3)
22switch (value.ValueKind) 57if (arrayElement.ValueKind != JsonValueKind.String) 60$"Unsupported {nameof(JsonElement)} value kind '{arrayElement.ValueKind}' " +
WebEventData\WebEventDescriptorReader.cs (2)
47if (jsonElement.ValueKind is JsonValueKind.Null) 61if (property.Value.ValueKind is JsonValueKind.True or JsonValueKind.False)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (8)
ConverterTests\JsonElementComparer.cs (7)
26if (x.ValueKind != y.ValueKind) 31switch (x.ValueKind) 95throw new JsonException(string.Format(CultureInfo.InvariantCulture, "Unknown JsonValueKind {0}", x.ValueKind)); 108hash.Add(obj.ValueKind); 110switch (obj.ValueKind) 153throw new JsonException(string.Format(CultureInfo.InvariantCulture, "Unknown JsonValueKind {0}", obj.ValueKind));
UnaryServerCallHandlerTests.cs (1)
180Assert.Equal(JsonValueKind.Array, responseJson.RootElement.ValueKind);
Microsoft.AspNetCore.Mvc.ViewFeatures (5)
Infrastructure\DefaultTempDataSerializer.cs (5)
32switch (item.Value.ValueKind) 71throw new InvalidOperationException(Resources.FormatTempData_CannotDeserializeType(item.Value.ValueKind)); 91if (arrayElement[0].ValueKind == JsonValueKind.String) 102else if (arrayElement[0].ValueKind == JsonValueKind.Number) 114throw new InvalidOperationException(Resources.FormatTempData_CannotDeserializeType(arrayElement.ValueKind));
Microsoft.CodeAnalysis.Features (3)
PdbSourceDocument\SourceLinkMap.cs (3)
73if (root.ValueKind != JsonValueKind.Object) 86if (rootEntry.Value.ValueKind != JsonValueKind.Object) 93if (documentsEntry.Value.ValueKind != JsonValueKind.String ||
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Protocol\Converters\ParameterInformationConverter.cs (1)
25if (labelElement.ValueKind == JsonValueKind.Array)
Microsoft.Extensions.Configuration.Json (4)
JsonConfigurationFileParser.cs (4)
33if (doc.RootElement.ValueKind != JsonValueKind.Object) 35throw new FormatException(SR.Format(SR.Error_InvalidTopLevelJSONElement, doc.RootElement.ValueKind)); 85switch (value.ValueKind) 109throw new FormatException(SR.Format(SR.Error_UnsupportedJSONToken, value.ValueKind));
System.Text.Json (71)
System\Text\Json\Document\JsonDocument.cs (1)
99/// This <see cref="RootElement"/>'s <see cref="JsonElement.ValueKind"/> would result in an invalid JSON.
System\Text\Json\Document\JsonElement.cs (50)
54/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Array"/>. 77/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Array"/>. 94/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Object"/>. 122/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Object"/>. 168/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Object"/>. 207/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Object"/>. 247/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Object"/>. 288/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Object"/>. 324/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Object"/>. 344/// This value's <see cref="ValueKind"/> is neither <see cref="JsonValueKind.True"/> or 376/// This value's <see cref="ValueKind"/> is neither <see cref="JsonValueKind.String"/> nor <see cref="JsonValueKind.Null"/>. 401/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.String"/>. 421/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.String"/>. 452/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 470/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 501/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 521/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 551/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 568/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 598/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 619/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 650/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 667/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 697/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 718/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 749/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 769/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 799/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 820/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 860/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 888/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 927/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 955/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 985/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 1006/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Number"/>. 1037/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.String"/>. 1057/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.String"/>. 1088/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.String"/>. 1108/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.String"/>. 1139/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.String"/>. 1159/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.String"/>. 1273JsonValueKind kind = element1.ValueKind; 1274if (kind != element2.ValueKind) 1438/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.String"/>. 1465/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.String"/>. 1494/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.String"/>. 1542/// This value's <see cref="ValueKind"/> is <see cref="JsonValueKind.Undefined"/>. 1573/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Array"/>. 1599/// This value's <see cref="ValueKind"/> is not <see cref="JsonValueKind.Object"/>. 1718private string DebuggerDisplay => $"ValueKind = {ValueKind} : \"{ToString()}\"";
System\Text\Json\Document\JsonProperty.cs (2)
110/// This <see cref="Value"/>'s <see cref="JsonElement.ValueKind"/> would result in an invalid JSON. 150=> Value.ValueKind == JsonValueKind.Undefined ? "<Undefined>" : $"\"{ToString()}\"";
System\Text\Json\Nodes\JsonArray.cs (3)
195return element.ValueKind switch 205Debug.Assert(element.ValueKind == JsonValueKind.Array); 306Debug.Assert(jElement.ValueKind == JsonValueKind.Array);
System\Text\Json\Nodes\JsonNode.To.cs (1)
52if (this is JsonValueOfElement { Value.ValueKind: JsonValueKind.String } jsonElement)
System\Text\Json\Nodes\JsonObject.cs (2)
61return element.ValueKind switch 71Debug.Assert(element.ValueKind == JsonValueKind.Object);
System\Text\Json\Nodes\JsonValueOfElement.cs (4)
16Debug.Assert(value.ValueKind is JsonValueKind.False or JsonValueKind.True or JsonValueKind.Number or JsonValueKind.String); 21private protected override JsonValueKind GetValueKindCore() => Value.ValueKind; 44ThrowHelper.ThrowInvalidOperationException_NodeUnableToConvertElement(Value.ValueKind, typeof(TypeToConvert)); 60switch (Value.ValueKind)
System\Text\Json\Nodes\JsonValueOfT.cs (1)
18Debug.Assert(value is not JsonElement or JsonElement { ValueKind: not JsonValueKind.Null });
System\Text\Json\Serialization\Attributes\JsonExtensionDataAttribute.cs (1)
19/// If a <see cref="JsonElement"/> is created, a "null" JSON value is treated as a JsonElement with <see cref="JsonElement.ValueKind"/>
System\Text\Json\Serialization\Converters\Node\JsonNodeConverter.cs (1)
64switch (element.ValueKind)
System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs (5)
358if (element.ValueKind == JsonValueKind.Object) 376if (property.Value.ValueKind != JsonValueKind.String) 378ThrowHelper.ThrowJsonException_MetadataValueWasNotString(property.Value.ValueKind); 399if (property.Value.ValueKind != JsonValueKind.String) 401ThrowHelper.ThrowJsonException_MetadataValueWasNotString(property.Value.ValueKind);