标签:io ar for 文件 sp on ad bs res
1利用NSBundle 取得json文件路径
NSString *path=[[NSBundle mainBundle]pathForResource:@"help.json" ofType:nil];
2把文件转成NSData
NSData *data=[NSData dataWithContentsOfFile:path];
3利用NSJSONSerialization把data解析成数组或字典类型
NSArray *dicArray=[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
标签:io ar for 文件 sp on ad bs res
原文地址:http://www.cnblogs.com/mgy007/p/4014448.html