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
import UIKit | |
struct Country: Codable { | |
let name: String | |
let capital: String | |
let alternateSpellings: [String] | |
enum CodingKeys: String, CodingKey { | |
case name | |
case capital |
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
import UIKit | |
struct Country: Codable { | |
let name: String | |
let capital: String | |
} | |
let jsonData: Data = """ | |
{ | |
"name": "United States of America", |
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
import UIKit | |
struct Country: Codable { | |
let name: String | |
let capital: String | |
let independanceDay: Date | |
} | |
let jsonData: Data = """ | |
{ |
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
import UIKit | |
struct Country: Codable { | |
let name: String | |
let capital: String | |
let callingCodes: [String] | |
} | |
let jsonData: Data = """ | |
{ |
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
import UIKit | |
struct Country: Codable { | |
let name: String | |
let capital: String | |
let alternateSpellings: [String] | |
enum CodingKeys: String, CodingKey { | |
case name | |
case capital |
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
import UIKit | |
struct Country: Codable { | |
let name: String | |
let capital: String | |
let callingCodes: [String] | |
let population: Double | |
let area: Double | |
let borders: [String] | |
let region: String |
NewerOlder