Serialization added

Json serialization has been added.