Skip to content

Add @JsonIncludeProperties(propertyNames) (reverse of @JsonIgnoreProperties) #1296

@cowtowncoder

Description

@cowtowncoder

In some/many cases it'd be easier to just name properties to include, reverse of @JsonIgnoreProperties. And similarly, it should be possible to define baselines by type as well as property overrides; and if ever we support inheritance-merging in class hierarchy, use similar merging strategies (merge vs replace).

NOTE: for this (2.12.0) implementation, no merging exists for class annotations -- sub-class definitions will always simply replace super-class/super-interface definitions. Similarly there is no way to specify inclusions using "ConfigOverride" system, although ignoral is possible. Latter would likely be relatively easy to implement (so feel free to file a follow-up request); former (annotation merging) is a more difficult ask (but likewise feel free to file a feature request).

Metadata

Metadata

Assignees

No one assigned

    Labels

    most-wantedTag to indicate that there is heavy user +1'ing action

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions