我正在为机械土耳其人编写一个javascript客户端,因为机械土耳其人不提供JSON API,我通过Yahoo Pipes传递他们的数据,将其格式化为JSON。我现在阅读这个JSON有很多困难(由于跨域不兼容)我应该如何正确读取yahoo管道的输出,可以通过.parseJSON()解析
我想强调它是一个客户端工具(使用javascript),我不想用PHP设置服务器来使用feed。
{"count":1,"value":{"title":"Mturk Caller","description":"Pipes Output","link":"http:\/\/pipes.yahoo.com\/pipes\/pipe.info?_id=4dc935cadabe6d6bed8821ecabd07d6d","pubDate":"Fri, 25 Feb 2011 03:16:50 -0800","generator":"http:\/\/pipes.yahoo.com\/pipes\/","callback":"","items":[{"OperationRequest":{"RequestId":"5bf099e6-20e7-46f1-bd53-87058120498e"},"GetAccountBalanceResult":{"AvailableBalance":{"Amount":"10000.000","CurrencyCode":"USD","FormattedPrice":"$10,000.00"},"Request":{"IsValid":"True"}},"description":"","title":""}]}}
我使用的管道地址是
http://pipes.yahoo.com/pipes/pipe.run?AWSAccessKeyId=1Q7SH20FYTKQQ05SCDG2&Operation=GetAccountBalance&Service=AWSMechanicalTurkRequester&Signature=wPBfRCe5tn8vlQVv0//yc4Tm/iA=&Timestamp=2011-02-25T11:16:52Z&Version=2008-08-02&_id=4dc935cadabe6d6bed8821ecabd07d6d&_render=json&callback=?
答案 0 :(得分:4)
您需要_callback
不是callback