My existing Json looks like this:
def json_req = "{\"date\":\"Tue, 06 Oct 2015 09:10:52 GMT\",\"nonce\":\"6cm7PmwDOKs\",\"devId\":\"<value>\",\"appId\":\"<value>\"}
Perform the operation, I can get the field sig
with the value. I need to add this extra field with a value as shown below:
"sig":"<value>"
So the new json looks like this:
def json_req = "{\"date\":\"Tue, 06 Oct 2015 09:10:52 GMT\",\"nonce\":\"6cm7PmwDOKs\",\"devId\":\"<value>\",\"appId\":\"<value>\",\"sig\":\"<value>\"}"
Inside the same script, can this new parameter be added with a value in json?
source
share