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: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om