Part of some tasks we have is a required key in json which might have key:values or it might not, it might also have nested dictionaries or arrays. Essentially, under "required_payload_params":{} is completely unknown. Is there a way to decode this information? When I try [String: Any] I get the error "Type 'Any' cannot conform to 'Decodable'". Every task is specific to a single job so there is no way we would be able to make the required section all structured the same. Currently it could be managable to do by hand but will become unfeasable as we utilize this more and create more tasks.
This is a few example of how the dictionary could look like
"required_payload_params":{}
"required_payload_params": {
"app_type": {
"description": "Just some filler",
"allowed_values": [
"Filler 1",
"Filler 2",
"Filler 3"
]
},
"app_id": {
"description": "Filler ID"
}
}
"required_payload_params": {
"device_type": {
"description": "Filler description",
"allowed_values": [
"Filler 1",
"Filler 2"
]
},
"device_id": {
"description": "Filler ID"
}
}
"required_payload_params": {
"hostname": {
"description": "Filler 1"
},
"port": {
"description": "Filler 2"
}
}