76 types derived from JsonConverter
ConfigurationSchemaGenerator (1)
ConfigSchemaEmitter.cs (1)
722private sealed class SchemaOrderJsonNodeConverter : JsonConverter<JsonNode>
Microsoft.AspNetCore.Components.Server (1)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (1)
9internal sealed class ElementReferenceJsonConverter : JsonConverter<ElementReference>
Microsoft.AspNetCore.Components.WebAssembly (1)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (1)
9internal sealed class ElementReferenceJsonConverter : JsonConverter<ElementReference>
Microsoft.AspNetCore.Components.WebView (2)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (1)
9internal sealed class ElementReferenceJsonConverter : JsonConverter<ElementReference>
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
372private sealed class OSBasedCaseConverter : JsonConverter<Dictionary<string, StaticWebAssetNode>>
Microsoft.AspNetCore.Grpc.JsonTranscoding (4)
Internal\Json\BoolConverter.cs (1)
10internal sealed class BoolConverter : JsonConverter<bool>
Internal\Json\ByteStringConverter.cs (1)
11internal sealed class ByteStringConverter : JsonConverter<ByteString>
Internal\Json\NullValueConverter.cs (1)
11internal sealed class NullValueConverter : JsonConverter<NullValue>
Internal\Json\SettingsConverterBase.cs (1)
8internal abstract class SettingsConverterBase<T> : JsonConverter<T>
Microsoft.AspNetCore.Hosting (1)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
372private sealed class OSBasedCaseConverter : JsonConverter<Dictionary<string, StaticWebAssetNode>>
Microsoft.AspNetCore.Http.Extensions.Tests (2)
HttpResponseJsonExtensionsTests.cs (1)
77private class IntegerConverter : JsonConverter<int>
RequestDelegateGenerator\SharedTypes.cs (1)
983public class TodoJsonConverter : JsonConverter<ITodo>
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (1)
983public class TodoJsonConverter : JsonConverter<ITodo>
Microsoft.AspNetCore.Mvc.Core.Test (4)
Formatters\SystemTextJsonInputFormatterTest.cs (2)
221private class ShortConverter : JsonConverter<short> 234private class DateTimeConverter : JsonConverter<DateTime>
Formatters\SystemTextJsonOutputFormatterTest.cs (1)
322private class ThrowingFormatterPersonConverter : JsonConverter<ThrowingFormatterModel>
Infrastructure\SystemTextJsonResultExecutorTest.cs (1)
47private class ThrowingFormatterPersonConverter : JsonConverter<ThrowingFormatterModel>
Microsoft.AspNetCore.OpenApi (1)
Schemas\OpenApiJsonSchema.cs (1)
16internal sealed class JsonConverter : JsonConverter<OpenApiJsonSchema>
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (1)
565public class CustomTypeConverter : JsonConverter<CustomType>
Microsoft.CodeAnalysis.LanguageServer.Protocol (17)
Protocol\Converters\DocumentUriConverter.cs (1)
14internal class DocumentUriConverter : JsonConverter<Uri>
Protocol\Converters\FormattingOptionsConverter.cs (1)
17internal class FormattingOptionsConverter : JsonConverter<FormattingOptions>
Protocol\Converters\InitializeParamsWorkspaceFoldersConverter.cs (1)
27internal class InitializeParamsWorkspaceFoldersConverter : JsonConverter<WorkspaceFolder[]?>
Protocol\Converters\NaturalObjectConverter.cs (1)
13internal class NaturalObjectConverter : JsonConverter<object>
Protocol\Converters\ParameterInformationConverter.cs (1)
14internal class ParameterInformationConverter : JsonConverter<ParameterInformation>
Protocol\Converters\StringEnumConverter.cs (1)
19: JsonConverter<TStringEnumType>
Protocol\Converters\SumConverter.cs (1)
180internal class SumConverter<T> : JsonConverter<T>
Protocol\Converters\TextDocumentSyncConverter.cs (1)
12internal class TextDocumentSyncConverter : JsonConverter<TextDocumentSyncOptions>
Protocol\Extensions\Converters\VSExtensionConverter.cs (1)
18internal class VSExtensionConverter<TBase, TExtension> : JsonConverter<TBase>
Protocol\Internal\Converters\ClassifiedTextElementConverter.cs (1)
12internal class ClassifiedTextElementConverter : JsonConverter<ClassifiedTextElement>
Protocol\Internal\Converters\ClassifiedTextRunConverter.cs (1)
11internal class ClassifiedTextRunConverter : JsonConverter<ClassifiedTextRun>
Protocol\Internal\Converters\ContainerElementConverter.cs (1)
15internal class ContainerElementConverter : JsonConverter<ContainerElement>
Protocol\Internal\Converters\ImageElementConverter.cs (1)
12internal class ImageElementConverter : JsonConverter<ImageElement>
Protocol\Internal\Converters\ImageIdConverter.cs (1)
11internal class ImageIdConverter : JsonConverter<ImageId>
Protocol\Internal\Converters\ObjectContentConverter.cs (1)
26internal class ObjectContentConverter : JsonConverter<object>
Protocol\Internal\Converters\RegexConverter.cs (1)
16internal class RegexConverter : JsonConverter<Regex>
Protocol\Internal\Efficiency\OptimizedVSCompletionListJsonConverter.cs (1)
14internal class OptimizedVSCompletionListJsonConverter : JsonConverter<OptimizedVSCompletionList>
Microsoft.JSInterop (5)
Infrastructure\ByteArrayJsonConverter.cs (1)
9internal sealed class ByteArrayJsonConverter : JsonConverter<byte[]>
Infrastructure\DotNetObjectReferenceJsonConverter.cs (1)
11internal sealed class DotNetObjectReferenceJsonConverter<[DynamicallyAccessedMembers(JSInvokable)] TValue> : JsonConverter<DotNetObjectReference<TValue>> where TValue : class
Infrastructure\DotNetStreamReferenceJsonConverter.cs (1)
9internal sealed class DotNetStreamReferenceJsonConverter : JsonConverter<DotNetStreamReference>
Infrastructure\JSObjectReferenceJsonConverter.cs (1)
10internal sealed class JSObjectReferenceJsonConverter : JsonConverter<IJSObjectReference>
Infrastructure\JSStreamReferenceJsonConverter.cs (1)
10internal sealed class JSStreamReferenceJsonConverter : JsonConverter<IJSStreamReference>
Microsoft.JSInterop.WebAssembly (1)
WebAssemblyJSObjectReferenceJsonConverter.cs (1)
10internal sealed class WebAssemblyJSObjectReferenceJsonConverter : JsonConverter<IJSObjectReference>
Microsoft.ML.AutoML (4)
SweepableEstimator\Converter\MultiModelPipelineConverter.cs (1)
13internal class MultiModelPipelineConverter : JsonConverter<MultiModelPipeline>
SweepableEstimator\Converter\SweepableEstimatorConverter.cs (1)
14internal class SweepableEstimatorConverter : JsonConverter<SweepableEstimator>
SweepableEstimator\Converter\SweepableEstimatorPipelineConverter.cs (1)
13internal class SweepableEstimatorPipelineConverter : JsonConverter<SweepableEstimatorPipeline>
SweepableEstimator\Converter\SweepablePipelineConverter.cs (1)
13internal class SweepablePipelineConverter : JsonConverter<SweepablePipeline>
Microsoft.ML.AutoML.Tests (2)
Utils\DoubleToDecimalConverter.cs (1)
11internal class DoubleToDecimalConverter : JsonConverter<double>
Utils\FloatToDecimalConverter.cs (1)
11internal class FloatToDecimalConverter : JsonConverter<float>
Microsoft.ML.SearchSpace (5)
Converter\ChoiceOptionConverter.cs (1)
14internal class ChoiceOptionConverter : JsonConverter<ChoiceOption>
Converter\NumericOptionConverter.cs (1)
14internal class NumericOptionConverter : JsonConverter<UniformNumericOption>
Converter\OptionConverter.cs (1)
14internal class OptionConverter : JsonConverter<OptionBase>
Converter\ParameterConverter.cs (1)
13internal class ParameterConverter : JsonConverter<Parameter>
Converter\SearchSpaceConverter.cs (1)
14internal class SearchSpaceConverter : JsonConverter<SearchSpace>
Microsoft.ML.SearchSpace.Tests (2)
SearchSpaceTest.cs (2)
365class DoubleConverter : JsonConverter<double> 376class SingleConverter : JsonConverter<float>
Microsoft.ML.Tokenizers (3)
Utils\StringSpanOrdinalKey.cs (2)
134internal sealed class StringSpanOrdinalKeyConverter : JsonConverter<StringSpanOrdinalKey> 146internal class VocabularyConverter : JsonConverter<Vocabulary>
Utils\TokenizerExtensions.cs (1)
64internal class DictReversingConverter : JsonConverter<SortedDictionary<int, string>>
System.Memory.Data (1)
System\BinaryDataConverter.cs (1)
9public sealed class BinaryDataJsonConverter : JsonConverter<BinaryData>
System.Text.Json (17)
System\Text\Json\Serialization\Converters\CastingConverter.cs (1)
15internal sealed class CastingConverter<T> : JsonConverter<T>
System\Text\Json\Serialization\Converters\FSharp\FSharpOptionConverter.cs (1)
11internal sealed class FSharpOptionConverter<TOption, TElement> : JsonConverter<TOption>
System\Text\Json\Serialization\Converters\FSharp\FSharpValueOptionConverter.cs (1)
11internal sealed class FSharpValueOptionConverter<TValueOption, TElement> : JsonConverter<TValueOption>
System\Text\Json\Serialization\Converters\Node\JsonArrayConverter.cs (1)
10internal sealed class JsonArrayConverter : JsonConverter<JsonArray?>
System\Text\Json\Serialization\Converters\Node\JsonNodeConverter.cs (1)
15internal sealed class JsonNodeConverter : JsonConverter<JsonNode?>
System\Text\Json\Serialization\Converters\Node\JsonObjectConverter.cs (1)
11internal sealed class JsonObjectConverter : JsonConverter<JsonObject?>
System\Text\Json\Serialization\Converters\Node\JsonValueConverter.cs (1)
10internal sealed class JsonValueConverter : JsonConverter<JsonValue?>
System\Text\Json\Serialization\Converters\Object\ObjectConverter.cs (1)
11internal abstract class ObjectConverter : JsonConverter<object?>
System\Text\Json\Serialization\Converters\Value\ByteArrayConverter.cs (1)
8internal sealed class ByteArrayConverter : JsonConverter<byte[]?>
System\Text\Json\Serialization\Converters\Value\JsonDocumentConverter.cs (1)
9internal sealed class JsonDocumentConverter : JsonConverter<JsonDocument?>
System\Text\Json\Serialization\Converters\Value\JsonElementConverter.cs (1)
9internal sealed class JsonElementConverter : JsonConverter<JsonElement>
System\Text\Json\Serialization\Converters\Value\JsonPrimitiveConverter.cs (1)
14internal abstract class JsonPrimitiveConverter<T> : JsonConverter<T>
System\Text\Json\Serialization\Converters\Value\MemoryByteConverter.cs (1)
9internal sealed class MemoryByteConverter : JsonConverter<Memory<byte>>
System\Text\Json\Serialization\Converters\Value\NullableConverter.cs (1)
8internal sealed class NullableConverter<T> : JsonConverter<T?> where T : struct // Do not rename FQN (legacy schema generation)
System\Text\Json\Serialization\Converters\Value\ReadOnlyMemoryByteConverter.cs (1)
9internal sealed class ReadOnlyMemoryByteConverter : JsonConverter<ReadOnlyMemory<byte>>
System\Text\Json\Serialization\Converters\Value\UnsupportedTypeConverter.cs (1)
9internal sealed class UnsupportedTypeConverter<T> : JsonConverter<T>
System\Text\Json\Serialization\JsonResumableConverterOfT.cs (1)
13internal abstract class JsonResumableConverter<T> : JsonConverter<T>
184 references to JsonConverter
Microsoft.AspNetCore.OpenApi (4)
Schemas\OpenApiJsonSchema.Helpers.cs (4)
222var valueConverter = (JsonConverter<OpenApiJsonSchema>)options.GetTypeInfo(typeof(OpenApiJsonSchema)).Converter; 288var additionalPropsConverter = (JsonConverter<OpenApiJsonSchema>)options.GetTypeInfo(typeof(OpenApiJsonSchema)).Converter;
System.Text.Json (180)
System\Text\Json\Nodes\JsonValueOfTPrimitive.cs (3)
15private readonly JsonConverter<TValue> _converter; 18public JsonValuePrimitive(TValue value, JsonConverter<TValue> converter, JsonNodeOptions? options) : base(value, options) 49JsonConverter<TValue> converter = _converter;
System\Text\Json\Serialization\Converters\Collection\ArrayConverter.cs (1)
38JsonConverter<TElement> elementConverter = GetElementConverter(ref state);
System\Text\Json\Serialization\Converters\Collection\IAsyncEnumerableOfTConverter.cs (1)
96JsonConverter<TElement> converter = GetElementConverter(ref state);
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverter.cs (1)
60JsonConverter<object?> converter = GetElementConverter(ref state);
System\Text\Json\Serialization\Converters\Collection\IEnumerableDefaultConverter.cs (1)
38JsonConverter<TElement> converter = GetElementConverter(ref state);
System\Text\Json\Serialization\Converters\Collection\IListConverter.cs (1)
45JsonConverter<object?> elementConverter = GetElementConverter(ref state);
System\Text\Json\Serialization\Converters\Collection\JsonCollectionConverter.cs (5)
50protected static JsonConverter<TElement> GetElementConverter(JsonTypeInfo elementTypeInfo) 55protected static JsonConverter<TElement> GetElementConverter(ref WriteStack state) 58return (JsonConverter<TElement>)state.Current.JsonPropertyInfo.EffectiveConverter; 85JsonConverter<TElement> elementConverter = GetElementConverter(elementTypeInfo); 198JsonConverter<TElement> elementConverter = GetElementConverter(elementTypeInfo);
System\Text\Json\Serialization\Converters\Collection\JsonDictionaryConverter.cs (4)
64protected JsonConverter<TKey>? _keyConverter; 65protected JsonConverter<TValue>? _valueConverter; 67protected static JsonConverter<T> GetConverter<T>(JsonTypeInfo typeInfo) 314static TKey ReadDictionaryKey(JsonConverter<TKey> keyConverter, ref Utf8JsonReader reader, scoped ref ReadStack state, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Collection\ListOfTConverter.cs (1)
42JsonConverter<TElement> elementConverter = GetElementConverter(ref state);
System\Text\Json\Serialization\Converters\Collection\ReadOnlyMemoryConverter.cs (1)
56JsonConverter<T> elementConverter = GetElementConverter(ref state);
System\Text\Json\Serialization\Converters\Collection\RootLevelListConverter.cs (1)
30JsonConverter<T> elementConverter = _elementTypeInfo.EffectiveConverter;
System\Text\Json\Serialization\Converters\Collection\StackOrQueueConverter.cs (1)
60JsonConverter<object?> converter = GetElementConverter(ref state);
System\Text\Json\Serialization\Converters\FSharp\FSharpOptionConverter.cs (2)
19private readonly JsonConverter<TElement> _elementConverter; 25public FSharpOptionConverter(JsonConverter<TElement> elementConverter)
System\Text\Json\Serialization\Converters\FSharp\FSharpValueOptionConverter.cs (2)
19private readonly JsonConverter<TElement> _elementConverter; 25public FSharpValueOptionConverter(JsonConverter<TElement> elementConverter)
System\Text\Json\Serialization\Converters\JsonMetadataServicesConverter.cs (3)
14/// reference to an actual <see cref="JsonConverter{T}"/> for the type 21internal JsonConverter<T> Converter { get; } 34public JsonMetadataServicesConverter(JsonConverter<T> converter)
System\Text\Json\Serialization\Converters\Value\EnumConverterFactory.cs (1)
56public static JsonConverter<T> Create<T>(EnumConverterOptions converterOptions, JsonSerializerOptions options, JsonNamingPolicy? namingPolicy = null)
System\Text\Json\Serialization\Converters\Value\NullableConverter.cs (2)
18private readonly JsonConverter<T> _elementConverter; // Do not rename (legacy schema generation) 20public NullableConverter(JsonConverter<T> elementConverter)
System\Text\Json\Serialization\JsonConverter.cs (3)
28/// For instances of type <see cref="JsonConverter{T}"/> returns typeof(T), 120internal JsonConverter<TTarget> CreateCastingConverter<TTarget>() 124if (this is JsonConverter<TTarget> conv)
System\Text\Json\Serialization\JsonConverterFactory.cs (1)
30/// An instance of a <see cref="JsonConverter{T}"/> where T is compatible with <paramref name="typeToConvert"/>.
System\Text\Json\Serialization\JsonConverterOfT.cs (7)
18/// When overridden, constructs a new <see cref="JsonConverter{T}"/> instance. 594JsonConverter<T>? fallbackConverter = GetFallbackConverterForPropertyNameSerialization(options); 627JsonConverter<T>? fallbackConverter = GetFallbackConverterForPropertyNameSerialization(options); 661private JsonConverter<T>? GetFallbackConverterForPropertyNameSerialization(JsonSerializerOptions options) 663JsonConverter<T>? result = null; 674_fallbackConverterForPropertyNameSerialization = result = (JsonConverter<T>)defaultConverter; 681private JsonConverter<T>? _fallbackConverterForPropertyNameSerialization;
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Converters.cs (122)
12/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="bool"/> values. 15public static JsonConverter<bool> BooleanConverter => s_booleanConverter ??= new BooleanConverter(); 16private static JsonConverter<bool>? s_booleanConverter; 19/// Returns a <see cref="JsonConverter{T}"/> instance that converts byte array values. 22public static JsonConverter<byte[]?> ByteArrayConverter => s_byteArrayConverter ??= new ByteArrayConverter(); 23private static JsonConverter<byte[]?>? s_byteArrayConverter; 26/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="byte"/> values. 29public static JsonConverter<byte> ByteConverter => s_byteConverter ??= new ByteConverter(); 30private static JsonConverter<byte>? s_byteConverter; 33/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="char"/> values. 36public static JsonConverter<char> CharConverter => s_charConverter ??= new CharConverter(); 37private static JsonConverter<char>? s_charConverter; 40/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="DateTime"/> values. 43public static JsonConverter<DateTime> DateTimeConverter => s_dateTimeConverter ??= new DateTimeConverter(); 44private static JsonConverter<DateTime>? s_dateTimeConverter; 47/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="DateTimeOffset"/> values. 50public static JsonConverter<DateTimeOffset> DateTimeOffsetConverter => s_dateTimeOffsetConverter ??= new DateTimeOffsetConverter(); 51private static JsonConverter<DateTimeOffset>? s_dateTimeOffsetConverter; 55/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="DateOnly"/> values. 58public static JsonConverter<DateOnly> DateOnlyConverter => s_dateOnlyConverter ??= new DateOnlyConverter(); 59private static JsonConverter<DateOnly>? s_dateOnlyConverter; 62/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="TimeOnly"/> values. 65public static JsonConverter<TimeOnly> TimeOnlyConverter => s_timeOnlyConverter ??= new TimeOnlyConverter(); 66private static JsonConverter<TimeOnly>? s_timeOnlyConverter; 70/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="decimal"/> values. 73public static JsonConverter<decimal> DecimalConverter => s_decimalConverter ??= new DecimalConverter(); 74private static JsonConverter<decimal>? s_decimalConverter; 77/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="double"/> values. 80public static JsonConverter<double> DoubleConverter => s_doubleConverter ??= new DoubleConverter(); 81private static JsonConverter<double>? s_doubleConverter; 84/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="Guid"/> values. 87public static JsonConverter<Guid> GuidConverter => s_guidConverter ??= new GuidConverter(); 88private static JsonConverter<Guid>? s_guidConverter; 91/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="short"/> values. 94public static JsonConverter<short> Int16Converter => s_int16Converter ??= new Int16Converter(); 95private static JsonConverter<short>? s_int16Converter; 98/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="int"/> values. 101public static JsonConverter<int> Int32Converter => s_int32Converter ??= new Int32Converter(); 102private static JsonConverter<int>? s_int32Converter; 105/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="long"/> values. 108public static JsonConverter<long> Int64Converter => s_int64Converter ??= new Int64Converter(); 109private static JsonConverter<long>? s_int64Converter; 113/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="Int128"/> values. 116public static JsonConverter<Int128> Int128Converter => s_int128Converter ??= new Int128Converter(); 117private static JsonConverter<Int128>? s_int128Converter; 120/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="UInt128"/> values. 124public static JsonConverter<UInt128> UInt128Converter => s_uint128Converter ??= new UInt128Converter(); 125private static JsonConverter<UInt128>? s_uint128Converter; 129/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="JsonArray"/> values. 132public static JsonConverter<JsonArray?> JsonArrayConverter => s_jsonArrayConverter ??= new JsonArrayConverter(); 133private static JsonConverter<JsonArray?>? s_jsonArrayConverter; 136/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="JsonElement"/> values. 139public static JsonConverter<JsonElement> JsonElementConverter => s_jsonElementConverter ??= new JsonElementConverter(); 140private static JsonConverter<JsonElement>? s_jsonElementConverter; 143/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="JsonNode"/> values. 146public static JsonConverter<JsonNode?> JsonNodeConverter => s_jsonNodeConverter ??= new JsonNodeConverter(); 147private static JsonConverter<JsonNode?>? s_jsonNodeConverter; 150/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="JsonObject"/> values. 153public static JsonConverter<JsonObject?> JsonObjectConverter => s_jsonObjectConverter ??= new JsonObjectConverter(); 154private static JsonConverter<JsonObject?>? s_jsonObjectConverter; 157/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="JsonArray"/> values. 160public static JsonConverter<JsonValue?> JsonValueConverter => s_jsonValueConverter ??= new JsonValueConverter(); 161private static JsonConverter<JsonValue?>? s_jsonValueConverter; 164/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="JsonDocument"/> values. 167public static JsonConverter<JsonDocument?> JsonDocumentConverter => s_jsonDocumentConverter ??= new JsonDocumentConverter(); 168private static JsonConverter<JsonDocument?>? s_jsonDocumentConverter; 171/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="Memory{Byte}"/> values. 174public static JsonConverter<Memory<byte>> MemoryByteConverter => s_memoryByteConverter ??= new MemoryByteConverter(); 175private static JsonConverter<Memory<byte>>? s_memoryByteConverter; 178/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="ReadOnlyMemory{Byte}"/> values. 181public static JsonConverter<ReadOnlyMemory<byte>> ReadOnlyMemoryByteConverter => s_readOnlyMemoryByteConverter ??= new ReadOnlyMemoryByteConverter(); 182private static JsonConverter<ReadOnlyMemory<byte>>? s_readOnlyMemoryByteConverter; 185/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="object"/> values. 188public static JsonConverter<object?> ObjectConverter => s_objectConverter ??= new DefaultObjectConverter(); 189private static JsonConverter<object?>? s_objectConverter; 193/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="Half"/> values. 196public static JsonConverter<Half> HalfConverter => s_halfConverter ??= new HalfConverter(); 197private static JsonConverter<Half>? s_halfConverter; 201/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="float"/> values. 204public static JsonConverter<float> SingleConverter => s_singleConverter ??= new SingleConverter(); 205private static JsonConverter<float>? s_singleConverter; 208/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="sbyte"/> values. 212public static JsonConverter<sbyte> SByteConverter => s_sbyteConverter ??= new SByteConverter(); 213private static JsonConverter<sbyte>? s_sbyteConverter; 216/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="string"/> values. 219public static JsonConverter<string?> StringConverter => s_stringConverter ??= new StringConverter(); 220private static JsonConverter<string?>? s_stringConverter; 223/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="TimeSpan"/> values. 226public static JsonConverter<TimeSpan> TimeSpanConverter => s_timeSpanConverter ??= new TimeSpanConverter(); 227private static JsonConverter<TimeSpan>? s_timeSpanConverter; 230/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="ushort"/> values. 234public static JsonConverter<ushort> UInt16Converter => s_uint16Converter ??= new UInt16Converter(); 235private static JsonConverter<ushort>? s_uint16Converter; 238/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="uint"/> values. 242public static JsonConverter<uint> UInt32Converter => s_uint32Converter ??= new UInt32Converter(); 243private static JsonConverter<uint>? s_uint32Converter; 246/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="ulong"/> values. 250public static JsonConverter<ulong> UInt64Converter => s_uint64Converter ??= new UInt64Converter(); 251private static JsonConverter<ulong>? s_uint64Converter; 254/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="Uri"/> values. 257public static JsonConverter<Uri?> UriConverter => s_uriConverter ??= new UriConverter(); 258private static JsonConverter<Uri?>? s_uriConverter; 261/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="Version"/> values. 264public static JsonConverter<Version?> VersionConverter => s_versionConverter ??= new VersionConverter(); 265private static JsonConverter<Version?>? s_versionConverter; 268/// Creates a <see cref="JsonConverter{T}"/> instance that throws <see cref="NotSupportedException"/>. 271/// <returns>A <see cref="JsonConverter{T}"/> instance that throws <see cref="NotSupportedException"/></returns> 273public static JsonConverter<T> GetUnsupportedTypeConverter<T>() 277/// Creates a <see cref="JsonConverter{T}"/> instance that converts <typeparamref name="T"/> values. 281/// <returns>A <see cref="JsonConverter{T}"/> instance that converts <typeparamref name="T"/> values.</returns> 283public static JsonConverter<T> GetEnumConverter<T>(JsonSerializerOptions options) where T : struct, Enum 294/// Creates a <see cref="JsonConverter{T}"/> instance that converts <typeparamref name="T?"/> values. 298/// <returns>A <see cref="JsonConverter{T}"/> instance that converts <typeparamref name="T?"/> values</returns> 300public static JsonConverter<T?> GetNullableConverter<T>(JsonTypeInfo<T> underlyingTypeInfo) where T : struct 307JsonConverter<T> underlyingConverter = GetTypedConverter<T>(underlyingTypeInfo.Converter); 313/// Creates a <see cref="JsonConverter{T}"/> instance that converts <typeparamref name="T?"/> values. 317/// <returns>A <see cref="JsonConverter{T}"/> instance that converts <typeparamref name="T?"/> values</returns> 319public static JsonConverter<T?> GetNullableConverter<T>(JsonSerializerOptions options) where T : struct 326JsonConverter<T> underlyingConverter = GetTypedConverter<T>(options.GetConverterInternal(typeof(T))); 331internal static JsonConverter<T> GetTypedConverter<T>(JsonConverter converter) 333JsonConverter<T>? typedConverter = converter as JsonConverter<T>;
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (4)
32JsonConverter<T> converter = GetConverter(objectInfo); 74JsonConverter<T> converter, 106private static JsonConverter<T> GetConverter<T>(JsonObjectInfoValues<T> objectInfo) 109JsonConverter<T> converter = objectInfo.ObjectWithParameterizedConstructorCreator != null
System\Text\Json\Serialization\Metadata\JsonParameterInfoOfT.cs (1)
14public new JsonConverter<T> EffectiveConverter => MatchingProperty.EffectiveConverter;
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (5)
864JsonConverter<object> converter = GetDictionaryValueConverter<object>(); 871JsonConverter<JsonElement> converter = GetDictionaryValueConverter<JsonElement>(); 884JsonConverter<TValue> GetDictionaryValueConverter<TValue>() 912JsonConverter<JsonElement> converter = (JsonConverter<JsonElement>)Options.GetConverterInternal(typeof(JsonElement));
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (3)
131internal new JsonConverter<T> EffectiveConverter 140private JsonConverter<T>? _typedEffectiveConverter; 151JsonConverter<T> converter =
System\Text\Json\Serialization\Metadata\JsonPropertyInfoValuesOfT.cs (2)
12/// <typeparam name="T">The type to convert of the <see cref="JsonConverter{T}"/> for the property.</typeparam> 44public JsonConverter<T>? Converter { get; init; }
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (1)
30internal JsonConverter<T> EffectiveConverter { get; }