Skip to content
Discussion options

You must be logged in to vote

@Mumeii Jackson has mix-in annotations that can sometimes be used like this.

But aside from that there is no support nor plans to add package-level/targeted annotations. This is pretty fundamental constraints given that Jackson instead supports inheritance-based annotations (so sub-classes "inherit" base-class inheritances), and that would conflict with package-based ones (how would precedence work across inheritance/package-containment).

So it is unlikely this would ever be added to core Jackson.

Having said that, someone could perhaps write (possibly shareable) custom AnnotationIntrospector that would in fact apply package-level annotations.

But more generally, if you want specific supp…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Mumeii
Comment options

@cowtowncoder
Comment options

Answer selected by Mumeii
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants