Transform serialization and deserialization