Serialize a reference as its referenced class
Deserialize non-string attributes properly