title: How to returning WCF Service POST response as JSON
body: <p>i have created WCF Service with POST request.</p>
  <pre><code> [OperationContract]
          [WebInvoke(Method = &quot;POST&quot;,
           ResponseFormat = WebMessageFormat.Json,
           RequestFormat = WebMessageFormat.Json,
           //  BodyStyle = WebMessageBodyStyle.Wrapped,
           UriTemplate = &quot;/UpdateRCFOnline&quot;
           )]
          String UpdateRCFOnline(RCFOnline rcf_class);
  
    public string UpdateRCFOnline(RCFOnline rcf_class)
      {
          string success = string.empty;
                  
          try
          {
              //POST data to DB
              success = &quot;Update Success&quot;;
          } catch(Exception ex){
              success = &quot;Update Failed, &quot; +ex.message;
          }
          
      return success;
      
      }
  </code></pre>
  <p>How to make this POST request returning &quot;Success&quot; as JSON. Cause if i tried this service in Fiddler. I got message on &quot;Raw&quot; tab not JSON.</p>
  <p><a href="https://i.stack.imgur.com/5CvrJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5CvrJ.png" alt="enter image description here" /></a></p>