精華區beta MacDev 關於我們 聯絡資訊
※ 引述《terry0629 (德仔)》之銘言: : 我在google有查到google dictionary有個非官方的API : http://www.google.com/dictionary/json?callback=dict_api.callbacks.id100&q=test&sl=en&tl=en&restrict=pr%2Cde&client=te : 這頁的資料來源也是用json表示 如果我想從中取出我要的這單字的意思跟例句我該如何 : 做呢? 1. 用 NSURLConnection 抓資料,如果你不喜歡 NSURLConnection, 也可以用 ASIHTTPRequest http://allseeing-i.com/ASIHTTPRequest/ 或是我們公司的 LFHTTPRequest http://github.com/lukhnos/LFWebAPIKit 2. 隨便找一套 JSON Parser 去 parse 資料,例如 http://github.com/blakeseely/bsjsonadditions Facebook 有弄另外一套 http://github.com/facebook/three20/tree/master/src/extThree20JSON/ 另外還有一大堆,Google 一下就有。 -- zonble.net cocoa.zonble.net -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.128.103.143