Swift 3 using AFNetworking
<p>I am using AFNetworking with Swift 3.0 and I am stuck on one code.</p>

<pre><code>func getJSON()
    {


        let manager = AFHTTPSessionManager()
        manager.get(
            url,
            parameters: nil,
            success:
            {
                (operation: URLSessionTask!, responseObject: Any?) in

                 print("JSON: " + responseObject!.description)
                 self.matchesArray = responseObject!.object(forKey: "matches")! as? NSMutableArray
                 self.tollBothPlazaTableView.reloadData()
            },

            failure:
            {
                (operation: URLSessionTask!, error: NSError)  in
                print("Error: " + error.localizedDescription)
            }
        )
    }
</code></pre>

<p>It shows error on <code>failure</code> block. </p>

<blockquote>
  <p>Cannot convert value of type '(URLSessionTask!, NSError) -> ()' to expected argument type '((URLSessionDataTask?, Error) -> Void)?'` </p>
</blockquote>

<p>Can someone explain what is wrong in my code. Also the correct way to use closures? (I am new to swift).</p>