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
Samarbejd med os på GitHub
Kilden til dette indhold kan findes på GitHub, hvor du også kan oprette og gennemse problemer og pullanmodninger. Du kan få flere oplysninger i vores vejledning til bidragydere.