Skip to content

Instantly share code, notes, and snippets.

@aladine
Created June 30, 2014 16:51
Show Gist options
  • Save aladine/476ba7158dfbbe65afd5 to your computer and use it in GitHub Desktop.
Save aladine/476ba7158dfbbe65afd5 to your computer and use it in GitHub Desktop.
var data:NSData! = content.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: true)
let jsonDict : NSDictionary? = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers, error: &error) as? NSDictionary
if let err = error {
println("error parsing json")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment