JsonStringEnumConverter.CreateConverter(Type, JsonSerializerOptions) 方法

定义

创建指定类型的转换器。

public:
 override System::Text::Json::Serialization::JsonConverter ^ CreateConverter(Type ^ typeToConvert, System::Text::Json::JsonSerializerOptions ^ options);
public override System.Text.Json.Serialization.JsonConverter CreateConverter (Type typeToConvert, System.Text.Json.JsonSerializerOptions options);
public override sealed System.Text.Json.Serialization.JsonConverter CreateConverter (Type typeToConvert, System.Text.Json.JsonSerializerOptions options);
override this.CreateConverter : Type * System.Text.Json.JsonSerializerOptions -> System.Text.Json.Serialization.JsonConverter
Public Overrides Function CreateConverter (typeToConvert As Type, options As JsonSerializerOptions) As JsonConverter
Public Overrides NotOverridable Function CreateConverter (typeToConvert As Type, options As JsonSerializerOptions) As JsonConverter

参数

typeToConvert
Type

转换器处理的类型。

options
JsonSerializerOptions

要使用的序列化选项。

返回

JsonConverter

TtypeToConvert 兼容的转换器。

适用于