title: WebMethod return values in JSON format
body: <p>How to return values from Webmethod to the client in JSON format?  </p>
  
  <p>There are two static int values that i want to return.<br>
  Do I need to create new object with those 2 properties and return it?<br>
  The GetStatus() method is called frequently and i don't like the idea of creating a special object each time just for json formatting...</p>
  
  <pre><code>[WebMethod]
  public static int GetStatus()
  {
      int statusProcess,statusProcessTotal;
  
      Status.Lock.EnterReadLock();
      statusProcess=Status.Process; //Static field
      statusProcessTotal=Status.ProcessTotal; //Static field        
      Status.Lock.ExitReadLock();
  
      return ...
  }
  </code></pre>
  
  <p>On client side I catch the return value in :  </p>
  
  <pre><code>function OnSucceeded(result, userContext, methodName)   
  (PageMethods.GetStatus(OnSucceeded, OnFailed);)
  </code></pre>