Pass json data with double quotes

Hi ,

i want to post data with body quoted in “” instead of ’ using http activity .Also i wanted to append array of key value to pairs and post data again.How can i do that

json data:
{
id:123
name:xxx
}

expected outcome after adding data:
{
id:123
name:xxx
personal
[{
“key”: “DOB”,
“value”: “18”
}]
}

Hi
Would you like to replace the single quotes with double quotes
If so read Json file with READ TEXT FILE activity and get the output with a variable of type string named strinput
Now use a assign activity
strinput = strinput.ToString.Replace(“‘“.”””)

Kindly correctly if I m wrong with your requirement
Cheers @ranjani

no ,the problem is ,we were able to put json data in http activity body only in single quotes.But sending data gets failed.But i need to send the data in double quotes as received from source

If possible can I see that error
@ranjani

the error is 409 response on querying.sorry that contains client sensitive data.But how can i pass the actual json data in body property of http activity

Hello Phoenix,
Check out this very fast simple VB.NET that create JSON in 1 line:
startUiPathFromSalesforce/CreateJSON.txt at master · cristinegulescu/startUiPathFromSalesforce · GitHub
And the movie for demo:

Thanks,
Cristian

Your JSON format isn’t correct. You’re missing commas separating id, name etc. You also need quotes around the name value etc.

Anyway, anywhere you need it to be one double quote, type two…

{
id:123
name:xxx
personal
[{
“key”: “DOB”,
“value”: “18”
}]
}

Becomes…

“{id:123,name:”“xxx”“,personal:[{”“key”“:”“DOB”“,”“value”": ““18"”}]}”