Passing the Input request while Calling POST method

0
I have created a POST REST call, in which I am trying to pass my Input request  as like enclosed inside a bracket eg:{{“name”:”ABC”,” number”:”123”}} Still i am getting the error: 500: Internal Server Error ThrowAn error occurred while converting json to xml:  Parsing error!Msg[Invalid JSON ]  
asked
2 answers
1

It looks like the error message is correct: what you've posted here is not a valid JSON. Are you using an export mapping for your JSON or just building up the string manually? 

This would be a valid JSON with the info you just posted here:

   {
      "name":"ABC",
      "number":123
   }

Edit: you edited your post after I posted this answer so it's no longer valid. The original post was missing quotes in the JSON message.

answered
1

I read that you used an export mapping, and it worked.

The template would have worked too, if you would have removed the last }

So the correct template would have been

{{
    "name": "Josesph",
    "q": "12345"
}

Because it’s a template, you need to escape { with {{. You don’t need to escape }.

answered