Converts a java object instance to a JSON file with the use of Java reflection. The serializes any private, protected and public attributes within a class.
This code can be plugged into any existing code to save the state of a program by serializing it.
The main method demonstrates how to use the code with class A, B and C being demonstration classes.
The format of the json is: {"attribute_name":"value"}