Skip to content

Jackson: Add visibility properties to Jackson2ObjectMapperBuilder [SPR-16411] #20957

@spring-projects-issues

Description

@spring-projects-issues

Alexey Trofimov opened SPR-16411 and commented

We use Spring Boot and need to set visibility settings to default jackson ObjectMapper. Something like this:

        mapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);
        mapper.setVisibility(PropertyAccessor.CREATOR, JsonAutoDetect.Visibility.NONE);
        mapper.setVisibility(PropertyAccessor.GETTER, JsonAutoDetect.Visibility.NONE);
        mapper.setVisibility(PropertyAccessor.IS_GETTER, JsonAutoDetect.Visibility.NONE);
        mapper.setVisibility(PropertyAccessor.SETTER, JsonAutoDetect.Visibility.NONE);

Please, add to Jackson2ObjectMapperBuilder possibility to configure that Jackson feature


Affects: 5.0.3

Issue Links:

Referenced from: pull request #1667, and commits 48c3fa9

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions