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