What is wrong here? Or how else I should decode, I would NOT use JSONSerialize.
let jsonData = try! Data(contentsOf: urls[0])
let decoder = JSONDecoder()
let d = try decoder.decode([String: JSON].self, from: jsonData)
file content is a simple JSON:
{"name": "fff", "price": 10}
And my JSON code:
public enum JSON: Decodable {
case string(String)
case number(Float)
case object([String:JSON])
case array([JSON])
case bool(Bool)
}