为什么NSData 的数据为中文字符串的时候,转化为字典为啥为空呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 转码时候ASCII转码格式试试 建议使用异步的请求方式,你这种方式会阻塞线程,用户体验度差。参考如个伪代码NSURL *url = [NSURL urlWithString:@"xxxxxxx"];NSURLRequest *request = [NSURLRequest requestWIthURL:url];[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) { id json = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingAllowFragments error:&error]; NSLog(@"result : %@",json);} IPA支付点击任何按钮提示支付金额一样<cell重用没问题,支付流程已走通> mac下的myeclipse怎么调整内存 IOS怎么调用Java服务 IB问题 Iphone开发,有没有想兼职做做项目的朋友 关于utility application的入门问题。 苹果MAC系统应用程序开发基础问题 UIScrollView 定位问题 Missing required icon file.。。。。 for iPad ios 加水印 关于Adobe air 开发IOS程序版本的问题 CoreData清空问题
NSURL *url = [NSURL urlWithString:@"xxxxxxx"];
NSURLRequest *request = [NSURLRequest requestWIthURL:url];
[NSURLConnection sendAsynchronousRequest:request
queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data,
NSError *error) {
id json = [NSJSONSerialization JSONObjectWithData:jsonData
options:NSJSONReadingAllowFragments
error:&error];
NSLog(@"result : %@",json);
}