would like it to return `{"mandatory":3}` instead
# serialization
r
would like it to return
{"mandatory":3}
instead
t
Default value for optionalField required.
null
in your case. And then you can use
Json.encodeDefaults
flag
r
The correct answer is no, it’s not possible. You can define a default value and then use the
Json.encodeDefaults
flag as a hack.