We have a list of Java objects that is sorted through the JSON that Jersey created.
The list is called "strings." When there is data, we have:
{"records":"1","page":"1","total":"1","rows":[{"id":"692334","cell":["ECS","D","201009","","0","ABCD","11","11","","201009"]}]}
If no data
{"page":0,"records":0,"total":0}
How can we include jersey in the rows field, even if List is 0? We want:
{"page":0,"records":0,"total":0,"rows":[]}
Note that we are already using the JAXB ContextResolver to make sure that JSON is true on a single line. Not sure if we can configure this converter to solve our problem.
source share