Abstracting away the ugliness of de/serialization