convert a json string to python object

Viewed 95808

Is it possible to convert a json string (for e.g. the one returned from the twitter search json service) to simple string objects. Here is a small representation of data returned from the json service:

{
results:[...],
"max_id":1346534,
"since_id":0,
"refresh_url":"?since_id=26202877001&q=twitter",
.
.
.
}

Lets say that I somehow store the result in some variable, say, obj. I am looking to get appropriate values like as follows:

print obj.max_id
print obj.since_id

I've tried using simplejson.load() and json.load() but it gave me an error saying 'str' object has no attribute 'read'

2 Answers
Related