Avatar
@Ken init(from decoder: Decoder) throws { let values = try decoder.container(keyedBy: CodingKeys.self) self.ou = try values.decode(URL.self, forKey: .ou) self.u = try values.decode(URL.self, forKey: .u) } func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(ou, forKey: .ou) try container.encode(u, forKey: .u) }
11:11 AM
これでOKです
11:12 AM
今はまだ、URL?がCodableじゃないって怒られますね