-
Notifications
You must be signed in to change notification settings - Fork 181
How to change JsonInclude.Include.NOT_NULL to JsonInclude.Include.ALWAYS #416
Comments
You may be going about this the wrong way. Should I do what you want, you would be breaking the RAML spec: types:
mytype:
billingAccountId: string | nil I'll check with the parser to make sure.
The
I'll get back to you on thursday. |
Hi JP Belanger, I will try the other approach's too. |
Yes, the string|nil fix was recently fixed. try the current snapshot version from the mulesoft maven repository. I'm going to be releasing it next week. |
Hi @jpbelang , |
Sorry, got Christmassed. Looking now. |
I 'm pretty sure I support this: |
I think, this will help, but i have to construct the response payload based on the ACCEPT.MEDIATYPE from Request headers. For example, if ACCEPT is json, the following code should give me JSON payload. But since, the Person if having xml attribute, will json works here? |
The annotations are on the data objects. The serialization should depend on the incoming HTTP headers. |
Hi,
I have requirement to print 'null' values in json response. For that the generated java classes should @JsonInclude(JsonInclude.Include.ALWAYS).
I tried to get some help inn searching across the git but I found "NOT_NULL" is hard coded in "JacksonBasicExtension".
Please help us to find the solution.
The text was updated successfully, but these errors were encountered: