AF解析Json出错的时候 这样看提示信息
来源:互联网 发布:哪有好的java学校 编辑:程序博客网 时间:2024/05/17 21:20
AF解析json出错:
Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (JSON text did not start with array or object and option to allow fragments not set.) UserInfo=0x8a8a700 {NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}
可打印 NSLog ( @"operation: %@" , operation. responseString ); 服务端返回的结果看看哪里错了
[client getPath : nil parameters : nil success :^( AFHTTPRequestOperation *operation, id responseObject)
{
NSError *error;
NSDictionary *dict = [ NSJSONSerialization JSONObjectWithData :responseObject options : NSJSONReadingMutableLeaves error :&error];
NSLog ( @"operation: %@" , operation. responseString );
if (success) {
success(dict);
}
}
failure :^( AFHTTPRequestOperation *operation, NSError *error)
{
NSLog ( @"error description:%@" ,[error description ]);
}];
Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (JSON text did not start with array or object and option to allow fragments not set.) UserInfo=0x8a8a700 {NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}
可打印 NSLog ( @"operation: %@" , operation. responseString ); 服务端返回的结果看看哪里错了
[client getPath : nil parameters : nil success :^( AFHTTPRequestOperation *operation, id responseObject)
{
NSError *error;
NSDictionary *dict = [ NSJSONSerialization JSONObjectWithData :responseObject options : NSJSONReadingMutableLeaves error :&error];
NSLog ( @"operation: %@" , operation. responseString );
if (success) {
success(dict);
}
}
failure :^( AFHTTPRequestOperation *operation, NSError *error)
{
NSLog ( @"error description:%@" ,[error description ]);
}];
0 0
- AF解析Json出错的时候 这样看提示信息
- 编译stuntd 的时候出错信息+解决方法
- dialog 登录的时候 提示信息的
- 数据库附加出错时候提示为只读的解决办法
- 启动apache的时候提示 mod_dev_svn.so出错
- JSON解析的时候遇到NSNull
- 解析Json数据的时候抛出MalformedJsonException
- AFNetWork 解析Json出错
- iOS json解析出错
- json解析出错
- LigerUi中,使用LG.ajax返回JSON提示信息的Asp.Net拼法(示例,应该能看明白吧)
- Tomcat启动的dos窗口一闪而过,如何看出错信息?
- Tomcat启动的dos窗口一闪而过,如何看出错信息
- javascript 参数化处理的时候 解析后画面出错
- 程序运行的时候出错,提示esp值出错,是什么问题
- 请规范你的软件应用的提示出错信息
- 用SQLServer2005还原数据库的时候出错,提示错误信息"C:/Program Files/Microsoft SQL Server/MSSQL.1/MSSQL/Data/db.mdf的目录查找失败..."。这样的错误偶尔会遇到,请问是怎么回事,该怎
- 今天访问数据库的时候出现提示信息
- YTU 1011 Rails 栈
- FIFO(First-In First-Out)先进先出页面置换算法详解
- LeetCode || Submission Details
- 好代码的伪科学定义
- SQL语句
- AF解析Json出错的时候 这样看提示信息
- 消息总线重构之EventBus
- 反向删除文件
- bzoj-3223 文艺平衡树
- 【 D3.js 高级系列 — 10.0 】 思维导图
- 黑马day11 事务入门案例
- JDOM 解析xml文件
- QT+opencv学习笔记一 opencv配置及Mat浅拷贝
- 网络图片查看器