Not able to from proper JSON Body using variables

Hi All,

Can anyone help with the below?

I am trying to pass JSON body via HTTP POST Method.

This is my below body

“{”“Name”": “”" &Variable &"""}"

I have done sample testing by assigning hardcode values and it worked fine.
Now the same body is throwing an exception and this is the output for the above body passed.

Body:- “{”“Name”": “”" &Variable &"""}"
O/P:- {“Name”: "Esmat Younes
The JSON is not coming in a single line thus resulting in the below error. I wanted it pass it somewhat like {“Name”: “Esmat Younes”} instead of the above

Can anyone help @Forum_Staff


Hi @Pavan_Srikar

Can u try this

“{”“Name”": “”"+NAME1.ToString.Trim +""","“AccountNo”": “”" +ACCOUNTNU1.Trim +"""}"



Nived N
Happy Automation :relaxed::relaxed::relaxed:

1 Like

Hi @NIVED_NAMBIAR thanks for the reply

Tried the above one but still getting 500 error.

JSON body is forming like

{“Name”: "Esmat Younes
",“Colour”: "White

I just edited my answer

Can u check that

1 Like

@NIVED_NAMBIAR Really thank you so much for the help worked fine for now. trying to find this solution for a long time.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.