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'
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…