naveens33_
3 years agoContributor
Get aqHttpResponse as json/dict format
In following python code, I can see aqHttpResponse Object Properties has only Text but actually I required my response to be in json or dict format in-order to parse it.
request = aqHttp.CreateGetRequest(endpoint)
response = request.Send()
Please suggest how I can get the response in json/dict format or how I can convert this response.Text to json/dict format.
Note:
eval() function I have used to convert text to dict but it failed for the case like
"status": true
NameError: name 'true' is not defined
Hi Locke65 ,
Found an alternative way through json package and its works fine now,import json
json_ = json.loads('{"records":[{"Id":true}]}')
Log.Message(json_["records"][0]["Id"])