CreateConverter Method
Definition
- Namespace
- Tyne
- Assembly
- Tyne.Core.dll
Methods
| Edit this page View SourceCreateConverter(Type, JsonSerializerOptions)
Creates a JsonConverter for the provided typeToConvert
.
Declaration
public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options)
Parameters
typeToConvert
- Type
The Type being converted.
options
- JsonSerializerOptions
The JsonSerializerOptions being used.
Returns
JsonConverterAn instance of a JsonConverter<T> where T is compatible with typeToConvert
.
Overrides
Remarks
While this internally verifies CanConvert(Type), this should be checked first by the caller.
Exceptions
- ArgumentNullException
When
typeToConvert
oroptions
are null.
- NotSupportedException
If CanConvert(Type) returns false for
typeToConvert
.