How do I make an enum Decodable in Swift?
It’s pretty easy, just use String or Int raw values which are implicitly assigned. enum PostType: Int, Codable { case image, blob } image is encoded to 0 and blob to 1 Or enum PostType: String, Codable { case image, blob } image is encoded to “image” and blob to “blob” This is a simple … Read more