Created
April 26, 2010 15:02
-
-
Save ejknapp/379441 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Deserialize json and add to Core Data | |
| #import "CJSONDeserializer.h" | |
| #import "CJSONSerializer.h" | |
| /* | |
| The JSON lib is found here: http://code.google.com/p/json-framework/ | |
| */ | |
| - (void)processNewMessagesData:(NSString *)jsonMessages { | |
| 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]; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment