Customizing Codable types in Swift