title: Json jackson : can't parse a json a file
body: <p>I m trying to parse a JSON file and store it in an list. I m getting this error : 
  com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of START_OBJECT token</p>
  
  <p>Here is my JSON file  </p>
  
  <pre><code>{  "budgetList":[
      {
          "label":"Salary Tim",
          "category":"Monthly Income",  
          "real":1590,  
          "estimated":1590,  
          "date":"",  
          "month":"",  
          "year":"",  
          "type":"Income" 
      },  
      {
          "label":"Salary Tom",  
          "category":"Monthly Income",  
          "real":1540,  
          "estimated":1540,  
          "date":"",  
          "month":"",  
          "year":"",  
          "type":"Income"
      } 
   ]  
  }
  </code></pre>
  
  <p>Here is my code<br>
  Budget :</p>
  
  <pre><code>public class Budget {
    private String label;
    private String category;
    private int real;
    private int estimated;
    private Date date;
    private int year;
    private String type;
    ....
    ....
  </code></pre>
  
  <p>}</p>
  
  <p>My service :   </p>
  
  <pre><code>List&lt;Budget&gt; budgets = objectMapper.readValue(new File("src/main/resources/json/new_exercise.json"), TypeFactory.defaultInstance().constructCollectionType(List.class,
                          Budget.class));
  </code></pre>
  
  <p>Where am I wrong?</p>
  
  <p>Thanks in advance.</p>
  
  <h3>ANSWER FOUND</h3>
  
  <p>Code is </p>
  
  <pre><code>ObjectMapper objectMapper = new ObjectMapper();
  List&lt;Budget&gt; budgets = null; 
  JsonNode node = objectMapper.readTree(new File("src/main/resources/json/new_exercise.json"));
              node = node.get("budgetList");
  TypeReference&lt;List&lt;Budget&gt;&gt; typeRef = new TypeReference&lt;List&lt;Budget&gt;&gt;(){};
  budgets = objectMapper.readValue(node.traverse(), typeRef);
  </code></pre>