I have seen posts about this error message but i am making a new one because my case is different. the json is valid. so i have no clue why it gives out this error.
Sample json here
i removed the forward slash so it will be clean since when i do a print() it always shows as "key": "value"
this is the code i use to convert it to data then it gives out that error. i checked the json in online json validator sites and it's good.
let string = the json string from the url above
let jsonObject = try? JSONSerialization.data(withJSONObject: string, options: [])
It is supposed to be a json array. any idea why the error?