JSON TO NSDictionary Mac & iOS

NSString * jsonPath=[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Contents.json"];
 NSString * jsonStr=[[NSString alloc] initWithData:[NSData dataWithContentsOfFile:jsonPath] encoding:NSUTF8StringEncoding];
NSLog(@"%@",[JsonToDictionary diccionaryFromJsonString:jsonStr]);
posted @ 2015-09-17 20:52  springday  阅读(144)  评论(0编辑  收藏  举报