title: jackson why do I need JsonTypeName annotation on subclasses
body: <p>At <a href="https://github.com/Sergey80/scala-samples/blob/master/src/main/scala/json/jackson/SubClasses.scala" rel="noreferrer">this link</a></p>
  
  <p>I'm trying to understand <strong>why</strong> do I (may) need <code>@JsonTypeName</code> on subclasses (like all 'internet; <a href="https://stackoverflow.com/questions/11798394/polymorphism-in-jackson-annotations-jsontypeinfo-usage">sujests to put</a>) if it works without it <strong>?</strong></p>
  
  <pre><code>@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "aType")
  @JsonSubTypes(Array(
    new Type(value = classOf[ModelA], name = "ModelA"),
    new Type(value = classOf[ModelB], name = "ModelB")
  ))
  class BaseModel(val modelName:String)
  
  //@JsonTypeName("SomeModel")  // Commented. Do I need this?
  class ModelA(val a:String, val b:String, val c:String, commonData:String)  extends BaseModel(commonData) {
    def this() = this("default", "default", "default" ,"default")
  }
  //@JsonTypeName("SomeModel") // Commented. Do I need this?
  class ModelB(val a:String, val b:String, val c:String, commonData:String)  extends BaseModel(commonData) {
    def this() = this("default", "default", "default" ,"default")
  }
  </code></pre>