Hello,
I have a problem with a deserializer I am working on.
At the deserializer I want to register values, which indicate that the
resulting Optional should be empty. But if the value in the JSON string
is null, the Optional will be null as well, else it works as expected.
Here is the code
d, and a.test will be set
to null by something else, so a work around like public class A { public
Optional test = Optional.empty(); } does not work either.
If i run the same code against a JSON string like this:
{"test":""}
It is perfectly fine and a.test is an empty Optional.