以JSON格式从Google+相册中获取照片 [英] Get photos from a Google+ album, in JSON format

查看:353
本文介绍了以JSON格式从Google+相册中获取照片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基于此帖子:

Google Plus相册Urls

如何直接从Google服务器获取JSON格式的响应? (这意味着:无需解析xml并从我的服务器转换为JSON).

How I can get the response in JSON format, directly from the Google servers? (that means: without parse the xml and convert to JSON from my server).

推荐答案

您已经注意到,您需要暂时使用Picasa网络相册API,直到他们使用Google+ API. Picasa网络相册API使用了较早的Google数据协议,该协议是围绕XML设计的.

As you've noticed, you need to use the Picasa Web Albums API for now, until they get around to a Google+ API. Picasa Web Albums API uses the older Google Data Protocol, which was designed around XML.

您可以通过向URL提供?alt = json参数来让Google的服务器将XML转换为JSON. https中记录了如何将XML转换为JSON的规则以及与此有关的其他信息. ://developers.google.com/gdata/docs/json

You can have Google's servers convert the XML to JSON by providing an ?alt=json parameter to the URL. The rules for how the XML is converted to JSON, as well as other information about this, are documented at https://developers.google.com/gdata/docs/json

这篇关于以JSON格式从Google+相册中获取照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆