I've got a question similar to the one asked here:
Convert JSON string to “Object.class”
I'd like to do this without
@JsonTypeInfo(include=As.PROPERTY, use=Id.CLASS, property="class")
on all the classes I wish to serialize/deserialize to/from JSON.
I'd like to do something like:
Object o = mapper.readValue(*a JSON string*, Object.class);
if (o instance of *foo.bar.SomeClass*){
foo.bar.SomeClass fb = (foo.bar.SomeClass)o
*or*
foo.bar.SomeClass fb = mapper.readValue(*a JSON string*, foo.bar.SomeClass); }
Is that at all possible?