其他分享
首页 > 其他分享> > android-如何将Google API响应设置为json

android-如何将Google API响应设置为json

作者:互联网

我正在使用Google Contact API,它以XML格式发送联系人详细信息,有没有办法以JSON格式获得相同的响应.

我的要求网址:

https://www.google.com/m8/feeds/contacts/default/full?format=json

这就是我现在正在尝试的方法,但是即使添加了format = json后,它也无法正常工作,我得到了XML响应.

解决方法:

要获取json响应,我们必须使用alt而不是format

https://www.google.com/m8/feeds/contacts/default/full?alt = json

标签:oauth-2-0,google-api,google-contacts-api,android
来源: https://codeday.me/bug/20191121/2055630.html