SyntaxFix
Write A Post
Hire A Developer
Questions
import json import urllib url = 'http://example.com/file.json' r = urllib.request.urlopen(url) data = json.loads(r.read().decode(r.info().get_param('charset') or 'utf-8')) print(data)
urllib, for Python 3.4 HTTPMessage, returned by r.info()