I want to make one function in my swift project that converts String to Dictionary json format but I got one error:
Cannot convert expression\'s type
let JSONData = jsonString.data(using: .utf8)! let jsonResult = try JSONSerialization.jsonObject(with: data, options: .mutableLeaves) guard let userDictionary = jsonResult as? Dictionary else { throw NSError()}