<PackageReference Include="System.Text.Json" Version="8.0.0-preview.1.23110.8" />

JsonTypeInfo

public abstract class JsonTypeInfo
Provides JSON serialization-related metadata about a type.
public JsonConverter Converter { get; }

Gets the JsonConverter associated with the current type.

public Func<object> CreateObject { get; set; }

Gets or sets a parameterless factory to be used on deserialization.

public bool IsReadOnly { get; }

public JsonTypeInfoKind Kind { get; }

Gets a value that describes the kind of contract metadata that the current instance specifies.

public JsonNumberHandling? NumberHandling { get; set; }

Gets or sets the type-level NumberHandling override.

public Action<object> OnDeserialized { get; set; }

Gets or sets a callback to be invoked after deserialization occurs.

public Action<object> OnDeserializing { get; set; }

Gets or sets a callback to be invoked before deserialization occurs.

public Action<object> OnSerialized { get; set; }

Gets or sets a callback to be invoked after serialization occurs.

public Action<object> OnSerializing { get; set; }

Gets or sets a callback to be invoked before serialization occurs.

Gets the JsonSerializerOptions value associated with the current JsonTypeInfo instance.

Gets or sets a configuration object specifying polymorphism metadata.

Gets the list of JsonPropertyInfo metadata corresponding to the current type.

public Type Type { get; }

Gets the Type for which the JSON serialization contract is being defined.

Creates a blank JsonTypeInfo<T> instance.

Creates a blank JsonTypeInfo instance.

public JsonPropertyInfo CreateJsonPropertyInfo(Type propertyType, string name)

Creates a blank JsonPropertyInfo instance for the current JsonTypeInfo.

public void MakeReadOnly()