title: Jackson 2.1 polymorphic deserialization: How to populate type field on pojo?
body: <p>I am pulling a tree of Categories and Items from a REST service. Categories have a "child" attribute that contains a list of Categories and/or Items. Their types are specified in the field "kind". </p>
  
  <p>Jackson's polymorphic type handling is great and all working as expected, except one small hitch: the "kind" field itself is not populated.  Is there a simple way to get this data onto the pojos?  I hope not to have to write custom deserializers.</p>
  
  <p>Here is the base class for Category and Item. The two subclasses add several scalar fields, and aren't very interesting.</p>
  
  <pre><code>@JsonIgnoreProperties(ignoreUnknown=true)
  @JsonTypeInfo(  
      use = JsonTypeInfo.Id.NAME,  
      include = JsonTypeInfo.As.PROPERTY,  
      property = "kind",
      defaultImpl = EntityBase.Impl.class
      )
  @JsonSubTypes({
      @Type(value = Item.class, name = "Item"),  
      @Type(value = Category.class, name = "Category")
      })  
  public abstract class EntityBase {
      String title;
      String kind;
  
      public void setTitle(String title) { this.title = title; }
      public String getTitle() { return title; }
  
      public void setKind(String kind) { this.kind = kind; }
      public String getKind() { return kind; }
  
      public static class Impl extends EntityBase {}  
  }
  </code></pre>
  
  <p>I'm doing the deserialization with an ObjectMapper something like this:</p>
  
  <pre><code>ObjectMapper mapper = new ObjectMapper();
  Category category = mapper.readValue(inputStream, Category.class);
  </code></pre>
  
  <p>I think it's so irrelevant that it doesn't even deserve a tag, but just in case, this is in an Android app.</p>