FasterXML/jackson-core — Issue #3: Improve @JsonView flexibility
Author: stickfigure
Created: 2012-02-21 15:33:32+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.

P.S. Thank you thank you THANK YOU for moving development to github!