Here is an example Python program to read a JSON via URL using urllib2 and simplejson.
import urllib2
import simplejson
response = urllib2.urlopen("http://172.0.0.1:8000/custom/get/")
data = simplejson.load(response)
print data
# => {'content': 'Hello World!', 'success': True}
If you want to get the value of a specific key
import urllib2
import simplejson
response = urllib2.urlopen("http://172.0.0.1:8000/custom/get/")
data = simplejson.load(response)
print data["content"]
# => Hello World!
Done =)
References:
