Json Yahoo Placefinder API和cURL/wget

Json Yahoo Placefinder API和cURL/wget,json,http,curl,wget,yahoo-api,Json,Http,Curl,Wget,Yahoo Api,我正在尝试使用我编写的脚本向Yahoo Placefinder API发出请求,我希望它返回JSON。但是,所有请求都会发回XML。这就是说,当我在浏览器中运行相同的脚本时,我得到了预期的JSON数据。以下是我的要求: wget http://where.yahooapis.com/geocode?location=San+Francisco,+CA&flags=J&appid=yourappid curl http://where.yahooapis.com/geocode?

我正在尝试使用我编写的脚本向Yahoo Placefinder API发出请求,我希望它返回JSON。但是,所有请求都会发回XML。这就是说,当我在浏览器中运行相同的脚本时,我得到了预期的JSON数据。以下是我的要求:

wget http://where.yahooapis.com/geocode?location=San+Francisco,+CA&flags=J&appid=yourappid

curl http://where.yahooapis.com/geocode?location=San+Francisco,+CA&flags=J&appid=yourappid

非常感谢您的帮助。这是相当令人沮丧的,似乎它应该很容易修复

您也可以尝试通过(Yahoo查询语言)使用Placefinder。它提供了XML和JSON输出,并为混搭其他服务提供了更多的灵活性

下面是一个示例调用:


curl-xget”时,我无法获取JSONhttp://where.yahooapis.com/geocode?location=San+Francisco,+CA&flags=J“
,您是否缺少参数?这就解决了问题!缺少旋度参数。把这个作为答案,我会把它标记为已回答!