Skip to content

Set Jackson DEFAULT_VIEW_INCLUSION property to false by default [SPR-12179] #16793

@spring-projects-issues

Description

@spring-projects-issues

Sébastien Deleuze opened SPR-12179 and commented

As stated in Jackson JsonView documentation documentation, by default all properties without explicit view definition are included in serialization.

Spring Framework 4.1 GA currently uses this default behavior, but this could be misleading since most users expect to have only the properties annotated with the JsonView specified on the handler method included in the serialized output.

It should be a better default to set SerializationConfig.Feature.DEFAULT_VIEW_INCLUSION to false. It will be still possible to change this behavior with Jackson2ObjectMapperFactoryBean#setDefaultViewInclusion().


Affects: 4.1 GA

Reference URL: http://wiki.fasterxml.com/JacksonJsonViews

Issue Links:

Metadata

Metadata

Assignees

Labels

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

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions