title: Why is the Jackson Object Mapper unable to deserialize this nested JSON?
body: <p>I am in the process of updating some code to hit a new API which returns the same type of data but in a different JSON format. This is a sample of the return from a request:</p>
  
  <pre><code>{
      "code": 200,
      "message": "OK",
      "data": [
          {
              "start_time": "2017-09-20T00:00:00.000-04:00",
              "end_time": "2017-09-21T00:00:00.000-04:00",
              "value": 8612.637512577203
          },
          {
              "start_time": "2017-09-21T00:00:00.000-04:00",
              "end_time": "2017-09-22T00:00:00.000-04:00",
              "value": 8597.89155775999
          },
          {
              "start_time": "2017-09-22T00:00:00.000-04:00",
              "end_time": "2017-09-23T00:00:00.000-04:00",
              "value": 24584.603303989123
          }
      ],
      "meta": {
          "space_id": "e1c38410-f912-4ae3-9db9-10a1ad1e3bf5",
          "channel_id": 1,
          "aggregation_type": "period_beginning",
          "pids_count": 1,
          "timezone": "America/New_York"
      }
  }
  </code></pre>
  
  <p>I want to ignore the code and message properties, and put the array of data into a list within a map, with the key being the "space_id" property <code>(Map&lt;String, List&lt;Reading&gt;&gt;)</code> for compatibility with the old implementation. Here is the POJO that I have created to contain the deserialized object:</p>
  
  <pre><code>@JsonIgnoreProperties({"code", "message", "meta"})
  public class GetReadingsResult {
  
      @JsonIgnore
      private Map&lt;String, List&lt;Reading&gt;&gt; readings;
  
      @JsonIgnore
      public GetReadingsResult(Map&lt;String, List&lt;Reading&gt;&gt; readings) {
          this.readings = readings;
      }
  
      @JsonCreator
      public GetReadingsResult(@JsonProperty("data")Reading[] data, @JsonProperty("space_id")String spaceId) {
          this.readings.put(spaceId, Arrays.asList(data));
      }
  
      //...other getters and setters...
  }
  </code></pre>
  
  <p>In my test I am calling readValue on a test JSON file and getting the following error:</p>
  
  <pre><code>com.fasterxml.jackson.databind.JsonMappingException: Instantiation of [simple type, class model.GetReadingsResult] value failed: null
  </code></pre>
  
  <p>What is the proper way to set up/annotate my POJO to deal with this nested file?</p>