wcf forces chars escaping in response
I don't exactly know if this helps, but I had a somewhat similar issue, where I needed to pass-through a JSON response from another service.
Since WCF apparently escapes quotes and other characters, which obviously was unwanted behavior in my case, I needed to simply ignore any help from WCF.
What I did was change my response type to System.ServiceModel.Channels.Message
and then create a plain text message with System.ServiceModel.Web.WebOperationContext.Current.CreateTextResponse(responseText)
That did the trick! My message is now not interpreted by WCF, and my JSON response is unaltered.
More information here: http://msdn.microsoft.com/en-us/library/system.servicemodel.web.weboperationcontext.aspx
精彩评论