Json解析
来源:互联网 发布:centos重置root密码 编辑:程序博客网 时间:2024/05/07 00:28
1,第三方框架:Jsonkit
注意:改为MRC 并且修改两处isa
2,苹果原生 :
NSURL *url = [NSURLURLWithString:@"一个json类型的url"];
NSURLRequest *request = [NSURLRequestrequestWithURL:url];
[NSURLConnectionsendAsynchronousRequest:request queue:[NSOperationQueuemainQueue] completionHandler:^(NSURLResponse *response,NSData *data, NSError *connectionError) {
/**
NSJSONReadingMutableContainers = (1UL << 0),容器是可变的,转成的结果是可变的类型
NSJSONReadingMutableLeaves = (1UL << 1), 叶子节点是可变的
NSJSONReadingAllowFragments = (1UL << 2) 允许根节点 可以不是NSArray,NSDictionary
枚举类型,一般使用位移的,传0,什么事情都不做
*/
id result = [NSJSONSerializationJSONObjectWithData:data options:NSJSONReadingMutableContainerserror:NULL];
NSLog(@"result = %@---%@", result, [resultclass]);
}];
- 【JSON解析】JSON解析
- 解析JSON
- Json解析
- JSON解析
- JSON解析
- json解析
- Json解析
- Json解析
- JSON解析
- Json解析
- Json解析
- JSON解析
- JSON解析
- json 解析
- Json解析
- JSON解析
- json解析
- json 解析
- Adapter的优化和事列代码
- git下载和上传代码
- CocoaPods安装和使用及问题:Setting up CocoaPods master repo
- ListView中convertView和ViewHolder的工作原理
- ShaderLab Tutorials-Matrix
- Json解析
- 贪吃蛇
- 找到linux下当前进程启动的目录
- MYSQL 校对集 collate
- jQuery锚点滚动js
- PHP引用问题
- Servlet--表单、超链接、转发、重定向4种情况的路径
- android:在android studio中使用lambda,android lambda,retrolambda
- 树形DP的一些总结