title: WCF - Rest and JSON Operation Parameters
body: <p>I'm implementing a generic restful api in WCF. I require access to a generic object deserialized from JSON (as a parameter to a POST operation). I'm using the raw programming model to permit fine-grained control of the return format. For example:</p>
  
  <pre><code>// Create
  [OperationContract(Name = "CreateJSON")]
  [WebInvoke(UriTemplate = "{endpointName}", Method = "POST", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
  Stream Create(Object input, String endpointName);
  </code></pre>
  
  <p>In the above example the generic object is given by the parameter 'input' that I expect to be the POST payload. An analogous call works fine with an endpoint targeted for xml, but not JSON.</p>
  
  <p>Any ideas/assistance would be greatly appreciated. Anyone?</p>