-
Notifications
You must be signed in to change notification settings - Fork 80
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
@JsonView: support more than one view #84
Comments
I am not sure I understand this: how would defining of multiple views work? Jackson requires a single view to be used for serialization, so endpoints can only similarly define one active view to use via annotation. So what would be your use case; what are you trying to achieve? |
Mmmm... I see, that make sense. What I'm trying to achieve: my
The above could probably be easily achieved by using a custom serializer or Any ideas? |
@renaudcerrato Ah yes. So dynamically changing the active view, based on user. This is actually why a new (#33 included in 2.3.0...) feature was added to allow for configuring
and test at For what it's worth, changing view was the reason I added this functionality; definitely makes sense to be able to choose it, but seemed very difficult to be able to provide such changeability using pure Annotation based approach. |
Amazing @cowtowncoder ! Thanks for pointing me out to this! |
Currently,
@JsonView
annotation on endpoint only use the first view passed to it.The text was updated successfully, but these errors were encountered: