am very to new to swift and i am trying to parse JSON form a url. I am receiving the object but it is being returned as a bunch of numbers. How do I decode these numbers into the actual object.
let requestURL: NSURL = NSURL(string: "http://api.themoviedb.org/3/search/movie?api_key=06f4ca4cd5f26636e0ac8eebce5b8773&query=fight+club&callback=testing&_=1456113299076")!
let urlRequest: NSMutableURLRequest = NSMutableURLRequest(URL: requestURL)
let session = NSURLSession.sharedSession()
let task = session.dataTaskWithRequest(urlRequest) {
(data, response, error) -> Void in
let httpResponse = response as! NSHTTPURLResponse
let statusCode = httpResponse.statusCode
if (statusCode == 200) {
if (statusCode == 200) {
do{
print(data)
let json = try NSJSONSerialization.JSONObjectWithData(data!, options: .AllowFragments)
}catch {
print("Error with Json: \(error)")
}
}
}
}
task.resume()