th.json
{"lessons":[{"id":"38","fach":"D"},{"id":"39","fach":"M"}]}
ViewController.m
NSBundle *bundle = [NSBundle bundleForClass:[self class]];
NSString *JsonData = [bundle pathForResource:@"th" ofType:@"json"];
SBJsonParser *parser = [[SBJsonParser alloc] init] ;
NSDictionary *jsonObject = [parser objectWithString:JsonData error:NULL];
NSArray *list = [jsonObject objectForKey:@"lessons"];
NSLog(@"%@", list);
出力 NSLog リスト リターン
(null)
私のアプリは私のプロジェクト内でjsonファイルを使用します。プロジェクトフォルダーの「th.json」。ただし、NSArray *list は Json ファイルのデータを表示できません。