拿 Google Spreadsheet 當作 JSON backend...

在「Use a Google Spreadsheet as your JSON backend」這篇看到的,整篇的重點是這個 url:

https://spreadsheets.google.com/feeds/list/PUT-KEY-HERE/od6/public/values?alt=json

中間的 PUT-KEY-HERE 是文件的 key。當然,文件本身要公開發佈出去才能夠過 JSON 取得資料。

另外原文章裡面也有提供 JSONP 的方式可以使用,還蠻有趣的方式...

Facebook Like 的 JSON/JSONP 數據...

Hacker News 上看到這個 url:「http://graph.facebook.com/http://news.ycombinator.com」,看起來就是 Facebook Like 的 JSON output:

{
   "id": "http://news.ycombinator.com",
   "shares": 930
}

測了一下,發現可以吃 JSONP:「http://graph.facebook.com/http://news.ycombinator.com?callback=test」:

test({
   "id": "http://news.ycombinator.com",
   "shares": 930
});

暫時還想不到能拿來做什麼... 不過看起來蠻方便的 :o