Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update JacksonAutoConfiguration with nicer defaults #1237

Closed
bclozel opened this issue Jul 10, 2014 · 4 comments
Closed

Update JacksonAutoConfiguration with nicer defaults #1237

bclozel opened this issue Jul 10, 2014 · 4 comments
Assignees
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Jul 10, 2014

Should Boot disable by default FAIL_ON_UNKNOWN_PROPERTIES in the ObjectMapper configuration?

Jackson's stock configuration actually fails deserialization whenever it encounters an unknown property. Right now, POJOs need to list all incoming JSON properties (even if it means annotating them with JsonIgnore.

See https://jira.spring.io/browse/SPR-11891 for further reference.

@philwebb
Copy link
Member

See also #1227 which is about offering a configuration file option. My vote would be to switch and provide a configuration option so that users can switch back if they wish.

Seems like Jackson won't be changing anytime soon.

@philwebb philwebb added this to the 1.2.0 milestone Jul 10, 2014
@cdupuis
Copy link
Contributor

cdupuis commented Jul 24, 2014

@philwebb can you elaborate a bit on the configuration file option. Are you talking about a generic conf file that takes any of the SerializationFeature or DeserializationFeature constants as keys?

@philwebb
Copy link
Member

@cdupuis I was thinking of a @ConfigurationProperties that exposes some of those options so that they can be configured in application.properties. @wilkinsona has made a start already (see #1227).

@philwebb philwebb modified the milestones: 1.2.0.M0, 1.2.0.M1 Sep 2, 2014
@sdeleuze
Copy link
Contributor

As discussed on SPR-12179,
SerializationConfig.Feature.DEFAULT_VIEW_INCLUSION should also be set to false by default, and we may provide such default in Spring Framework MVC config.

I am working on that right now, and will give you an update shortly in order to ensure Spring Framework and Spring Boot play well together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants