0
谷歌貨幣轉換器我需要實時貨幣匯率。我正在使用一個谷歌API在URL中可用-JSON值失敗。錯誤跟蹤是:在iPhone
http:://www.google.com/ig/calculator?hl=en&q=1USD=?INR
無論何時使用json解析命中該URL,然後響應數據變爲零。我沒有收到什麼是代碼確切的錯誤
#define openexchangeURl @"http://www.google.com/ig/calculator?hl=en&q=1USD=?INR"
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:openexchangeURl]];
NSString *responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
values =[responseString JSONValue];
第二?在查詢字符串中應該是一個紅旗。仔細檢查您的網址。 – Jeremy 2013-02-26 05:45:19
可以請示例代碼如何解析網址,也是{lhs:「1美元」,rhs:「54.0336089印度盧比」,錯誤:「」,icc:true}這個數據後,該網址我只需要值是54.0336089 – areddy 2013-02-26 05:47:50
聽起來像一個不同的問題。你是否說你不再得到零響應? – Jeremy 2013-02-26 05:49:44