74 references to JsonTypeInfoKind
Microsoft.Extensions.AI.Abstractions (3)
Functions\AIFunctionFactory.cs (1)
1061
if (returnTypeInfo.Kind is
JsonTypeInfoKind
.None)
Utilities\AIJsonUtilities.Schema.Create.cs (2)
302
if (ctx.TypeInfo.Kind is
JsonTypeInfoKind
.Enumerable && !objSchema.ContainsKey(ItemsPropertyName))
554
if (ctx.TypeInfo.Kind is
JsonTypeInfoKind
.Object &&
System.Text.Json (71)
System\Text\Json\Schema\JsonSchemaExporter.cs (6)
72
if (cacheResult && typeInfo.Kind is not
JsonTypeInfoKind
.None &&
196
case
JsonTypeInfoKind
.Object:
262
case
JsonTypeInfoKind
.Enumerable:
312
case
JsonTypeInfoKind
.Dictionary:
340
case
JsonTypeInfoKind
.Union:
399
Debug.Assert(typeInfo.Kind is
JsonTypeInfoKind
.None);
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.cs (1)
620
Debug.Assert(state.Current.JsonTypeInfo.Kind is
JsonTypeInfoKind
.Object);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (5)
42
&& typeInfo.Kind is
JsonTypeInfoKind
.Object)
55
if (typeInfo is { Kind:
JsonTypeInfoKind
.Object, IsNullable: false })
71
if (typeInfo.Kind is
JsonTypeInfoKind
.Union)
95
if (typeInfo.Kind is not
JsonTypeInfoKind
.Union)
120
Debug.Assert(typeInfo.Kind is
JsonTypeInfoKind
.Object);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Union.cs (1)
23
Debug.Assert(typeInfo.Kind is
JsonTypeInfoKind
.Union);
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (3)
90
Debug.Assert(typeInfo.Kind !=
JsonTypeInfoKind
.None);
150
Debug.Assert(typeInfo.Kind is
JsonTypeInfoKind
.Object);
165
Debug.Assert(typeInfo.Kind is
JsonTypeInfoKind
.Object);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (48)
115
/// Serialization callbacks are only supported for <see cref="
JsonTypeInfoKind
.Object"/> metadata.
128
if (Kind is not (
JsonTypeInfoKind
.Object or
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary))
145
/// Serialization callbacks are only supported for <see cref="
JsonTypeInfoKind
.Object"/> metadata.
158
if (Kind is not (
JsonTypeInfoKind
.Object or
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary))
175
/// Serialization callbacks are only supported for <see cref="
JsonTypeInfoKind
.Object"/> metadata.
188
if (Kind is not (
JsonTypeInfoKind
.Object or
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary))
211
/// Serialization callbacks are only supported for <see cref="
JsonTypeInfoKind
.Object"/> metadata.
224
if (Kind is not (
JsonTypeInfoKind
.Object or
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary))
237
/// Property is only applicable to metadata of kind <see cref="
JsonTypeInfoKind
.Object"/>.
315
if (Kind ==
JsonTypeInfoKind
.None)
365
/// This property is only meaningful when <see cref="Kind"/> is <see cref="
JsonTypeInfoKind
.Union"/>.
718
/// of kind <see cref="
JsonTypeInfoKind
.Object"/>.
723
/// are metadata-agnostic and thus always resolve to <see cref="
JsonTypeInfoKind
.None"/>.
725
public
JsonTypeInfoKind
Kind { get; }
782
/// Unmapped member handling only supported for <see cref="
JsonTypeInfoKind
.Object"/>.
798
if (Kind !=
JsonTypeInfoKind
.Object)
826
/// Unmapped member handling only supported for <see cref="
JsonTypeInfoKind
.Object"/>.
842
if (Kind !=
JsonTypeInfoKind
.Object)
1012
if (Kind ==
JsonTypeInfoKind
.Object)
1040
if (Kind is
JsonTypeInfoKind
.Union)
1049
if (Kind is
JsonTypeInfoKind
.Union &&
1064
Debug.Assert(Kind is
JsonTypeInfoKind
.Union);
1084
Debug.Assert(Kind is
JsonTypeInfoKind
.Union);
1100
Debug.Assert(Kind is
JsonTypeInfoKind
.Union || PolymorphismOptions is not null);
1113
if (Kind is
JsonTypeInfoKind
.Union)
1546
Debug.Assert(Kind ==
JsonTypeInfoKind
.Object);
1658
Debug.Assert(Kind ==
JsonTypeInfoKind
.Object);
1716
if (Kind is
JsonTypeInfoKind
.Object or
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary)
1796
private static
JsonTypeInfoKind
GetTypeInfoKind(Type type, JsonConverter converter)
1802
return
JsonTypeInfoKind
.None;
1807
case ConverterStrategy.Value: return
JsonTypeInfoKind
.None;
1808
case ConverterStrategy.Object: return
JsonTypeInfoKind
.Object;
1812
return Nullable.GetUnderlyingType(type) is null ?
JsonTypeInfoKind
.Union :
JsonTypeInfoKind
.None;
1813
case ConverterStrategy.Enumerable: return
JsonTypeInfoKind
.Enumerable;
1814
case ConverterStrategy.Dictionary: return
JsonTypeInfoKind
.Dictionary;
1834
public override bool IsReadOnly => _jsonTypeInfo._properties == this && _jsonTypeInfo.IsReadOnly || _jsonTypeInfo.Kind !=
JsonTypeInfoKind
.Object;
1842
if (_jsonTypeInfo.Kind !=
JsonTypeInfoKind
.Object)
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (1)
64
if (Kind ==
JsonTypeInfoKind
.None)
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (1)
98
if (derivedTypeInfo.JsonTypeInfo.Kind is
JsonTypeInfoKind
.Object)
System\Text\Json\Serialization\ReadStackFrame.cs (2)
119
return JsonTypeInfo.Kind is
JsonTypeInfoKind
.Dictionary;
127
return JsonTypeInfo.Kind is
JsonTypeInfoKind
.Enumerable;
System\Text\Json\ThrowHelper.Serialization.cs (3)
474
public static void ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
JsonTypeInfoKind
kind)
696
else if (typeInfo.Kind is
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary)