Type: New Feature
Resolution: Won't Fix
Affects Version/s: None
Fix Version/s: None
Number of attachments :
When a JSON null value is deserialized to a primitive int field, the int field is populated with its default value of 0. (I did not check, but I wouldn't be surprised if similar handling is provided when deserializing to other primitive types.)
However, currently when a JSON null value is deserialized to a field of one of the primitive wrapper types, e.g., Integer, then the field is set to null, i.e., it's deserialized as a null reference.
Jackson should provide a deserialization configuration feature to allow the user to specify that the default primitive value is preferred, instead of a null reference. This deserialization feature should operate similarly when deserializing from an empty JSON string.
Brainstorming for a name for this deserialization config feature: