Edit

Share via


JsonDerivedTypeAttribute Constructors

Definition

Overloads

JsonDerivedTypeAttribute(Type)

Initializes a new attribute with specified parameters.

JsonDerivedTypeAttribute(Type, Int32)

Initializes a new attribute with specified parameters.

JsonDerivedTypeAttribute(Type, String)

Initializes a new attribute with specified parameters.

JsonDerivedTypeAttribute(Type)

Source:
JsonDerivedTypeAttribute.cs
Source:
JsonDerivedTypeAttribute.cs
Source:
JsonDerivedTypeAttribute.cs

Initializes a new attribute with specified parameters.

public:
 JsonDerivedTypeAttribute(Type ^ derivedType);
public JsonDerivedTypeAttribute (Type derivedType);
new System.Text.Json.Serialization.JsonDerivedTypeAttribute : Type -> System.Text.Json.Serialization.JsonDerivedTypeAttribute
Public Sub New (derivedType As Type)

Parameters

derivedType
Type

A derived type that should be supported in polymorphic serialization of the declared based type.

Applies to

JsonDerivedTypeAttribute(Type, Int32)

Source:
JsonDerivedTypeAttribute.cs
Source:
JsonDerivedTypeAttribute.cs
Source:
JsonDerivedTypeAttribute.cs

Initializes a new attribute with specified parameters.

public:
 JsonDerivedTypeAttribute(Type ^ derivedType, int typeDiscriminator);
public JsonDerivedTypeAttribute (Type derivedType, int typeDiscriminator);
new System.Text.Json.Serialization.JsonDerivedTypeAttribute : Type * int -> System.Text.Json.Serialization.JsonDerivedTypeAttribute
Public Sub New (derivedType As Type, typeDiscriminator As Integer)

Parameters

derivedType
Type

A derived type that should be supported in polymorphic serialization of the declared base type.

typeDiscriminator
Int32

The type discriminator identifier to be used for the serialization of the subtype.

Applies to

JsonDerivedTypeAttribute(Type, String)

Source:
JsonDerivedTypeAttribute.cs
Source:
JsonDerivedTypeAttribute.cs
Source:
JsonDerivedTypeAttribute.cs

Initializes a new attribute with specified parameters.

public:
 JsonDerivedTypeAttribute(Type ^ derivedType, System::String ^ typeDiscriminator);
public JsonDerivedTypeAttribute (Type derivedType, string typeDiscriminator);
new System.Text.Json.Serialization.JsonDerivedTypeAttribute : Type * string -> System.Text.Json.Serialization.JsonDerivedTypeAttribute
Public Sub New (derivedType As Type, typeDiscriminator As String)

Parameters

derivedType
Type

A derived type that should be supported in polymorphic serialization of the declared base type.

typeDiscriminator
String

The type discriminator identifier to be used for the serialization of the subtype.

Applies to