TryGetConverter Method
Definition
- Namespace
- System.Text.Json.Serialization
- Assembly
- Tyne.Core.dll
Methods
| Edit this page View SourceTryGetConverter<T>(JsonSerializerOptions)
Tries to load a JsonConverter<T> for T
from options
.
Returns null if one is not found.
Declaration
public static JsonConverter<T>? TryGetConverter<T>(this JsonSerializerOptions options)
Parameters
options
- JsonSerializerOptions
Returns
JsonConverter<T>A JsonConverter<T> for T
if one was found in options
.
Otherwise, null.
Type Parameters
T
The type of object or value handled by the converter.
Exceptions
- ArgumentNullException
When
options
is null.