Hi All,
Currently Iam facing some issue while creating the JSON body.
I have Deserialize the JSON and converted to string to give it in HTTPRequest Body to call API for POST Method
When I saw the normal execution there is no double quotes present after converting to string and replaced the newline characters, but when I see the execution in debug mode an extra double quote is visible.
I was hoping because of this issue, API is throwing the error({ “httpCode”:“400”, “httpMessage”:“Bad Request”, “moreInformation”:“The body of the request, which was expected to be JSON, was invalid, and could not be decoded. The start of an object { or an array [ was expected.” })*
Can anyone help on this for creating the JSON
Below is JSON string which I have used for deserialize JSON.
“{ ‘comments’: ‘test update without correlation id’,‘work_notes’: 'updated without correlation id }”
once done I have converted to string jsonStr.ToString.Replace(Environment.NewLine(),“”) -so that new \r\n characters will be removed
now when I give the result variable in the body it is throwing error
attached screenshot showing the json in debug mode where it is showing with extra double quote and without extra double quote.
Any help in this would be appreciated