解析json网页文件
NSError *error;
NSURL *url=[NSURL URLWithString:@"http://10.191.255.121/web/picture/data/picture/littleredhat/config.json"];
NSString *jsonString = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:&error];
NSData*jsonData=[jsonString dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *bookdic=[NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil];
网友评论