title: Can not deserialize instance of out of START_OBJECT token
body: <p>My Json looks something like (and its unmodifiable)</p>
  
  <pre><code>{
      ....
      "Sale": [
          "SaleLines": {
                      "SaleLine": [
                          {
                              "Item": {
                                  "Prices": {
                                      "ItemPrice": [
                                          {
                                              "amount": "100",
                                              "useType": "Default"
                                          },
                                          {
                                              "amount": "100",
                                              "useType": "MSRP"
                                          }
                                      ]
                                  },
                              }
                                  ......
                                  ......
                          } 
                  ] 
              "calcDiscount": "0",
              "calcSubtotal": "500",
          }
      ]
  }
  </code></pre>
  
  <p>The java POJO code looks like</p>
  
  <pre><code>public static class SaleLines {
  
      @JsonProperty("SaleLine")
      private SaleLineObject[] saleLineObject;
  
      public SaleLineObject[] getSaleLineObject() { return saleLineObject; }
  
      public void setSaleLineObject(SaleLineObject[] saleLineObject) { this.saleLineObject = saleLineObject; }
  }
  
  public static class SaleLineObject {
      private SaleLine saleLine;
  
      public SaleLine getSaleLine() {
          return saleLine;
      }
  
      public void setSaleLine(SaleLine saleLine) {
          this.saleLine = saleLine;
      }
  
  }
  
  public static class SaleLine {
      @JsonProperty("itemID")
      private String itemId;                  //line_item_nk
      @JsonProperty("unitPrice")
      private String unitPrice;
      ....
  }
  
  @JsonPropertyOrder({"total", "calcSubTotal", "calcDiscount"})
  public static class Sale {
  
      private String saleTotal, calcSubtotal, calcDiscount; 
      private int salesValueWOVat;
  
      @JsonProperty("SaleLines")
      SaleLines saleLine;
  
      @JsonCreator
      public Sale (@JsonProperty("total")String saleTotal,
              @JsonProperty("calcSubtotal")String calcSubtotal,
              @JsonProperty("calcDiscount")String calcDiscount,
              @JsonProperty("SaleLines")SaleLines saleLine,
      ) {
          this.saleTotal = saleTotal;
          this.calcSubtotal = calcSubtotal;
          this.calcDiscount = calcDiscount;
          this.saleLine = saleLine;
          setSalesValueWOVat();
      }
  
      // getter and setters 
  
  }
  
  @SuppressWarnings({ "rawtypes" })
  public static &lt;E, T extends Collection&gt; T readFromJsonAndFillType (
          String json, 
          Modules module,
          Class &lt;T&gt; collectionType,
          Class &lt;E&gt; elementType) 
          throws JsonParseException, JsonMappingException, IOException {
  
      ObjectMapper objMapper = new ObjectMapper()
          .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
      TypeFactory tf = objMapper.getTypeFactory();
      JsonNode node = objMapper.readTree(json).get(module.jsonFieldName); 
      return objMapper.readValue(node.toString(),
              tf.constructCollectionType(collectionType, elementType));
  
  }
  </code></pre>
  
  <p>In main</p>
  
  <pre><code>ArrayList&lt;Sale&gt; saleList = readFromJsonAndFillType(
                  saleJSON, 
                  Modules.SALE, 
                  ArrayList.class,
                  Sale.class);
  
  for (Sale sale: saleList) {
      System.out.println(sale.toString());
  }
  </code></pre>
  
  <p>I know this question has been asked multiple times and even I took help from for eg
  <a href="https://stackoverflow.com/questions/20837856/can-not-deserialize-instance-of-java-util-arraylist-out-of-start-object-token">Can not deserialize instance of java.util.ArrayList out of START_OBJECT token</a></p>
  
  <p>But still I cannot get through this error</p>