Travelxp interview question

How do we achieve serialization and deserialization?