Trying to use Jersey for a RESTful web service in a
pattern such as the following:
On serialization, I get a body back that includes null properties such as:
What I really want, though is for the null properties to be removed, such as:
Is there a simple way to enable this in Jersey? I found one post that indicated I should set the annotation "@XmlElement(nillable=true)" on every property I want removed, but this would involve adding an annotation to thousands of properties over hundreds of POJOs. I have believe there is a way to enable this feature on the server, or at least the method, level. In short, I'm looking for a solution that does not involve modifying the POJOs.