JsonSerializerOptions.GetConverter(Type) 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.
Returns the converter for the specified type.
public:
System::Text::Json::Serialization::JsonConverter ^ GetConverter(Type ^ typeToConvert);
public System.Text.Json.Serialization.JsonConverter GetConverter (Type typeToConvert);
member this.GetConverter : Type -> System.Text.Json.Serialization.JsonConverter
Public Function GetConverter (typeToConvert As Type) As JsonConverter
Parameters
- typeToConvert
- Type
The type to return a converter for.
Returns
The first converter that supports the given type.
Exceptions
The configured JsonConverter for typeToConvert
returned an invalid converter.
There is no compatible JsonConverter for typeToConvert
or its serializable members.
Remarks
For more information, see How to write custom converters for JSON serialization (marshalling) in .NET.
Applies to
Maklum balas
https://aka.ms/ContentUserFeedback.
Akan datang: Sepanjang 2024, kami akan menghentikan secara berperingkat Isu GitHub sebagai kaedah maklum balas untuk kandungan dan menggantikannya dengan sistem maklum balas baharu. Untuk mendapatkan maklumat lanjut lihat:Kirim dan lihat maklum balas untuk