title: Jaxb + jersey. Skipping null fields in generated json
body: <p>I have a code: </p>
  
  <pre><code>   return Response.status(Status.BAD_REQUEST).entity(errors).build();
  </code></pre>
  
  <p>Where: <code>Response</code> is comes from this package: <code>javax.ws.rs.core</code> (jersey 1.9.1);</p>
  
  <p>Where the <code>errors</code> is instance of: </p>
  
  <pre><code>@XmlRootElement
  public class UserInfoValidationErrors {
  
      @XmlElement String username;
      @XmlElement String email;
  ...
  </code></pre>
  
  <p>Then I have JSON result like this: <code>{"username":null,"email":"Email is not valid"}</code></p>
  
  <p>If there is a way how to avoid having <code>null</code> there?</p>