JsonConverterFactory.CreateConverter(Type, 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 converter for a specified type.
public:
abstract System::Text::Json::Serialization::JsonConverter ^ CreateConverter(Type ^ typeToConvert, System::Text::Json::JsonSerializerOptions ^ options);
public abstract System.Text.Json.Serialization.JsonConverter? CreateConverter (Type typeToConvert, System.Text.Json.JsonSerializerOptions options);
public abstract System.Text.Json.Serialization.JsonConverter CreateConverter (Type typeToConvert, System.Text.Json.JsonSerializerOptions options);
abstract member CreateConverter : Type * System.Text.Json.JsonSerializerOptions -> System.Text.Json.Serialization.JsonConverter
Public MustOverride Function CreateConverter (typeToConvert As Type, options As JsonSerializerOptions) As JsonConverter
Parameters
- typeToConvert
- Type
The type handled by the converter.
- options
- JsonSerializerOptions
The serialization options to use.
Returns
A converter for which T
is compatible with typeToConvert
.
Remarks
For more information, see How to write custom converters for JSON serialization.
Applies to
ทํางานร่วมกับเราใน GitHub
แหล่งที่มาสำหรับเนื้อหานี้สามารถพบได้บน GitHub ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา