Default DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT
to enabled for XmlMapper
#245
Milestone
DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT
to enabled for XmlMapper
#245
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 actualnull
if a String value is not allowed. For this reason it seems best to makeXmlMapper
default settings to enableACCEPT_EMPTY_STRING_AS_NULL_OBJECT
unlike vanillaObjectMapper
. 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.
The text was updated successfully, but these errors were encountered: