Skip to content

Instantly share code, notes, and snippets.

@jacek64
jacek64 / gistfile1.py
Created February 6, 2016 21:03
Load Json into a Python object
# Load Json into a Python object
import urllib2
import json
req = urllib2.Request("http://localhost:81/sensors/temperature.json")
opener = urllib2.build_opener()
f = opener.open(req)
json = json.loads(f.read())
print json
print json['unit']