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 really appreciate your help