(for background, see FasterXML/jackson-jaxrs-providers#60)
ObjectWriter
has forType()
method that allows forcing of full type to use for serialization, and it works reasonable well for many use cases. But it does not work well for one specific class of problems; that of generic Collection
(and Map
) types with heterogenous non-polymorphic content. In those cases serialization will use base class serializer, which often is not what is wanted.
If possible, it would be good to avoid forcing use of base type for content values.