Added JSON Support

Added Json serialization and deserialization.