Top "Encodable" questions

Use this tag only for questions directly pertaining to the Swift standard Encodable protocol

How to use Any in Codable Type

I'm currently working with Codable types in my project and facing an issue. struct Person: Codable { var id: Any } id …

ios swift codable decodable encodable
Why can not use protocol `Encodable` as a type in the func

I'm trying to get data by encode model which conforms to Encodable protocol. But it's failed to invoke func encode …

swift protocols encodable
How to encode Dictionary with JSONEncoder in Swift 4

I want to encode Dictionary to json with JSONEncoder. It seems like a Request, receive a dictionary as parameter and …

swift codable encodable jsonencoder