vuinguyen / FishingDaze

A fishing journal app to document fishing trips, built for my capstone project, for my Udacity iOS Nanodegree program.
1 stars 1 forks source link

Nice to Have: Parse Weather Data using Codable #28

Open vuinguyen opened 4 years ago

vuinguyen commented 4 years ago

May need to implement a custom init(from decoder: Decoder) throws function, because the JSON structure is very tricky / nested, and lots of opportunities for the parsing to go wrong! Also we'll have to convert some Date/Time Strings to Date objects. This is just way too complicated when all we want are a couple pieces of data from the WeatherBit.io API call. So for now, we're using JSON Serialization to parse the data. But as a "nice to have", maybe we can get JSON parsing to happen with Codable in the future.