Daily iOS
Networking

Unstable response schemas

You're decoding responses into the model below with Codable, but the server includes the nickname field in some responses and leaves it out of others entirely. What happens with the current code?

struct Profile: Decodable {
    let id: Int
    let nickname: String
    let tags: [String]
}

Submit