<PackageReference Include="System.Text.Json" Version="7.0.4" />

JsonConverterAttribute

When placed on a property, field, or type, specifies the converter type to use.
public Type ConverterType { get; }

The type of the converter to create, or null if CreateConverter should be used to obtain the converter.

public JsonConverterAttribute(Type converterType)

Initializes a new instance of JsonConverterAttribute with the specified converter type.

Initializes a new instance of JsonConverterAttribute.

public virtual JsonConverter CreateConverter(Type typeToConvert)

If overridden and ConverterType is null, allows a custom attribute to create the converter in order to pass additional state.