flickr json iphone 中的错误

发布于 2024-10-19 14:49:41 字数 2174 浏览 1 评论 0原文

我正在关注这个针对 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无边思念无边月 2024-10-26 14:49:41

很明显,您输入解析器的 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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文