title: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of Object out of START_ARRAY token
body: <p>I got stuck in mapping between JSON to Java object.
  I am using RestTemplate to make third party API call in spring boot.</p>
  
  <pre><code>{
  "parsed": [
          {
              "food": {
                  "foodId": "&lt;FoodID&gt;",
                  "label": "apple",
                  "nutrients": {
                      "ENERC_KCAL": 52,
                      "PROCNT": 0.26,
                      "FAT": 0.17,
                      "CHOCDF": 13.81,
                      "FIBTG": 2.4
                  },
                  "category": "Generic foods",
                  "categoryLabel": "food",
                  "image": "&lt;Image URL&gt;"
              }
          }
      ]
  }
  </code></pre>
  
  <p>I have created below classes for the same (with there getters and setters).</p>
  
  <pre><code>@Component
  @Scope("prototype")
  @JsonIgnoreProperties(ignoreUnknown = true)
  public class ResponseFoodDetailsFromAPI implements Serializable{
      private static final long serialVersionUID = -1927057943962033354L;
      ParsesList parsed;
  }
  </code></pre>
  
  <pre><code>public class ParsesList implements Serializable{
      private static final long serialVersionUID = 5902036842725888370L;
      List&lt;Parse&gt; parse;
  }
  </code></pre>
  
  <pre><code>public class Parse implements Serializable{
      private static final long serialVersionUID = -8651880919902785186L;
      private Food food;  
  
  }
  </code></pre>
  
  <pre><code>public class Food implements Serializable{
      private static final long serialVersionUID = -5933882633489466961L;
      private String foodId;
      private String label;
      Nutrients NutrientsObject;
      private String brand;
      private String category;
      private String categoryLabel;
      private String foodContentsLabel;
      private String image;
  }
  </code></pre>
  
  <pre><code>public class Nutrients implements Serializable{
      private static final long serialVersionUID = -8207662942326982309L;
      private float ENERC_KCAL;
      private float PROCNT;
      private float FAT;
      private float CHOCDF;
      private float FIBTG;
  }
  </code></pre>
  
  <p>But I'm getting below exception </p>
  
  <pre><code>[Request processing failed; nested exception is org.springframework.web.client.RestClientException: Error while extracting 
  response for type [class com.vikas.projects.organicecommerce.redisapicall.models.ResponseFoodDetailsFromAPI] 
  and content type [application/json;charset=UTF-8]; 
  nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: 
  Cannot deserialize instance of 
  `com.vikas.projects.organicecommerce.redisapicall.models.ParsesList` 
  out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: 
  Cannot deserialize instance of `com.vikas.projects.organicecommerce.redisapicall.models.ParsesList` out of START_ARRAY 
  token at [Source: (PushbackInputStream); line: 3, column: 14] (through reference chain:
   com.vikas.projects.organicecommerce.redisapicall.models.ResponseFoodDetailsFromAPI["parsed"])]
   with root cause
  
  com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `com.vikas.projects.organicecommerce.redisapicall.models.ParsesList` out of START_ARRAY token
   at [Source: (PushbackInputStream); line: 3, column: 14] (through reference chain: com.vikas.projects.organicecommerce.redisapicall.models.ResponseFoodDetailsFromAPI["parsed"])
      at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59) ~[jackson-databind-2.10.4.jar:2.10.4]
      at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1445) ~[jackson-databind-2.10.4.jar:2.10.4]
      at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1219) ~[jackson-databind-2.10.4.jar:2.10.4]
      at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1171) ~[jackson-databind-2.10.4.jar:2.10.4]
      at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromArray(BeanDeserializerBase.java:1478) 
  </code></pre>
  
  <p>The added JSON is part of complete JSON. Please let me know if complete JSON required.</p>