Updated parse method: uses JSONDecoder instead of JSONSerialization
How you did it :white_check_mark:
Made model classes (LaunchGateConfiguration, UpdateConfiguration, and AlertConfiguration) conform to Decodable
Manually decoded the LaunchGateConfiguration and UpdateConfiguration classes with decoder initializers
Rewrote parse method to use JSONDecoder in order to parse the root object (LaunchGateConfiguration type) and its nested objects (UpdateConfiguration and AlertConfiguration)
Removed error enum, since Decodable classes will throw the appropriate errors
How to test it :microscope:
Build and run the Example app
An alert should pop up that reads "An update is required to continue using this app."
What you did :question:
parse
method: uses JSONDecoder instead of JSONSerializationHow you did it :white_check_mark:
parse
method to use JSONDecoder in order to parse the root object (LaunchGateConfiguration type) and its nested objects (UpdateConfiguration and AlertConfiguration)How to test it :microscope:
Screenshots (if applicable) :camera: