title: Ignore properties of class when using WCF ResponseFormat = WebMessageFormat.Json
body: <p>I'm using WCF for JSON services using this format:</p>
  
  <pre><code>[OperationContract]
  [ServiceKnownType(typeof(ComplexResult))]
  [WebInvoke(
              Method = "GET",
              BodyStyle = WebMessageBodyStyle.Bare,
              ResponseFormat = WebMessageFormat.Json)]
  MyClass MyFunction(string myParams);
  </code></pre>
  
  <p>This works great, however it has a limitation. I can't ignore properties of my class that I'm serializing to JSON. If I use the JavaScriptSerializer class then I can put [ScriptIgnore] attributes on the properties I want to ignore and they won't be serialized in the JSON, however this does not work with the method above.</p>
  
  <p>Is there a way to exclude properties of the classes getting serialized to JSON using the ResponseFormat Json method?</p>