[API Proposal]: JsonDerivedTypeAttribute<T> for simplified polymorphic JSON configuration #99421
Labels
api-suggestion
Early API idea and discussion, it is NOT ready for implementation
area-System.Text.Json
Background and motivation
You currently have to decide on a "discriminator name" for derived types, such as:
In many cases, choosing the type name as the discrimantor makes perfect sense.
Since attributes can now be generic, it would make sense to leverage that to simplify the annotation.
API Proposal
Alternative Designs
Perhaps the overload to override the discriminator string is unnecessary?
Risks
No response
The text was updated successfully, but these errors were encountered: