Struct JsonConverterFactoryContext
- Namespace
- Nerdbank.Json
- Assembly
- Nerdbank.Json.dll
Provides converter lookup services while a IJsonConverterFactory is creating a converter.
public readonly struct JsonConverterFactoryContext
- Inherited Members
Methods
GetConverter<T>()
Gets a converter for a specific type.
public JsonConverter<T> GetConverter<T>() where T : IShapeable<T>
Returns
- JsonConverter<T>
The converter.
Type Parameters
TThe type to convert.
GetConverter<T>(ITypeShape<T>)
Gets a converter for a specific type shape.
public JsonConverter<T> GetConverter<T>(ITypeShape<T> shape)
Parameters
shapeITypeShape<T>The type shape.
Returns
- JsonConverter<T>
The converter.
Type Parameters
TThe type to convert.
GetConverter<T, TProvider>()
Gets a converter for a specific type.
public JsonConverter<T> GetConverter<T, TProvider>() where TProvider : IShapeable<T>
Returns
- JsonConverter<T>
The converter.
Type Parameters
TThe type to convert.
TProviderThe witness type that provides the shape for
T.