Details
-
Type:
New Feature
-
Status:
Reopened
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: 1.8.0
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Currently JSON null is generically handled to result in null objects. Empty strings have no special generic handling, although some deserializers (most notable Date deserializers, see JACKSON-202) map them to nulls as well.
Given that some frameworks use empty Strings interchangeably with missing values and nulls, it may be useful to enabled generic handling of empty Strings to results in null values at least in places where JSON object would be expected (for "bean"/POJO types). This could be further configurable by introducing an annotation that can attach to classes (for all instances) and properties (fields, setters).
Actually to begin with, maybe it'd be enough to just add general on/off Feature first, and see if that might be enough. Especially as this would work pretty well even if it only handled case of empty beans.