Yes, sort of: for structures like:
{ "messageType" : "typeIdentifier",
"value" : { .... }
}
and result of, say
public class Wrapper {
@JsonTypeInfo(use = Id.CLASS, // or possibly NAME but then need to
map them explicitly
property = "value"
include = As.EXTERNAL_PROPERTY
)
public value Object;
}
it is possible.
Alternatively use of so-called "default typing" can achieve it too,
but it can lead to security concerns (see
https://medium.com/@cowtowncoder/on-jackson-cves-dont-panic-here-is-what-you-need-to-know-54cd0d6e8062).
But what that does (via `ObjectMapper.enableDefaultTyping(...)`) is
equivalent to enabled `@JsonTypeInfo` on categories of types (classes)
without having to add actual annotation.
-+ Tatu +-