Set Jackson DEFAULT_VIEW_INCLUSION property to false by default [SPR-12179] #16793
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
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:
The text was updated successfully, but these errors were encountered: