Serialize and Deserialize.