Created
May 25, 2020 07:14
-
-
Save akshitzaveri/a76be24b4a97b4fef63996777ad34329 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Post { | |
let userID, id: Int | |
let title, body: String | |
} | |
extension Post: Decodable { | |
enum CodingKeys: String, CodingKey { | |
case userID = "userId" | |
case id, title, body | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment