title: Unable to deserialize Object[] to class using Jackson
body: <p>I'm trying to deserialize this <code>Json</code> element in my code Json array to a custom class .. but i couldn't :</p>
  
  <pre><code>ObjectMapper OMapper = new ObjectMapper();
  OMapper.configure(Feature.ALLOW_BACKSLASH_ESCAPING_ANY_CHARACTER, true);
  OMapper.configure(Feature.ALLOW_SINGLE_QUOTES, true);
  OMapper.configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true);
  OMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
  OMapper.enable(SerializationFeature.INDENT_OUTPUT);
  
  JsonNode node = OMapper.readTree("{\"headers\":[\"st1\", \"ddf2\", \"sdsd\"]}");
  
  
  headers h = OMapper.treeToValue(node.get("headers"), headers.class);
  </code></pre>
  
  <p>and this is the class :</p>
  
  <pre><code>public class headers{   
      public headers(){
          System.out.println("dssdsd");
  
      }
  
      @JsonSetter
      public void set(){
          System.out.println("ASAASAAS");
      }
  
      @JsonGetter()
      public JsonNode get(int index){
          System.out.println("XXXXXXXXXx");
          return null;
      }
  }
  </code></pre>
  
  <p>but i'm getting this error :</p>
  
  <blockquote>
    <p>com.fasterxml.jackson.databind.exc.MismatchedInputException: Can not
    deserialize instance of headers out of START_ARRAY token  at [Source:
    UNKNOWN; line: -1, column: -1]    at
    com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:62)
      at
    com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1307)
      at
    com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1116)
      at
    com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1070)
      at
    com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromArray(BeanDeserializerBase.java:1447)
      at
    com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:173)
      at
    com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:149)</p>
  </blockquote>