title: Jackson: how to include null value property in JSON serialization
body: <p>I'm trying to generate a JSON response using my own Java entity classes together with Jackson annotations. Two key values must be <code>null</code> in my JSON response but if I set them to <code>null</code> they disappear from JSON. I'm limited to Jackson version 1.9.13 unfortunately.</p>
  <p>I already tried set values to <code>null</code>, using</p>
  <pre><code>@JsonSerialize(include = JsonSerialize.Inclusion.ALWAYS)
  </code></pre>
  <p>My response entity:</p>
  <pre><code>public class Response {
  
  @JsonProperty(&quot;data&quot;)
  private Data data;
  
  @JsonProperty(&quot;error&quot;)
  private Error error;
  
  public Data getData() {
      return data;
  }
  
  public void setData(PgSoftAuthData data) {
      this.data = data;
  }
  
  public Error getError() {
      return error;
  }
  
  public void setError(PgSoftError error) {
      this.error = error;
  }
  }
  </code></pre>
  <p>I'm trying to generate response like this:</p>
  <pre><code>Data data = new Data();
  data.setName(&quot;Name&quot;);
  data.setTime(null); // This key dissappear from JSON
  
  Response responseSuccess = Response();
  responseSuccess.setData(data);
  responseSuccess.setError(null); // Error object disappear from JSON
  </code></pre>
  <p>I would like to get following response:</p>
  <pre><code>{
      &quot;data&quot; : {
          &quot;name&quot; : &quot;Name&quot;,
          &quot;time&quot; : null
      },
      &quot;error&quot; : null
  }
  </code></pre>