Table of Contents

GetConverter Method

Definition

Namespace
System.Text.Json.Serialization
Assembly
Tyne.Core.dll

Methods

| Edit this page View Source

GetConverter<T>(JsonSerializerOptions)

Loads a JsonConverter<T> for T from options. Throws an InvalidOperationException if one is not found.

Declaration
public static JsonConverter<T> GetConverter<T>(this JsonSerializerOptions options)
Parameters
Returns
JsonConverter<T>

A JsonConverter<T> for T from options.

Type Parameters
T

The type of object or value handled by the converter.

Exceptions
ArgumentNullException

When options is null.

InvalidOperationException

When no JsonConverter<T> for T is found in options.