I am sending a JSON request to a server and need to access a time-stamp so it dynamically changes based on another time variable. I am using requests to send a post request with the JSON as a .txt file.
My JSON is here. I would like to be able to access the dateAndTime field so that I can use the current time to send my query. The json is consumed by the server as data2 =jsonpickle.encode(jsonpickle.decode(f2.read()) )
f2
is the json file.
Here is my post request that I would ultimately have this changed;
dateAndTime
parameter in r2 = requests.post(url2, data=data2, headers=headers2,timeout=(connect_timeout, 10))
{ "RequestSpecificDetail": { "ParentSRNumberForLink": "" }, "MetaData": { "appVersion": "1.34", "deviceModel": "x86_64", "dateAndTime": "01/15/2015 12:46:36", "deviceToken": "A2C1DD9D-D17D-4031-BA3E-977C250BFD58", "osVersion": "8.1" }, "SRData": { "SRNumber": "1-3580171" } }