Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Null Date Values #167

Closed
ndickerson opened this issue Jun 27, 2017 · 1 comment
Closed

Allow Null Date Values #167

ndickerson opened this issue Jun 27, 2017 · 1 comment

Comments

@ndickerson
Copy link
Member

Date values start out as null (no value). Once a date value is set, it can never be unset back to null.

The current implementation of the object mapper ignores all null values, including date values, and only a null value can set the date back to it's original empty state. The proper JSON payload for setting a null date value is:

{
    "customDate1": null
}

This is not currently achievable with the global Jackson annotation:

@JsonInclude(JsonInclude.Include.NON_NULL)

Which is used in order to avoid race conditions that occur when sending all values, including null values that were not set on the entity object. In order to support the sending of null values for dates, there will have to be special logic that determines when a user has explicitly set a null value on the date, and distinguish that from the initial default state of the object.

@ndickerson
Copy link
Member Author

De-prioritizing this issue since it would require a major rewrite at this point for only a small added benefit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant