提取本地json
by 伍雪颖
NSData* data=[NSData
dataWithContentsOfFile:[[NSBundle
mainBundle]
pathForResource:@"localobj"
ofType:@"json"]];
NSError* error;
NSDictionary *localObj =[NSJSONSerialization
JSONObjectWithData:data
options:NSJSONReadingMutableContainers
error:&error];
时间: 2024-10-26 00:16:36