获取文件路径
NSString * jsonPath = [[NSBundle mainBundle] pathForResource:@"Student" ofType:@"json"];
2.初始化NSData对象
NSData *data = [NSData dataWithContentsOfFile:jsonPath];
3.解析(NSJSONReadingMutableContainers) 可变的一个容器
// NSJSONReadingMutableLeaves
// NSJSONReadingAllowFragments
NSMutableArray * arr = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
NSLog(@"%@",arr);
转载于:https://blog.51cto.com/qccccc/1552646