views:

90

answers:

2

Hello -

I am trying to send a GET request to a URL that I know returns data in the form of JSON using python. I would like to know how to send this request to http://someurl/path/to/json, and how to parse it - preferably to a python dict. thanks :)

+1  A: 

You probably want to take a look at:

Michael Aaron Safyan
+6  A: 

Python's standard library has json and urllib2 modules.

import json
import urllib2

data = json.load(urllib2.urlopen('http://someurl/path/to/json'))
SilentGhost
this is exactly what I wanted - thanks!
sa125