parsing - Parse POST HTTP response using Python -


i want parse post http response using python.

my response looks like:

{   "result": 0,   "responsestatus": {     "errorcode": null,     "message": null,     "stacktrace": null,     "errors": null   },   "sessionid": "68ebcd6f-0aef-420d-a12b-c953f8df8ed1",   "responseheader": {     "succeeded": true,     "errors": []   } } 

i want parse - "sessionid" 2nd http request. how can achieve it? !

import json  response = '{"result": 0, "responsestatus": { "errorcode": null,"message": null, "stacktrace": null, "errors": null },"sessionid": "68ebcd6f-0aef-420d-a12b-c953f8df8ed1", "responseheader": { "succeeded": true, "errors": [] } }' json_response = json.loads(response) print json_response['sessionid'] 

i guess using urllib, recommend using requests


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -