title: Jackson JsonTypeInfo.As.EXTERNAL_PROPERTY doesn't work as expected
body: <p>I am using Jackson to parse JSON that I have no control over. The JSON looks like this:</p>
  
  <pre><code>{
      "status":"0"
      "type":"type1"
      "info": {
         // additional fields
      }
  }
  </code></pre>
  
  <p>My class looks like this</p>
  
  <pre><code>public class Response {
      private String status;
      private String type;
      private Info info
  }
  </code></pre>
  
  <p>The subclass of Info that I use depends on the type property, so my mapping for info is</p>
  
  <pre><code>@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXTERNAL_PROPERTY, property = "type")
  @JsonSubTypes(value = {
          @JsonSubTypes.Type(value = Type1Info.class, name = "type1"),
          @JsonSubTypes.Type(value = Type2Info.class, name = "type2") })
  public abstract class Info {
      // some fields
  }
  </code></pre>
  
  <p>As far as I can tell this is the correct way to use type info when the distinguishing element is at the same level as the element that has to be casted. But this doesn't work, I always get the same error:</p>
  
  <blockquote>
    <p>com.fasterxml.jackson.databind.JsonMappingException: Unexpected token
    (END_OBJECT), expected FIELD_NAME: missing property 'type' that is to
    contain type id</p>
  </blockquote>
  
  <p>If I change EXTERNAL_PROPERTY to PROPERTY I still get the same error. Is my understanding of EXTERNAL_PROPERTY wrong?</p>