title: JSON Serialization crashing in swift
body: <p>I had been using the following line of code to parse JSON data in Objective-C, but the same in Swift crashes the app. </p>
  
  <pre><code>NSDictionary* json = [NSJSONSerialization
                            JSONObjectWithData:_webData
                            options:kNilOptions
                            error:&amp;error];
  </code></pre>
  
  <p>I tried using <code>NSJSONReadingOptions.MutableContainers</code> but doesn't seem to work. I have verified the validity of the JSON data obtained from the web server using various JSON validity checkers found online.</p>
  
  <p>[EDIT] The swift code I am using is as follows:</p>
  
  <pre><code>let jsonResult: NSDictionary = NSJSONSerialization.JSONObjectWithData(data, options:NSJSONReadingOptions.MutableContainers , error: &amp;error) as NSDictionary
  </code></pre>
  
  <p>[UPDATE]</p>
  
  <p>Using <code>let jsonResult: AnyObject! = NSJSONSerialization.JSONObjectWithData(data, options:NSJSONReadingOptions.MutableContainers, error: error) as? NSDictionary</code> solves the issue.</p>