Get class of Java object after traversing object hierarchy
I convert a Java object to json and traverse it using a given json path. Result is some json node that I would like to cast back to a Java object. How can I find out what is the class of this object?
I can think of analysing the json path and using reflection to traverse the object and get the type, but I would like to avoid reflection.