On Tue, Oct 9, 2018 at 5:13 PM Ygor Castor <ygorcas...@gmail.com> wrote: > > Hello, i'm having a problem with a scenario, i've created the following Mixin > that is responsible to append a property in every object passed through the > object mapper: > > @JsonAppend( > prepend = true, > props = { > @JsonAppend.Prop(name = "_expandables", value = > ExpandableProperty.class) > }) > public interface ExpandableMixin { > } > > > But now, i need to add another mixin to the object mapper, is there a way to > do that? I've already tried to create an interface that extends both mixins, > but sadly it did not worked, if it's not possible, is there another way to > achieve the same result?
Your attempt to use a subtype should work, and that is the only way to get mix-in annotations from multiple class declarations. There is no way to register multiple mix-in classes and underlying resolver does not have means to support that either, so it is unlikely that support would be added. But I would be interested in helping sub-class approach work: mix-in types` class hierarchy is introspected and used, not just the mix-in class but its parent-classes/-interfaces. -+ Tatu +- -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to jackson-user+unsubscr...@googlegroups.com. To post to this group, send email to jackson-user@googlegroups.com. For more options, visit https://groups.google.com/d/optout.