Skip to content

Instantly share code, notes, and snippets.

@nataliepo
Created April 13, 2015 14:17
Show Gist options
  • Save nataliepo/18832ae51019ed35a741 to your computer and use it in GitHub Desktop.
Save nataliepo/18832ae51019ed35a741 to your computer and use it in GitHub Desktop.
Create dictionary from file
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"allSources" ofType:@"json"];
NSData *data = [NSData dataWithContentsOfFile:filePath];
NSError *error = nil;
NSDictionary *result = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&error];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment