I would like to request a feature where the property used for JsonTypeInfo to indicate JsonSubTypes could be set a logical property on the object aswell.
Here is the email between me and Tatu
> Hi Tatu,
> > That worked out great.
> > Another quick question, is it possible to also set a field on the class when
> > the deserialization happens. We have a enum called on Type on PriceSheetItem
> > and I would like that varaible set aswell as creating right type of an
> > object. I know technically I can just hardcode in the sub types to return
> > the right implementation, but wondering if something like this is possible.
There is no way to automatically do that at this point. Could be a new
feature to add; indicate logical property to set with type string (or
enum since that is easy to convert to).
If you think that is a good idea, feel free to add Jira feature request.
+ Tatu +