Question: This function saves data into Firestore. I’m using Codable to parse the data from an external source. But I have only been able to save one item at a time from the ingredients array.: I can tell that I’m ...

Question: I have the following struct: I’m decoding from a source where minutes is null, so I get the following error message: However, I thought marking minutes as optional in struct Recipe was sufficient to handle this case? Is there ...

Question: Try to add enum Codingkeys inside struct, But it show error Codable doesn’t conform Decodable. Why am i getting conform decodable error? Should i seperate the struct ? Is it a must to seperate the struct like below ? ...

Question: How to create a common codable struct in swift for slightly different json responses.For example response A and B has almost same attributes and B has some extra attribute called Designation.Is it possible to create common codable struct for ...

Question: I would like to create a Codable structure to save data from a user profile Let’s say the ios user filled a form with his name, last name,adress, put his picture (UIImage)) and that user have an unique ID ...

Question: I want to decode this data and want to display fields separately in UI. Json data I am receiving from API Decoding Model for the above This is the code written in playground: print(dataString) is printing the data. However, ...

Question: I am making an app that has information about different woods, herbs and spices, and a few other things. I am including the ability to save their favorite item to a favorites list, so I have a heart button ...

Question: I have JSON file with cities These are only few entries, I have almost 1000 entries into file. I need to apply pagination to load 100 entries. I created codable as follows and my parsing method is like this, ...

Question: I have a problem decoding JSON which has keys in the snake case including numbers. I’ve already spent days trying to solve it and can’t tell I see any solution to it. Even though I need it badly. Nor ...

Question: I’m having an inconsistent API that might return either a String or an Number as a part of the JSON response. The dates also could be represented the same way as either a String or a Number, but are ...