// *** before: ***
let url = NSURL(string: "https://example.com")!
let data = NSData(contentsOfURL: url)
let date = NSDate()
let formatter = NSDateFormatter()
let object = try NSJSONSerialization.JSONObjectWithData(data!, options: [])
// *** in version 3.0: ***
let url = URL(string: "https://example.com")!
let data = try Data(contentsOf: url)
let date = Date()
let formatter = DateFormatter()
let object = try JSONSerialization.jsonObject(with: data)
// URL, Data, Date, IndexPath, Notification and their neighbours also became
// value types: they are copied, not shared, and work with let
var copy = data
copy.append(0) // the original is untouched
// what stayed a class kept the prefix: NSObject, NSNull, NSAttributedString