amadeus4dev-examples / amadeus-ios

Swift library for the Amadeus Self-Service travel APIs
https://developers.amadeus.com
MIT License
12 stars 10 forks source link

Codable Support #27

Open qalandarov opened 4 years ago

qalandarov commented 4 years ago

Currently the library depends on SwiftyJSON and it would be nice to use native Codable

alnacle commented 4 years ago

Hey! Thanks for bringing this up! I actually started to write a new version of the SDK almost from scratch using Codable, Generics and removing the SwiftyJSON dependency. You can find the progress of the work on my local repo (2.0.0 branch):

https://github.com/alnacle/amadeus-ios/tree/2.0.0

The response is now handled like:

response.data[0].itineraries[0].segments[0].arrival.iataCode

Feel free to send me your feedback :)