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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應