Earlier method
let json = try JSONSerialization.jsonObject(with: data!, options: .allowFragments)
returned AnyObject
, which was easily converted to a Dictionary
. B Swift 3 we have a trace.
open class func jsonObject(with data: Data, options opt: JSONSerialization.ReadingOptions = []) throws -> Any
How can I convert
Any
toDictionary
?