title: How to convert NSData to Data in Swift 3?
body: <p>I'm trying to create a simple weather app that grabs the user's location and shows simple weather data using the Google Maps api. Everything is working, except for this part where I take the JSON and get the address.</p>
  
  <pre><code>func getAddressForLatLng(latitude: String, longitude: String) {
      let url = NSURL(string: "\(baseUrl)latlng=\(latitude),\(longitude)&amp;key=\(apikey)")
      let data = NSData(contentsOf: url! as URL)
      let json = try! JSONSerialization.jsonObject(with: data, options: JSONSerialization.ReadingOptions.allowFragments) as! Dictionary
      if let result = json["results"] as? Dictionary {
          if let address = result[0]["address_components"] as? Array {
              let number = address[0]["short_name"] as! String
              let street = address[1]["short_name"] as! String
              let city = address[2]["short_name"] as! String
              let state = address[4]["short_name"] as! String
              let zip = address[6]["short_name"] as! String
              weatherDisplay.text = "\(city),\(state)"
          }
      }
  }
  </code></pre>
  
  <p>On the line:</p>
  
  <pre><code>let json = try! JSONSerialization.jsonObject(with: data, options: JSONSerialization.ReadingOptions.allowFragments) as! Dictionary 
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>Cannot invoke 'jsonObject' with an argument list of type '(with: NSData?, options: JSONSerialization.ReadingOptions)'
  </code></pre>
  
  <p>What am I doing wrong?</p>