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
typeTypeThe requested data type.
shapeITypeShapeThe PolyType shape describing
type, when available.contextJsonConverterFactoryContextA context that can resolve additional converters needed by the created converter.
Returns
- JsonConverter
A converter if this factory applies to the type; otherwise, null.