JsonMetadataServices.GetEnumConverter<T>(JsonSerializerOptions) 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.
Creates a JsonConverter<T> instance that converts T
values.
public:
generic <typename T>
where T : value class static System::Text::Json::Serialization::JsonConverter<T> ^ GetEnumConverter(System::Text::Json::JsonSerializerOptions ^ options);
public static System.Text.Json.Serialization.JsonConverter<T> GetEnumConverter<T> (System.Text.Json.JsonSerializerOptions options) where T : struct;
static member GetEnumConverter : System.Text.Json.JsonSerializerOptions -> System.Text.Json.Serialization.JsonConverter<'T (requires 'T : struct)> (requires 'T : struct)
Public Shared Function GetEnumConverter(Of T As Structure) (options As JsonSerializerOptions) As JsonConverter(Of T)
Type Parameters
- T
The generic definition for the enum 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
Colaborar conosco no GitHub
A fonte deste conteúdo pode ser encontrada no GitHub, onde você também pode criar e revisar problemas e solicitações de pull. Para obter mais informações, confira o nosso guia para colaboradores.