Deserialize using types