读取json文件

2015-12-30  本文已影响87人  fallrainy

读取json文件

NSString *path = [[NSBundle mainBundle] pathForResource:@"area" ofType:@"json"];
NSData *data = [NSData dataWithContentsOfFile:path];
NSError *error;
NSDictionary *jsonDict = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:&error];
上一篇 下一篇

猜你喜欢

热点阅读