Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

nullable support for model classes #45

Closed
hauner opened this issue Dec 1, 2020 · 0 comments
Closed

nullable support for model classes #45

hauner opened this issue Dec 1, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@hauner
Copy link
Member

hauner commented Dec 1, 2020

mapping a json payload to a java class looses the nullable information.

For example the following two payloads will produce the same java object for a model class with a single String property foo:

  • {}
  • {foo: null}

Both will be deserialized to an object with foo = null. No way to know if it was missing or if it was null.

This is a necessary info to implement PATCH with json merge patch:

  • if a property is not set don't change it
  • if it is set to "null", clear the property (set it to null).

This could be implemented by using jackson-databind-nullable.

Because of the additional dependency it should be off by default and it gets enabled by setting a new configuration option.

@hauner hauner added the enhancement New feature or request label Dec 1, 2020
@hauner hauner added this to the 2021.2 milestone Feb 19, 2021
@hauner hauner self-assigned this Feb 19, 2021
hauner added a commit that referenced this issue Feb 21, 2021
hauner added a commit that referenced this issue Feb 21, 2021
hauner added a commit that referenced this issue Feb 21, 2021
hauner added a commit that referenced this issue Feb 21, 2021
hauner added a commit that referenced this issue Feb 21, 2021
hauner added a commit that referenced this issue Feb 21, 2021
hauner added a commit that referenced this issue Feb 21, 2021
hauner added a commit that referenced this issue Feb 21, 2021
hauner added a commit that referenced this issue Feb 21, 2021
hauner added a commit that referenced this issue Feb 21, 2021
hauner added a commit that referenced this issue Feb 23, 2021
@hauner hauner closed this as completed Feb 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant