Skip to content

Ability to change active JsonView on submodels #5745

@f-aubert

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    to-evaluateIssue that has been received but not yet evaluated

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions