I am working on one of my own apps. I am trying to decode a JSON file into an array of dictionaries with a string key and an any value. It gives me an array saying signal SIGABRT. Here is the line of code that I am talking about.
let jsonArray = try JSONSerialization.jsonObject(with: data, options: .mutableContainers) as! [[String:Any]]
Can you tell me how I can fix or resolve this issue?
I figured out the issue with the app. There was an error in the JSON file so I had to correct/fix that.
But thanks for your help and getting back to me regardless! It is much appreciated!
P.S. I am not suggesting your advice is wrong and I am sorry and apologize if my reply gives you that impression.
Well done, I should have thought ion that first! Thats has caught me a couple times, especially when I forget to run the json code through an online json checker.