Closed mgroth0 closed 1 year ago
This is supported through the policy. For the default policy you can set it using the typeDiscriminatorName
property. The general case is the polymorphicDiscriminatorName
function that allows this to be specified per item. This can be implemented in any way to determine the discriminator to use, including an annotation.
@JsonClassDiscriminator allows for a custom type discriminator for one type hierarchy. Is there an equivalent feature for Xml? If not, I suggest it.