expose serialization function.