title: How to deserialize an object of unknown class
body: <p>I need to print the content of a serialized Java object (e.g. a java.io.Serializable POJO retrieved from cache) without knowing its class a priori.</p>
  
  <p>Being more specific, I do NOT need to instantiate a new object using the classic ObjectInputStream, I just need to obtain a simple human-readable representation (preferrably JSON) of the object without loading its class in the classpath.</p>
  
  <p>In other words, I need to convert a byte[] (the raw serialized object) to a JSON string without reimplementing ObjectInputStream.</p>