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

Default DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT to enabled for XmlMapper #245

Closed
cowtowncoder opened this issue Jun 22, 2017 · 0 comments
Milestone

Comments

@cowtowncoder
Copy link
Member

In XML, empty content for elements has to be represented as either null or empty String; and since it is often better do latter, it is usually also appropriate to allow data-binding level coercion into actual null if a String value is not allowed. For this reason it seems best to make XmlMapper default settings to enable ACCEPT_EMPTY_STRING_AS_NULL_OBJECT unlike vanilla ObjectMapper. This mostly stems from the fact that where JSON can indicate difference between Strings, Numbers and Booleans, XML can not, without schema of some sort.

Users may still disable setting if they choose to: this is simply default setting.

@cowtowncoder cowtowncoder added this to the 2.9.0 milestone Jun 22, 2017
@cowtowncoder cowtowncoder changed the title Default DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT to true for XmlMapper Default DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT to enabled for XmlMapper Jun 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant