Expose serialization function.
v3.0.0