I am using JAX-RS Jersey with Jackson (for serialization / deserialization) to implement a set of REST services. When the caller performs an update operation (for example, PUT), I usually followed the agreement that empty fields sent in the request are ignored when updating the target. Only those fields that have been set to the actual value are updated.
However, I would prefer that I can distinguish between fields that were sent as fields with zero vs that were not sent at all, so I know to clear the fields that were explicitly sent as null.
I can come up with a way to do this, but I wonder if there is anything in this area. This seems like a general requirement.
source share