Skip to content

Instantly share code, notes, and snippets.

@sergdort
Last active December 16, 2015 14:06
Show Gist options
  • Save sergdort/2ef836577ed44e8b45b5 to your computer and use it in GitHub Desktop.
Save sergdort/2ef836577ed44e8b45b5 to your computer and use it in GitHub Desktop.
let data:NSData = ...
let context:NSManagedObjectContext
do {
let user:User? = try SwiftImport<User>.importObject
<^> context
<*> JSONObject -<< JSONObjectWithData -<< data
} catch {
//handle error
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment