2010-05-07 39 views
1

使用API​​,試圖讓項目在特定的飼料返回此:谷歌閱讀器API HTTP響應解析(目標C)

{「方向」:」升」,」 ID」:」飼料/ http://arstechnica.com/index.rssx」 ,「標題」:「Ars Technica」,「描述」:「藝術的技術」,「自我」:[{「href」:「http://www.google.com/reader/api/0/stream/contents/feed/http://arstechnica.com/index.rssx?ot \ u003d1273193172856169 \ u0026r \ u003 \ u0026xt \ u003duser/-/state/com。 google/read \ u0026n \ u003d4 \ u0026ck \ u003d1273193873 \ u0026client \ udi3diPadReader「}],」alternate「:[{」href「:」http://arstechnica.com/index.php「,」type「:」text/html「}],」updated「:1273193873 ,「items」:[]}

它們看起來像鍵/值對,但是它是純文本,包含UTF8字符串編碼g並且不會編碼成字典。我正在使用Objective-C,我不知道該從哪裏出發。到目前爲止,我已經能夠解析未讀項目的XML響應,但解析純文本看起來不太可行。你的做法是什麼?

回答

1

它看起來像JSON markup。 Objective-C需要使用JSON parser

+0

我想你是對的。我發現一些非官方的文檔說,即使你請求XML,它仍然給你這個。 感謝您的鏈接 – Justin 2010-05-07 17:51:14