一,工程图。
二,代码。
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
NSString * datapath = [[NSBundle mainBundle] pathForResource:@"failureReason" ofType:@"json"];
NSData * jsonData = [NSData dataWithContentsOfFile:datapath];
NSMutableDictionary *arrayDic = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:nil];
NSLog(@"----arrayDic---%@",arrayDic);
}