Skip to content

Ability to change active JsonView on submodels (with `@JsonApplyView') #5745

Description

@f-aubert

Is your feature request related to a problem? Please describe.

It should be possible to specify a View for processing (serializing) a property.

Describe the solution you'd like

The proposed annotation, JsonApplyView, would be supported by jackson-databind.

Usage example

public class Outer {
   @JsonApplyView(ViewA.class)
   public Inner value1;

   @JsonApplyView(ViewB.class)
   public Inner value2;
}

Additional context

See FasterXML/jackson-annotations#78 for the whole discussion

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions