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

System.Text.Json.Serialization.JsonPolymorphicAttribute

public sealed class JsonPolymorphicAttribute : JsonAttribute
When placed on a type, indicates that the type should be serialized polymorphically.
namespace System.Text.Json.Serialization { public sealed class JsonPolymorphicAttribute : JsonAttribute { public string TypeDiscriminatorPropertyName { get; set; } public JsonUnknownDerivedTypeHandling UnknownDerivedTypeHandling { get; set; } public bool IgnoreUnrecognizedTypeDiscriminators { get; set; } public JsonPolymorphicAttribute(); } }