When parsing data with NSJSONSerialization, my code will not compile unless I specify the parsing error with an ampersand before it, as such:
var parsingError: NSError? = nil
let parsedResult = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.AllowFragments, error: &parsingError) as! NSDictionary
You can see it in
error: &parsingError
Could someone explain why this is and what the meaning of the ampersand is here?
Thanks a lot!