Skip to content

Instantly share code, notes, and snippets.

@zwaldowski
Created August 15, 2014 15:37
Show Gist options
  • Save zwaldowski/4235c41e3236f322812d to your computer and use it in GitHub Desktop.
Save zwaldowski/4235c41e3236f322812d to your computer and use it in GitHub Desktop.
import Cocoa
let data: NSData = `...`
var jsonError: NSError?
let decodedJson = NSJSONSerialization.JSONObjectWithData(data, options: nil, error: &jsonError) as NSDictionary!
if decodedJson != nil {
println(decodedJson["title"])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment