Skip to content

Instantly share code, notes, and snippets.

@npinto
Created January 22, 2013 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save npinto/4599589 to your computer and use it in GitHub Desktop.
Save npinto/4599589 to your computer and use it in GitHub Desktop.
JSONKit w/ NSBundle file
NSString* jsonPath = [[NSBundle mainBundle] pathForResource:@"arr_fb" ofType:@"json"];
NSData* jsonData = [NSData dataWithContentsOfFile:jsonPath];
JSONDecoder* decoder = [[JSONDecoder alloc] initWithParseOptions:JKParseOptionNone];
NSDictionary* json = [decoder objectWithData:jsonData];
NSArray* shape = [json objectForKey:@"shape"];
NSUInteger fbn_ = [[shape objectAtIndex:0] intValue];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment