I am working in a legacy system with Java/EJB/JPA/thorntail/wildfly.
The project has:
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>jaxrs-jsonb</artifactId>
<version>2.6.0.Final</version>
</dependency>
JSON-B provides support for JSON Processing according to JSR-367.
I need to send null values in API/Rest. Anything similar to @JsonInclude(Include.ALWAYS) for Jackson.
Example that I need:
PersonApi with name=Any, age=null
{
"name": "Any",
"age": null
}
Is there some config to do this? ... some annotation, some config to load and resolve it?
You can use
javax.json.bind.annotation.JsonbNillableannotation: