本文介绍了如何使用Python从RESTful服务获取JSON数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有使用Python从RESTful服务中获取JSON数据的标准方法?
Is there any standard way of getting JSON data from RESTful service using Python?
我需要使用kerberos进行身份验证.
I need to use kerberos for authentication.
一些代码片段会有所帮助.
some snippet would help.
推荐答案
除非我没有指出要点,否则类似的事情应该起作用:
Something like this should work unless I'm missing the point:
import json
import urllib2
json.load(urllib2.urlopen("url"))
这篇关于如何使用Python从RESTful服务获取JSON数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!