This repository was archived by the owner on Mar 16, 2025. It is now read-only.
This repository was archived by the owner on Mar 16, 2025. It is now read-only.
nullable
support for model classes #45
Closed
Description
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.