title: how to ignore null when deserializing from json string to object?
body: <p>I have a class defined as below: </p>
  
  <pre><code>// Ignore all the unknown properties in input JSON
  @JsonIgnoreProperties(ignoreUnknown = true)
  
  // Only include non null values in deserialized Java object.
  @JsonInclude(value = Include.NON_NULL)
  public class Person {
  
  
  @JsonProperty("person_id")
  private String personId;
  
  @JsonProperty("school")
  private String school;
  
  @JsonProperty("hobbies")
  private Map&lt;String, List&lt;AttributeBag&gt;&gt; hobbies = new   HashMap&lt;String, List&lt;AttributeBag&gt;&gt;();
  
  @JsonProperty("tasks")
  private Map&lt;String, Map&lt;String, AttributeBag&gt;&gt; tasks = new HashMap&lt;String, Map&lt;String, AttributeBag&gt;&gt;();
  
  
  
   public Map&lt;String, List&lt;AttributeBag&gt;&gt; getHobbies() {
      return hobbies;
  }
  
  
     public Person(String person_id, String school) {
      super();
      this.person_id = person_id;
      this.school = school;
  
  }
  </code></pre>
  
  <p>When I use a JSON string below to deserialize from string to object, </p>
  
  <pre><code> {
  "person_id":"123",
  "school":"stanford University"
  }
  </code></pre>
  
  <p>From the object I got deserialized,  the hobbies is create but empty, and the tasks is not created even. I am expecting the way like "tasks", if there is no corresponding field in JSON, it SHOULD NOT get deserialized in the object.  </p>
  
  <p>But the weird thing is : when I check object.getHobbies()!=null but the tasks part is null. I want both are null in the object if they were not present in JSON. </p>
  
  <p>I have a constructor for the Person class but I did not initialize both hobbies and tasks part. </p>
  
  <p>Thanks a lot</p>