如何用python把json转为列表,Python:将JSON(由URL返回)转换为列表

I am requesting youtube search terms for use with jquery autocomplete, but am having a hard time converting the URL response into a proper format.

In my (Django/Python) view I do:

data2 = urllib2.urlopen('http://suggestqueries.google.com/complete/search?hl=en&ds=yt&client=youtube&hjson=t&jsonp=window.yt.www.suggest.handleResponse&q=jum&cp=3')

(I hardcoded the search term = 'jump' for simplicity)

If I do data2.read() I get what I believe is JSON (copy-pasting the url into a browser also returns this.)

window.yt.www.suggest.handleResponse(["jum",[["jumpstyle","","0"],["jump","","1"],["jump around","","2"],["jump on it","","3"],["jumper","","4"],["jump around h

你可能感兴趣的:(如何用python把json转为列表,Python:将JSON(由URL返回)转换为列表)