Avatar
omochimetaru 4/20/2020 3:45 PM
Currently, adding a default value to a decodable struct will always override the value, even if it appears in the original JSON. import Foundation struct User: Decodable { let id: Int let name: String = "" } let decoder = JSONDecoder() let user = try! decoder.decode(Use...