How to pass json in the body of the https request

Hi Team,

I want to pass the below json into the body of the https post request, i am getting end of epression error or string should be in double quotes.

{
“sysparm_quantity”: 1,
“sysparm_requested_for”: “xxx”,
“variables”: {
“type”: “xxxxx”,
“location”: “xxxxx”,
“description”: “xxxx”,
“common_ReqBy”: “xxxxx”,
“common_ReqFor”: “xxxxx”
}
}

Below is the string i am passing into the body

“{”“sysparm_quantity”“:”“1"”,““sysparm_requested_for””:“”“+in_RequestedforID+”“”, ““variables””:{““type””:“”“+in_MaitenanceType+”“”,““location””:“”“+in_strLocation+”“”, ““description””:“”“+in_Description+”“”,““common_ReqBy””:“”“+in_RequestedbyID+”“”, ““common_ReqFor””:“”“+in_RequestedforID+”“”}}"

Try this.

“{”“sysparm_quantity”“:1,”“sysparm_requested_for”“:”“” + in_RequestedforID + “”“, ““variables””:{”“type”“:”“” + in_MaitenanceType + “”“,”“location”“:”“” + in_strLocation + “”“, ““description””:”“” + in_Description + “”“,”“common_ReqBy”“:”“” + in_RequestedbyID + “”“, ““common_ReqFor””:”“” + in_RequestedforID + “”“}}”

@Madhups,

You should be replacing Single " with “” and this will work.

Thanks,
Ashok :slight_smile:

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