Tag Archives: simplejson

Python – Read and parse a JSON via URL

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}

Continue reading Python – Read and parse a JSON via URL