$(function(){
$.getJSON('http://pipes.yahoo.com/pipes/pipe.run?_id=7ba696f34ae17b6fa8f5d4de13064dea&_render=json&callback=?',function(data){alert('called')});
});
我正在使用上面的代码访问我创建的雅虎管道,以将last.fm xml输出转换为json。但是firebug控制台输出向我显示
invalid label
http://pipes.yahoo.com/pipes/pipe.run?_id=7ba696f34ae17b6fa8f5d4de13064dea&_render=json&callback=jsonp1276401573015
Line 1
虽然我可以使用浏览器以完全正常的方式查看结果。我还使用 jsonlint 验证了 json,它显示 json 是有效的,可能是什么问题?
最佳答案
根据http://discuss.pipes.yahoo.com/Message_Boards_for_Pipes/threadview?m=mm&bn=pip-DeveloperHelp&tid=2097&mid=2098&tof=3&o=rr&rt=2&frt=2&off=1,这是_callback
而不是callback
关于jquery - 无法从 yahoo 管道读取 json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3031036/