Created a class for serialization to json.
Created a class for serialization to json.