Skip to content

Instantly share code, notes, and snippets.

@npinto
Created January 22, 2013 23:05
Show Gist options
  • Select an option

  • Save npinto/4599589 to your computer and use it in GitHub Desktop.

Select an option

Save npinto/4599589 to your computer and use it in GitHub Desktop.

Revisions

  1. npinto created this gist Jan 22, 2013.
    6 changes: 6 additions & 0 deletions json_bundle.m
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    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];