<PackageReference Include="NJsonSchema" Version="10.0.10" />

JsonInheritanceConverter

Defines the class as inheritance base class and adds a discriminator property to the serialized object.
public static string DefaultDiscriminatorName { get; }

Gets the default discriminiator name.

public virtual string DiscriminatorName { get; }

Gets the discriminator property name.

Initializes a new instance of the JsonInheritanceConverter class.

public JsonInheritanceConverter(string discriminator)

Initializes a new instance of the JsonInheritanceConverter class.

public JsonInheritanceConverter(string discriminator, bool readTypeProperty)

Initializes a new instance of the JsonInheritanceConverter class.

public JsonInheritanceConverter(Type baseType)

Initializes a new instance of the JsonInheritanceConverter class which only applies for the given base type.

public JsonInheritanceConverter(Type baseType, string discriminator)

Initializes a new instance of the JsonInheritanceConverter class which only applies for the given base type.

protected virtual Type GetDiscriminatorType(JObject jObject, Type objectType, string discriminatorValue)

Gets the type for the given discriminator value.

public virtual string GetDiscriminatorValue(Type type)

Gets the discriminator value for the given type.