Badly need help to fix Dictionary update retaining the codes in python

Hi All,

I need to update a dictionary values in python. I am creating the dictionary using request module from api.

If i give null without quotes, python throws an error.

url = ‘https://XXXXX/resources/task?taskid=35ba547da42d41cc8e3d9ffa3c60dccf
username=‘rXXXXin’
password=‘pXXXXX1’
r = requests.get(url, auth=(username, password))
mydict = r.json()

mydict[‘actions’][‘setVariableActions’]=[ {
“description” : ‘null’,
“exitCodes” : ‘null’,
“notificationOption” : “Operation Failure”,
“notifyOnEarlyFinish” : ‘false’,
“notifyOnLateFinish” : ‘false’,
“notifyOnLateStart” : ‘false’,
“status” : “Failed”,
“variableName” : “jobname”,
“variableScope” : “Global”,
“variableValue” : “${_varsubstring(‘ops_task_name’,7)}”
}

I am expecting output like this:

“actions” : {
“abortActions” : ,
“emailNotifications” : ,
“setVariableActions” : [ {
“description” : null,
“exitCodes” : null,
“notificationOption” : “Operation Failure”,
“notifyOnEarlyFinish” : false,
“notifyOnLateFinish” : false,
“notifyOnLateStart” : false,
“status” : “Failed”,
“variableName” : “starttime”,
“variableScope” : “Global”,
“variableValue” : “${ops_start_time}”
},

Thanks in advance.