I communicate with a web service through AutoBean , which are converted to JSON. The problem is that the web service expects every property of the JSON object to be present in the request, whereas AutoBeanCodex.encode() would seem to leave all the properties that have default values (even though they are set explicitly )
Is there any way to enable these properties?
EDIT: Thomas's answer has already helped a lot, but it still leaves a little problem. Namely, an empty space ( List<Integer> in my case) is also swallowed, apparently, because the default value is an empty array, not null .
source share