Skip to content

Instantly share code, notes, and snippets.

@ejknapp
Created November 24, 2009 01:22
Show Gist options
  • Save ejknapp/241544 to your computer and use it in GitHub Desktop.
Save ejknapp/241544 to your computer and use it in GitHub Desktop.
// Deserialize json and add to Core Data
- (void)processNewMessagesData:(NSString *)jsonMessages {
NSLog(@"In processNewMessagesData");
NSData *messagesData = [jsonMessages dataUsingEncoding:NSUTF8StringEncoding];
NSError *error = nil;
NSArray *messageArray = [[CJSONDeserializer deserializer]
deserialize:messagesData error:&error];
if (messageArray && [messageArray count] > 0) {
[self.coreDataManager insertFlakMessages:messageArray];
}
[self.currentViewControllerToBeReloaded.tableView reloadData];
[[self.currentViewControllerToBeReloaded activityIndicator] stopAnimating];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment