flickr json iphone 中的错误
我正在关注这个针对 flickr 和 iphone 的教程 我有一把钥匙,只需使用下载的代码, 我在模拟器中出现空白屏幕,并在控制台中出现以下错误,
[Session started at 2011-03-02 16:06:53 +1100.]
2011-03-02 16:06:57.158 JSONFlickr[10188:207] -JSONValue failed. Error trace is: (
“Error Domain=org.brautaset.JSON.ErrorDomain Code=6 \”Missing hex digit in quad\” UserInfo=0x4e3ade0 {NSLocalizedDescription=Missing hex digit in quad}”,
“Error Domain=org.brautaset.JSON.ErrorDomain Code=6 \”Missing hex quad\” UserInfo=0x4e39a20 {NSUnderlyingError=0x4e39880 \”Missing hex digit in quad\”, NSLocalizedDescription=Missing hex quad}”,
“Error Domain=org.brautaset.JSON.ErrorDomain Code=6 \”Broken unicode character\” UserInfo=0x4e39820 {NSUnderlyingError=0x4e09520 \”Missing hex quad\”, NSLocalizedDescription=Broken unicode character}”,
“Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \”Object value expected for key: title\” UserInfo=0x4e07f20 {NSUnderlyingError=0x4e399a0 \”Broken unicode character\”, NSLocalizedDescription=Object value expected for key: title}”,
“Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \”Expected value while parsing array\” UserInfo=0x4e07030 {NSUnderlyingError=0x4e09260 \”Object value expected for key: title\”, NSLocalizedDescription=Expected value while parsing array}”,
“Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \”Object value expected for key: photo\” UserInfo=0x4e3ba70 {NSUnderlyingError=0x4e397a0 \”Expected value while parsing array\”, NSLocalizedDescription=Object value expected for key: photo}”,
“Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \”Object value expected for key: photos\” UserInfo=0x4e04dc0 {NSUnderlyingError=0x4e34990 \”Object value expected for key: photo\”, NSLocalizedDescription=Object value expected for key: photos}”
)
2011-03-02 16:06:57.162 JSONFlickr[10188:207] -JSONValue failed. Error trace is: (
“Error Domain=org.brautaset.JSON.ErrorDomain Code=10 \”Garbage after JSON\” UserInfo=0x4e30cb0 {NSLocalizedDescription=Garbage after JSON}”
)
所以您猜我正在学习 json,并且不明白这些错误的含义!,所以提前致谢!
Im following this tutorial for flickr and iphone
I have a key, and just using the downloaded code,
I get a blank screen in the simulator and the following errors in console
[Session started at 2011-03-02 16:06:53 +1100.]
2011-03-02 16:06:57.158 JSONFlickr[10188:207] -JSONValue failed. Error trace is: (
“Error Domain=org.brautaset.JSON.ErrorDomain Code=6 \”Missing hex digit in quad\” UserInfo=0x4e3ade0 {NSLocalizedDescription=Missing hex digit in quad}”,
“Error Domain=org.brautaset.JSON.ErrorDomain Code=6 \”Missing hex quad\” UserInfo=0x4e39a20 {NSUnderlyingError=0x4e39880 \”Missing hex digit in quad\”, NSLocalizedDescription=Missing hex quad}”,
“Error Domain=org.brautaset.JSON.ErrorDomain Code=6 \”Broken unicode character\” UserInfo=0x4e39820 {NSUnderlyingError=0x4e09520 \”Missing hex quad\”, NSLocalizedDescription=Broken unicode character}”,
“Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \”Object value expected for key: title\” UserInfo=0x4e07f20 {NSUnderlyingError=0x4e399a0 \”Broken unicode character\”, NSLocalizedDescription=Object value expected for key: title}”,
“Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \”Expected value while parsing array\” UserInfo=0x4e07030 {NSUnderlyingError=0x4e09260 \”Object value expected for key: title\”, NSLocalizedDescription=Expected value while parsing array}”,
“Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \”Object value expected for key: photo\” UserInfo=0x4e3ba70 {NSUnderlyingError=0x4e397a0 \”Expected value while parsing array\”, NSLocalizedDescription=Object value expected for key: photo}”,
“Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \”Object value expected for key: photos\” UserInfo=0x4e04dc0 {NSUnderlyingError=0x4e34990 \”Object value expected for key: photo\”, NSLocalizedDescription=Object value expected for key: photos}”
)
2011-03-02 16:06:57.162 JSONFlickr[10188:207] -JSONValue failed. Error trace is: (
“Error Domain=org.brautaset.JSON.ErrorDomain Code=10 \”Garbage after JSON\” UserInfo=0x4e30cb0 {NSLocalizedDescription=Garbage after JSON}”
)
so as you guess im learning json, and dont understand what this errors mean!, so thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
很明显,您输入解析器的 JSON 字符串是垃圾。查看错误消息,我想说这可能是由于使用了不正确的字符串编码引起的。您可能期望它是 UTF-8 并得到其他内容(反之亦然)。
It's clear that the JSON string you are feeding into the parser is garbage. Looking at the error messages, I would say it is probably caused by using an incorrect string encoding. You are probably expecting it to be UTF-8 and getting something else (or vice versa).