开发者

Pass to WCF string and parse it with JSON Newton

I have

var sendThisString = JSON.stringify({ 'value': jsObj });

and I have WCF

[OperationContract]
[WebInvoke(Method = "POST",
           BodyStyle = WebMessageBodyStyle.Wrapped,
           RequestFormat = WebMessageFormat.Json,
           ResponseFormat = WebMessageFormat.Json)]
 public string RowString(string rawJSON)
 {
        return "";
 }

So I did not want to use standard WCF serialisation my json string to C# object

I need to pass json string to WCF and then I will p开发者_如何学Carse it by my serialisation

I just want to see sample (client and server side) where you pass to WCF string "{'test':'test1'}" or another


I decide replace jsObj with string, or do not use wcf


If you want to use WCF to receive raw JSON (or any RAW data, for that matter), you can use the raw programming model - take a Stream as the input parameter. More information at http://blogs.msdn.com/b/carlosfigueira/archive/2008/04/17/wcf-raw-programming-model-receiving-arbitrary-data.aspx.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜