NSJSONSerialization Syntax for Swift 1.2
if let jsonArray: NSArray = NSJSONSerialization.JSONObjectWithData(data!, options: NSJSONReadingOptions.MutableContainers, error: nil) as! NSArray?
NSJSONSerialization Syntax for Swift 2.0
if let jsonArray: NSArray = (try? NSJSONSerialization.JSONObjectWithData(data!, options: NSJSONReadingOptions.MutableContainers)) as! NSArray?
No comments:
Post a Comment