JsonMetadataServices.GetNullableConverter Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetNullableConverter<T>(JsonSerializerOptions) |
Creates a JsonConverter<T> instance that converts |
GetNullableConverter<T>(JsonTypeInfo<T>) |
Creates a JsonConverter<T> instance that converts |
GetNullableConverter<T>(JsonSerializerOptions)
Creates a JsonConverter<T> instance that converts T??
values.
public:
generic <typename T>
where T : value class static System::Text::Json::Serialization::JsonConverter<Nullable<T>> ^ GetNullableConverter(System::Text::Json::JsonSerializerOptions ^ options);
public static System.Text.Json.Serialization.JsonConverter<T?> GetNullableConverter<T> (System.Text.Json.JsonSerializerOptions options) where T : struct;
static member GetNullableConverter : System.Text.Json.JsonSerializerOptions -> System.Text.Json.Serialization.JsonConverter<Nullable<'T>> (requires 'T : struct)
Public Shared Function GetNullableConverter(Of T As Structure) (options As JsonSerializerOptions) As JsonConverter(Of Nullable(Of T))
Type Parameters
- T
The generic definition for the underlying nullable type.
Parameters
- options
- JsonSerializerOptions
The JsonSerializerOptions to use for serialization and deserialization.
Returns
A JsonConverter<T> instance that converts T??
values
Remarks
This API is for use by the output of the System.Text.Json source generator and should not be called directly.
Applies to
GetNullableConverter<T>(JsonTypeInfo<T>)
Creates a JsonConverter<T> instance that converts T??
values.
public:
generic <typename T>
where T : value class static System::Text::Json::Serialization::JsonConverter<Nullable<T>> ^ GetNullableConverter(System::Text::Json::Serialization::Metadata::JsonTypeInfo<T> ^ underlyingTypeInfo);
public static System.Text.Json.Serialization.JsonConverter<T?> GetNullableConverter<T> (System.Text.Json.Serialization.Metadata.JsonTypeInfo<T> underlyingTypeInfo) where T : struct;
static member GetNullableConverter : System.Text.Json.Serialization.Metadata.JsonTypeInfo<'T (requires 'T : struct)> -> System.Text.Json.Serialization.JsonConverter<Nullable<'T>> (requires 'T : struct)
Public Shared Function GetNullableConverter(Of T As Structure) (underlyingTypeInfo As JsonTypeInfo(Of T)) As JsonConverter(Of Nullable(Of T))
Type Parameters
- T
The generic definition for the underlying nullable type.
Parameters
- underlyingTypeInfo
- JsonTypeInfo<T>
Serialization metadata for the underlying nullable type.
Returns
A JsonConverter<T> instance that converts T??
values
Remarks
This API is for use by the output of the System.Text.Json source generator and should not be called directly.
Applies to
.NET