FasterXML/jackson-databind — Issue #1: Improve @JsonView flexibility
Author: stickfigure
Created: 2012-02-21 17:14:52+00:00
State: open

I'm struggling with a problem that is probably common for people that extensively use @JsonView. Since only one view can be active at any one time, and jsonview classes are singly-inherited, the facility is very tightly constrained. There are a lot of cases where I need to define multiple views: "Show me the properties relevant to green administrators and the fields relevant to blue administrators", where these are not perfect subsets.

From an API perspective, one solution would be to allow json views to be defined by interfaces and thus enable multiple inheritance. Alternatively, just allow multiple views to be specified - although this raises the question of AND vs OR.

This has been moved from https://github.com/FasterXML/jackson-core/issues/3