I\'m trying to use Jakson to deserialize a nested polymorphic type. Meaning my top level type referes to another polymorphic type that finally is extended by class that\'s n
Your definitions are messed up -- you are trying to use two type identifiers, type name AND class. This does not make any sense. You should choose one method or the other, not both.
If you choose Java class name as type information, just leave out the name. Also, you only need to include @JsonTypeInfo
for FirstLevel
; sub-classes inherit this definition.
If you prefer use of logical type name, drop the class property. You will also need to specify sub-type list, either with annotation, or by registering them via ObjectMapper
.