Contributions
Re: REST - JSON request
Thanks for replying back. I have been trying to think how this would work for me. I am a newbie on rest. I couldn't figure out how to do the following steps. 1. I have uploaded JSON.jpg. I don't want to define the whole string on the script. I know you have said that you can pull that out from anywhere. how do I slurp out from the JSON (REST) message request( i have uploaded Json.jpg file). 2. Now, you mentioned that serialize back to json. Once that is done. How do I send it to testRunner to use serialize object and send to testRunner. I normally do this statement: testRunner.runTestStepByName("JSON");2KViews0likes1CommentRe: REST - JSON request
Thanks for the input. When you say Sample1 do you mean an input file or a REST (POST message ) like something shown below. As I do need to pull out data from the Excel data sheet. { "Transfer": { "Service": "${#Project#service}", "Instruct": { "Account": { "Number": "${#Project#Number}", "Type": "", "Prod": "${#Project#Prod}" } } } }2.1KViews0likes3CommentsREST - JSON request
Here'sa sample JSON request: Sample1 comes with an attribute Type and it's empty. Is it possibleif the attribute is empty. Can this be removed like the output on sample2. I tried to use the remove empty content and set it true which I usually did on XML. However, it seems like this does not apply do JSON request message. I am not sure if there's a way around this. Sample 1: "Transfer" : { "Service" : "Mix", "Instruct" : { "Account" : { "Number" : "xx8172121", "Type" : "", "Prod": "NEW" } } } Sample 2: "Transfer" : { "Service" : "Mix", "Instrucy" : { "Account" : { "Number" : "xx8172121", "Prod": "NEW" } } }2.1KViews0likes5Comments