Implement replicator::serialize