Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve ObjectWriter.forType() to avoid forcing base type for container types #727

Closed
cowtowncoder opened this issue Mar 19, 2015 · 0 comments
Milestone

Comments

@cowtowncoder
Copy link
Member

(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.

@cowtowncoder cowtowncoder changed the title Add a way to specify "polymorphic base type" for ObjectWriter without forcing static type Improve ObjectWriter.forType() to avoid forcing base type for container types Mar 19, 2015
@cowtowncoder cowtowncoder added this to the 2.6.0 milestone Mar 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant