I have configured WCF service to work with the JSON.
I have a problem that all entries are escaped.
[
{
"rel":"http:\/\/localhost:3354\/customer\/1\/order",
"uri":"http:\/\/localhost:3354\/customer\/1\/order\/3"
},
{
"rel":"http:\/\/localhost:3354\/customer\/1\/order",
"uri":"http:\/\/localhost:3354\/customer\/1\/order\/5"
},
{
"rel":"http:\/\/localhost:3354\/customer\/1\/order",
"uri":"http:\/\/localhost:3354\/customer\/1\/order\/8"
}
]
I am sure that message is valid, no need to escape it by default, is it possible to turn off escaping for some fields?
‘\’ is a control character in JSON. In order to include \ in a string you must escape it with the / character. Any JSON client should be able to correctly interpret the escaped characters so you don’t need to (rather you MUST NOT) make any modifications to your WCF code.
Besides, Pradeep is right. URLs use forward slashes.