Class DefaultJsonSerializerContext
- Namespace
- Visus.AddressValidation.Serialization.Json
- Assembly
- Visus.AddressValidation.dll
Default JsonSerializerContext for the library.
[ExcludeFromCodeCoverage]
[JsonSerializable(typeof(TokenResponse))]
[JsonSourceGenerationOptions(WriteIndented = false)]
public class DefaultJsonSerializerContext : JsonSerializerContext, IJsonTypeInfoResolver
- Inheritance
-
DefaultJsonSerializerContext
- Implements
- Inherited Members
Constructors
DefaultJsonSerializerContext()
public DefaultJsonSerializerContext()
DefaultJsonSerializerContext(JsonSerializerOptions)
Creates an instance of JsonSerializerContext and binds it with the indicated JsonSerializerOptions.
public DefaultJsonSerializerContext(JsonSerializerOptions options)
Parameters
optionsJsonSerializerOptionsThe run time provided options for the context instance.
Properties
Default
The default JsonSerializerContext associated with a default JsonSerializerOptions instance.
public static DefaultJsonSerializerContext Default { get; }
Property Value
GeneratedSerializerOptions
The source-generated options associated with this context.
protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }
Property Value
TokenResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<TokenResponse> TokenResponse { get; }
Property Value
Methods
GetTypeInfo(Type)
Gets metadata for the specified type.
public override JsonTypeInfo? GetTypeInfo(Type type)
Parameters
typeTypeThe type to fetch metadata for.
Returns
- JsonTypeInfo
The metadata for the specified type, or null if the context has no metadata for the type.