So I have JSON, which has string keys and values which can be either strings or custom JSON, when I put json there (even if I put it in quotes) JSONDecoder throws an error "The given data was not valid JSON.", when there is a string everything is okay, is there maybe some decodable extension which can help with that? Coding Keys unfortunately not an option here. Example of json
"""
{
"someKey":"{
"key1":"value1",
"key2":"value2"
}"
}
"""
Decoding simply as
try JSONDecoder().decode([String: String].self, from: json)