title: Jackson - JsonMappingException due to constructor
body: <p>I am having the following exception when trying to deserialize a JSON</p>
  
  <blockquote>
    <p>No suitable constructor found for type <code>[simple type, class MyObj$obj$Card]:</code> can not instantiate from JSON object (need to add/enable type information?) at <code>[Source: java.io.StringReader@4344ee21; line: 1, column: 201]</code> (through reference chain: <code>MyObj["obj"]-&gt;Obj["cards"]</code>)</p>
  </blockquote>
  
  <p>And the JSON is</p>
  
  <pre><code>{
    "obj":{
    "api":"OK",
    "cache":false,
    "cards":[
       {
          "id":1232995897,
          "items":[
             {
                "id":"vmdSJLpnY",
                "cat":50,
                "rating":0.0
             }
          ]
       },
       {
          "id":0005897,
          "items":[
             {
                "id":"vxdSJLpnY",
                "cat":50,
                "rating":0.0
             }
          ]
       }
   ]
   }
  }
  </code></pre>
  
  <p>And within the <code>Obj</code> class I have the following statement</p>
  
  <p><code>@JsonProperty("cards") private Card[] cards;</code></p>
  
  <p>Which produces the exception above. Changing the type <code>Card[]</code> to <code>Object[]</code> does not produce an exception, but it lacks of the correct mapping I desire to get.</p>
  
  <p>Any clue how can I resolve it? A snippet will be GREAT!
  What this error means anyhow?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I have included the Java class.</p>
  
  <pre><code>import com.fasterxml.jackson.annotation.JsonCreator;
  import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.google.gson.Gson;
  
  @JsonIgnoreProperties(ignoreUnknown=true)
  public final class MyObj {
      @JsonIgnoreProperties(ignoreUnknown=true)
      public final class Obj {
          @JsonIgnoreProperties(ignoreUnknown=true)
          public final class Card {
              @JsonIgnoreProperties(ignoreUnknown=true)
              public final class Item {
                  @JsonProperty("id") private String id;
                  @JsonProperty("cat") private String cat;
                  @JsonProperty("rating") private String rating;
                  public final String getId() { return id; }
                  public final String getCat() { return cat; }
                  public final String getRating() { return ranting; }
                  public final String toString() { return new Gson().toJson(this); }
              }
  
              @JsonProperty("items") private Item[] items;
              public final Item[] getItems() { return items; }
              public final String toString() { return new Gson().toJson(this); }
          }
  
          @JsonProperty("cards") private Card[] cards;
          public Card[] getCards() { return cards; }
          public final String toString() { return new Gson().toJson(this); }      
      }
  
  
      @JsonProperty("obj") MyObj obj;
      public final Card[] getCards(){ return apiServiceResultsNoLists.getCards(); }
  }
  </code></pre>