1

We host a WCF RESTful service. There is one service that is of verb POST, and it is possible to pass in double quotes as part of the message. This is causing issues. I tried the standard back slash to escape it, but that didn't work. Any suggestions? Here is the request body:

{"GardenWidth":"16' 7"","GardenLength":"62", "GardenStyle":"General","PostalCode":"12345",}
Al Lelopath
  • 6,448
  • 13
  • 82
  • 139
BriceTRockindale
  • 309
  • 1
  • 4
  • 15

1 Answers1

1

Try removing the comma after "12345":

{
    "GardenWidth": "16' 7\"",
    "GardenLength": "62",
    "GardenStyle": "General",
    "PostalCode": "12345"
}
  • No, that's not it. The problem is with the 16' 7". If I remove the 7", then it works fine. Also, like I said in my question, I tried to backslash the double quote, and that didn't work. Thanks for the input, I do appreciate it. – BriceTRockindale Apr 15 '15 at 02:06
  • In that case, try replacing 7" with `7"` – gregljohnson Apr 15 '15 at 02:34
  • For more clarification, it is likely an encoding issue on the HTML side that is preventing it from seeing the escape character properly. The issue is explained in [this post](http://stackoverflow.com/a/2004178/2675888). – gregljohnson Apr 15 '15 at 02:45