108 references to ValueKind
Microsoft.AspNetCore.Authentication (1)
JsonDocumentAuthExtensions.cs (1)
21
if (element.TryGetProperty(key, out var property) && property.
ValueKind
!= JsonValueKind.Null)
Microsoft.AspNetCore.Authentication.OAuth (5)
JsonKeyClaimAction.cs (3)
39
if (value.
ValueKind
== JsonValueKind.Array)
46
else if (value.
ValueKind
== JsonValueKind.Object || value.
ValueKind
== JsonValueKind.Undefined)
JsonSubKeyClaimAction.cs (2)
41
if (value.
ValueKind
== JsonValueKind.Array)
58
&& value.
ValueKind
== JsonValueKind.Object
Microsoft.AspNetCore.Authentication.Test (4)
JwtBearerTests.cs (2)
999
Assert.Equal(JsonValueKind.Null, dom.RootElement.GetProperty("issued").
ValueKind
);
1002
Assert.Equal(JsonValueKind.String, expiresElement.
ValueKind
);
JwtBearerTests_Handler.cs (2)
942
Assert.Equal(JsonValueKind.Null, dom.RootElement.GetProperty("issued").
ValueKind
);
945
Assert.Equal(JsonValueKind.String, expiresElement.
ValueKind
);
Microsoft.AspNetCore.Components.Web (6)
JSComponents\JSComponentInterop.cs (1)
120
switch (parameterJsonValue.
ValueKind
)
WebEventData\ChangeEventArgsReader.cs (3)
22
switch (value.
ValueKind
)
57
if (arrayElement.
ValueKind
!= JsonValueKind.String)
60
$"Unsupported {nameof(JsonElement)} value kind '{arrayElement.
ValueKind
}' " +
WebEventData\WebEventDescriptorReader.cs (2)
47
if (jsonElement.
ValueKind
is JsonValueKind.Null)
61
if (property.Value.
ValueKind
is JsonValueKind.True or JsonValueKind.False)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (8)
ConverterTests\JsonElementComparer.cs (7)
26
if (x.
ValueKind
!= y.
ValueKind
)
31
switch (x.
ValueKind
)
95
throw new JsonException(string.Format(CultureInfo.InvariantCulture, "Unknown JsonValueKind {0}", x.
ValueKind
));
108
hash.Add(obj.
ValueKind
);
110
switch (obj.
ValueKind
)
153
throw new JsonException(string.Format(CultureInfo.InvariantCulture, "Unknown JsonValueKind {0}", obj.
ValueKind
));
UnaryServerCallHandlerTests.cs (1)
180
Assert.Equal(JsonValueKind.Array, responseJson.RootElement.
ValueKind
);
Microsoft.AspNetCore.Mvc.ViewFeatures (5)
Infrastructure\DefaultTempDataSerializer.cs (5)
32
switch (item.Value.
ValueKind
)
71
throw new InvalidOperationException(Resources.FormatTempData_CannotDeserializeType(item.Value.
ValueKind
));
91
if (arrayElement[0].
ValueKind
== JsonValueKind.String)
102
else if (arrayElement[0].
ValueKind
== JsonValueKind.Number)
114
throw new InvalidOperationException(Resources.FormatTempData_CannotDeserializeType(arrayElement.
ValueKind
));
Microsoft.CodeAnalysis.Features (3)
PdbSourceDocument\SourceLinkMap.cs (3)
73
if (root.
ValueKind
!= JsonValueKind.Object)
86
if (rootEntry.Value.
ValueKind
!= JsonValueKind.Object)
93
if (documentsEntry.Value.
ValueKind
!= JsonValueKind.String ||
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Protocol\Converters\ParameterInformationConverter.cs (1)
25
if (labelElement.
ValueKind
== JsonValueKind.Array)
Microsoft.Extensions.Configuration.Json (4)
JsonConfigurationFileParser.cs (4)
33
if (doc.RootElement.
ValueKind
!= JsonValueKind.Object)
35
throw new FormatException(SR.Format(SR.Error_InvalidTopLevelJSONElement, doc.RootElement.
ValueKind
));
85
switch (value.
ValueKind
)
109
throw 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"/>.
1273
JsonValueKind kind = element1.
ValueKind
;
1274
if (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"/>.
1718
private 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)
195
return element.
ValueKind
switch
205
Debug.Assert(element.
ValueKind
== JsonValueKind.Array);
306
Debug.Assert(jElement.
ValueKind
== JsonValueKind.Array);
System\Text\Json\Nodes\JsonNode.To.cs (1)
52
if (this is JsonValueOfElement { Value.
ValueKind
: JsonValueKind.String } jsonElement)
System\Text\Json\Nodes\JsonObject.cs (2)
61
return element.
ValueKind
switch
71
Debug.Assert(element.
ValueKind
== JsonValueKind.Object);
System\Text\Json\Nodes\JsonValueOfElement.cs (4)
16
Debug.Assert(value.
ValueKind
is JsonValueKind.False or JsonValueKind.True or JsonValueKind.Number or JsonValueKind.String);
21
private protected override JsonValueKind GetValueKindCore() => Value.
ValueKind
;
44
ThrowHelper.ThrowInvalidOperationException_NodeUnableToConvertElement(Value.
ValueKind
, typeof(TypeToConvert));
60
switch (Value.
ValueKind
)
System\Text\Json\Nodes\JsonValueOfT.cs (1)
18
Debug.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)
64
switch (element.
ValueKind
)
System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs (5)
358
if (element.
ValueKind
== JsonValueKind.Object)
376
if (property.Value.
ValueKind
!= JsonValueKind.String)
378
ThrowHelper.ThrowJsonException_MetadataValueWasNotString(property.Value.
ValueKind
);
399
if (property.Value.
ValueKind
!= JsonValueKind.String)
401
ThrowHelper.ThrowJsonException_MetadataValueWasNotString(property.Value.
ValueKind
);