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.
精彩评论