Created
July 15, 2017 16:57
-
-
Save gavi/40a825e897f03f8a57772491556a2b72 to your computer and use it in GitHub Desktop.
CodingKeys Enum for renaming JSON keys
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 GeocodingResult:Codable{ | |
struct Geometry:Codable{ | |
struct Location:Codable{ | |
let lat:Float | |
let lng:Float | |
} | |
let location:Location | |
} | |
let formattedAddress:String | |
let geometry:Geometry | |
private enum CodingKeys: String, CodingKey { | |
case formattedAddress = "formatted_address" | |
case geometry | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment