After upgrading to the latest version 0.11.0
@Optional
annotation is deprecated.
The doc says:
All properties with default values are considered optional now
But it seems that without this annotation the flag encodeDefaults=false
in JsonConfiguration
is ignored for optionals fields without deprecated @Optional
annotation, and default values (such as null
for instance) serialized to the result json.