<PackageReference Include="System.Text.Json" Version="9.0.0-preview.3.24172.9" />

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; }

Gets a value that indicates whether the current instance has been locked for modification.

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 the IJsonTypeInfoResolver from which this metadata instance originated.

Gets or sets a configuration object specifying polymorphism metadata.

Gets or sets the preferred JsonObjectCreationHandling value for properties contained in the type.

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.

Gets or sets the type-level JsonUnmappedMemberHandling override.

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()

Locks the current instance for further modification.