Dictionary of String:Any does not conform to protocol 'Decodable' [duplicate]
This question already has answers here : Fatal error: Dictionary<String, Any> does not conform to Decodable because Any does not conform to Decodable (2 answers) Closed last year . I'm trying to implement a Decodable to parse a json request but the json request has a dictionary inside of the object. Here is my code: struct myStruct : Decodable { let content: [String: Any] } enum CodingKeys: String, CodingKey { case content = "content" } But I'm getting this error: Type 'MyClass.myStruct' does not conform to protocol 'Decodable' How can declare a variable as dictionary without this error? I'll