Say I have an object, and I'm storing all of it's attributes as pure JSON. Is there a way to store the .getClass() value in such a way as to be able to retrieve it and get the original object?
foo demo = new foo();
demo.classType = demo.getClass().toString();
//I'm not entirely sure how to convert classType into a type I can use to parse back the data, like so:
foo demo2 = (demo.classType)jsonData;