Table of Contents

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

options JsonSerializerOptions

The 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

DefaultJsonSerializerContext

GeneratedSerializerOptions

The source-generated options associated with this context.

protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }

Property Value

JsonSerializerOptions

TokenResponse

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<TokenResponse> TokenResponse { get; }

Property Value

JsonTypeInfo<TokenResponse>

Methods

GetTypeInfo(Type)

Gets metadata for the specified type.

public override JsonTypeInfo? GetTypeInfo(Type type)

Parameters

type Type

The type to fetch metadata for.

Returns

JsonTypeInfo

The metadata for the specified type, or null if the context has no metadata for the type.