2011-03-02 91 views
0

林下面這個tutorial for flickr and iphone 我有鑰匙,只是使用下載的代碼, 我得到在模擬器黑屏並在控制檯下面的錯誤錯誤在Flickr的JSON 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}」 
) 

所以你猜im學習json,並不明白這個錯誤是什麼意思!,所以先謝謝了!

回答

0

很明顯,您提供給解析器的JSON字符串是垃圾。看看這些錯誤消息,我想說這可能是由於使用了錯誤的字符串編碼引起的。您可能期望它是UTF-8並獲得其他內容(反之亦然)。