Hi Tatu,

I checked out the latest version 2.10.0.pr3 and have the following results:

   1. mapper.enableDefaultTyping() does not serialize (e.g. an Exception) 
   polymorphically via following code:
   - mapper.enableDefaultTyping(); // now deprecated
      - System.out.println(mapper.writeValueAsString(new 
      Exception("Test"))); // no type info in Json string
      2. So in order to get type info in JSON I obviously need a 
   TypeResolver (defined above) but then
      1. mapper.readValue(json, Object.class) results in a LinkedHashMap 
      instance 
   
So I tried to use the new *activateDefaultTyping*(..) and now the resulting 
object is of type Exception, as expected. So, up to 2.9.9 I did not find a 
way to serialize/deserialize e.g. an Exception into an Object 
polymorphically, but with the new version, it's possible.

Thanks, Marc

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/b04d18b3-892d-4921-aca2-88754fc41310%40googlegroups.com.

Reply via email to