Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.4
-
Component/s: None
-
Labels:None
Description
Currently @JsonIgnore simply prevents associated method (getter, setter etc) from being recognized as one. But in context of deserialization it would be useful to change this so that "ignoral" would apply to implied property, not just method: and if there is no other relevant getter/setter for the property, that property would be recognized but ignored if encountered on input to bind.
The main use case is to avoid binding sub-trees: for example, with class like:
class Bean {
public void setA(int a) { ...}
@JsonIgnore public void setDummy(HeavyBean b) { ... }
}
input would be allowed to contain member "dummy" for the bean; and if so, it would be skipped without problems.
Currently code like above would result in an unexception due to unknown property "dummy". This seems unnecessary.
Actually, given timing of things it seems better to defer this after 1.0 release, to get that out the door now. Will re-visit for 1.1.