Deserialisation working on simple class with built-in types