title: scala, Jackson and @JsonTypeInfo
body: <p>I'm serializing some scala objects to JSON and need to add their original type into the serialisation.</p>
  
  <p>I have the following classes</p>
  
  <pre><code>class Contact(taxonz : Seq[String]) { val taxons = taxonz}
  case class Phone(number:String,taxonz : Seq[String]) extends Contact(taxonz = taxonz)
  case class Mail(value:String,taxonz : Seq[String]) extends Contact(taxonz = taxonz)
  </code></pre>
  
  <p>It seems there is a Jackson annotation (I'm using jerkson) : JsonTypeInfo</p>
  
  <p>However, I tried adding </p>
  
  <pre><code>@JsonTypeInfo(use=JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property="scalaclass") 
  </code></pre>
  
  <p>on the three classes above, I'm not getting back my 'scalaclass' property.</p>
  
  <pre><code>val persons = Seq(
        Person("000","bob denard",
               Option(Seq(
              Phone("0132354548",Seq("home")),
              Mail("bob.denard@sqli.com",Seq("business"))
            ))
        ),
        Person("001","aziz bouakaz ben aissef",Option(Seq(Phone("03332354548",Seq("business")))))
      )
      import com.codahale.jerkson.Json
      val jsonResult = Json.generate(persons)
  </code></pre>
  
  <p>with jsonResult value :</p>
  
  <pre><code>[
      {"id":"000","fullname":"bob denard","contacts":
              [
                  {"number":"0132354548","taxonz":["home"]},
                  {"value":"bob.denard@sqli.com","taxonz":["business"]}
              ]
      },...
  ]
  </code></pre>
  
  <p>Any idea ? :)</p>