é¢æ°ååºå®ã®ã³ã¼ã«ããã¯ãJSONPã¨è¨ããã¨ã«ã¤ãã¦
å®éã®JSONPãã¼ã¿ãã覧é ããã°ãããã¾ãããcallbackã®é¢æ°åã¯kakaku_wsã¨ãªã£ã¦ããã¾ãã
http://blog.livedoor.jp/dankogai/archives/50639200.html
éããã¦ããjsonpã¯ãããªé¢¨ã«ãªã£ã¦ãã¾ãã
parse_yubin2jsonp('æ±äº¬é½','å代ç°åº','å代ç°');
ãããããããç¾å¨ä¸»æµã®JSONPã®è§£éèªä½ã提唱者の元々の定義からぶれているã®ã§ãå®ç¾©ã«ãã ããã¤ããã¯ããã¾ããªãã
ãã ããxxxãJSONP対å¿ãããï¼ãã£ã¦ãããã¦ãããã試ãã¦ã¿ããã¨æã£ãããèªåã®ã¯ã©ã¤ã¢ã³ãã©ã¤ãã©ãªã使ããªãã£ãã¨ãã¨ããã®ãã¨ã¦ãæ²ãããèªåã§ã¹ã¯ãªããã¿ã°ãã³ã¼ãã«æ¸ãã°ãããã ãããããã¼ã¸ã«çµæãè²¼ãä»ããã ãã®å°ããªç¨éã§ããã°ããã§ååãªãã ãããã©ãã
ã§ããã®ã¹ã¯ãªãããã¼ãã«ããHackçãªå´é¢ãé è½åãã¦ãã§ããã ãJSONPãWebãµã¼ãã¹å¼ã³åºãã£ã½ãæ±ãããã«å種ã©ã¤ãã©ãªããã£ã¦ãããã§ã¯ dojo ã«ãã prototype.js ã Mochikitの拡張ã«ãããã³ã¼ã«ããã¯é¢æ°åãURLãã©ã¡ã¼ã¿ã§ä¸ãããã¨ãããç¨åº¦åæã«ãã¦ããããæ±ç¨æ§ãåºãããã§ãã
é¢æ°ååºå®åã®JSONã³ã¼ã«ããã¯ãµã¼ãã¹ã¯ããããã£ãã©ã¤ãã©ãªããã¯å¼ã³åºããªãããã£ããåå©ç¨ã§ããä»çµã¿ããã£ã¦ãããã®ãµã¼ãã¹ã®ããã«æ°ãã«ã³ã¼ããèµ·ãããã¨ã«ãªããã¤ã¾ãJSONPã«ãããã£ããã®æ¨æºåã®æ©æµãæãããªãã
ãã¡ãããé¢æ°ååºå®åã®ã³ã¼ã«ããã¯ã«ãæå©ãªç¹ã¯ãããããã¯ããµã¼ãã¹ã®æä¾ã«å¿ ãããåçãªã³ã³ãã³ãçæã¨ã³ã¸ã³ãå¿ è¦ã¨ããªããã¨ãããã¨ãRSSãã£ã¼ãã®ããã«ãããããããã¡ã¤ã«ãçæãã¦ããã¦ãã¨ã¯Webãµã¼ãã«é ç½®ãã¦ããã ããã¨ããããæ¹ã§OKã§ãåç §ããããã³ã«ã³ã³ãã³ãçæã®ããã®ãµã¼ããªã½ã¼ã¹ãè²»ããã¨ãããã¨ã¯ãªãã
ã ãã©ããããã£ãã·ã¥ã«ããã»ã©æå³ããªããpaddingã®å¦çæéã®æ¯çãç¡è¦ã§ãããããªåçãµã¼ãã¹ã ã£ããªããã§ããã ãé¢æ°åã¯ãã©ã¡ã¼ã¿ã¨ãã¦åãåããããã«å®è£ ãã¦ãããæ¹ããããããæ¨æºããå¤ãã¦ãã¾ããã¨ã§å©ç¨ã®å¯è½æ§ãçã¾ã£ã¡ããã®ã¯ãµã¼ãã¹å´ã«ã¨ã£ã¦ãä¸æ¬æã ããã¨æããã
ãããªãã¼ã¹ãããã·ã§é«éã«paddingé¨åãæ¸ãæãããã£ãã·ã¥ããã£ã¦ãããããªãã¨æã£ããæ°ããmodä½ããï¼
ï¼è¿½è¨ï¼
ããã¯èªãJSONPã¨ã¯ãã£ã¦ãªããã©ãå½±é¿åã§ããã¨æãã®ã§ããã¾ããJSONãµã¼ãã¹ã§ã³ã¼ã«ããã¯ãåºå®ã«ããæå³ãã¾ã£ããåãããªãã
http://www.flickr.com/services/api/response.json.html
When a request is successful, the following JSON is returned:
jsonFlickrApi({...});
ï¼è¿½è¨ï¼ï¼
ãããFlickrã®JSONå¼ã³åºãããã¤ã®éã«ãã³ã¼ã«ããã¯é¢æ°æå®ã§ãããããªèª¬ææ¸ãã«ãªã£ã¦ããè¦é¢æ´æ°ã¯ã²ã©ããªãã
http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=0a0c1ce385ca8869648ba1181ad3df80&tags=autostitch&format=json&jsoncallback=handleSearchResults