Table of Contents

Interface IJsonConverterFactory

Namespace
Nerdbank.Json
Assembly
Nerdbank.Json.dll

Creates JsonConverter instances for types discovered at runtime.

public interface IJsonConverterFactory

Methods

CreateConverter(Type, ITypeShape?, in JsonConverterFactoryContext)

Creates a converter for the requested type if this factory applies.

JsonConverter? CreateConverter(Type type, ITypeShape? shape, in JsonConverterFactoryContext context)

Parameters

type Type

The requested data type.

shape ITypeShape

The PolyType shape describing type, when available.

context JsonConverterFactoryContext

A context that can resolve additional converters needed by the created converter.

Returns

JsonConverter

A converter if this factory applies to the type; otherwise, null.