You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.