Skip to content

Feature request: Provide a means for an ObjectMapper to discover mixin annotation classes on demand #688

@ljnelson

Description

@ljnelson

In a large, maturing application, it is burdensome to have to store in some central location a list of all the possible mixin classes and their target classes (and then to keep that list up to date).

Adding mixin classes on demand can be thread-unsafe or "too late" in certain circumstances.

Instead, consider a callback-based mechanism or something similar, where a mixin class provider can be queried for the appropriate mixin Class to use for a given target Class that is about to be serialized. That way, Jackson can be in full control as to when this happens, while the mixin class provider can be in full control over how such a mixin class is located and loaded.

http://fasterxml.github.io/jackson-databind/javadoc/2.4/com/fasterxml/jackson/databind/introspect/ClassIntrospector.MixInResolver.html might be a good starting point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions