Add method ObjectWriter.forBaseType(class/JavaType)
for tricky polymorphic cases
#789
Labels
duplicate
Duplicate of an existing (usually earlier) issue
Currently forcing of type information for
ObjectWriter
only allows specifying both implementation type to use (for locatingJsonSerializer
) AND "base type" used byTypeSerializer
. Since behavior varies between the two, there are cases where one would want to use different type, to specifically force use of a particular base type to produce type id(s) desired.As far as I can see, this is only needed on writer (serialization) side: during deserialization, there is no distinction between actual runtime type (of an instance) and base type, and a single type works for both.
The text was updated successfully, but these errors were encountered: