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
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: Under hela 2024 kommer vi att fasa ut GitHub-problem som feedbackmekanism för innehåll och ersätta det med ett nytt feedbacksystem. Mer information finns i:Skicka och visa feedback för