Adding serialization support for custom data.
Adding public method for adding extra data