[JAVA-2219] Determine handling of default values Created: 10/Jun/16 Updated: 05/Jun/17 Resolved: 16/Mar/17 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Codecs |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Justin Lee | Assignee: | Ross Lawley |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Epic Link: | POJO | ||||||||
| Description |
|
When writing out objects with fields holding a default value, allow configuring the codecs to optionally not write those values out. Similarly, when reading a document and a null value is read for a non-nullable field, allow for the application of these default values rather than coercing the null to 0-value for that type. |
| Comments |
| Comment by Ross Lawley [ 16/Mar/17 ] |
|
Users can extend FieldModelSerialization to do this check and determine if they want to serialize a particular value. |