title: Prevent JQuery AJAX call from returning ALL class properties
body: <p>I have written a web service which can be called from a javascript.  It's all working fine but i notice that more properties are being returned than i expected...</p>
  
  <p>url:
  <a href="http://localhost/intranet/Contacts.asmx/ContactsDirectory" rel="nofollow noreferrer">http://localhost/intranet/Contacts.asmx/ContactsDirectory</a></p>
  
  <p>In short, it reads the employees from a database and adds them to a list.  Note that i am only adding 5 of the 13 properties available:</p>
  
  <pre><code>    foreach (DataRow row in ResultsDataTable.Rows)
      {
          var Employee = new Employees();
          Employee.Firstname = row["FIRSTNAME"].ToString();
          Employee.Surname = row["SURNAME"].ToString();
          Employee.PostTitle = row["POST"].ToString();
          Employee.Department = row["DEPTARTMENT"].ToString();
          Employee.Email = row["EMAIL"].ToString();
          employees.Add(Employee);
      }
  </code></pre>
  
  <p>My Employees class with the 13 properties:</p>
  
  <pre><code>public class Employees
  {
      public string PersonRef;
      public string Firstname;
      public string Surname;
      public string PrefName;
      public string Telephone;
      public string PostRef;
      public string PostTitle;
      public string Department;
      public string Section;
      public string Location;
      public string Email;
      public string Manager;
      public string ManagersEmail;
  }
  </code></pre>
  
  <p>My AJAX request:</p>
  
  <pre><code>xhr = $.ajax({
      type: 'POST',
      url: './intranet/Contacts.asmx/ContactsDirectory',
      data: JSON.stringify({ Name: "Scott" }),
      contentType: 'application/json; charset=utf-8',
      dataType: 'json'
  });
  </code></pre>
  
  <p>You can see from the response below that the Properties Manager and ManagersEmail are being returned, but they weren't in my list!  How do i prevent this? 
  Note: i can't remove any of the properties from my class as other web services use these properties.</p>
  
  <p><a href="https://i.stack.imgur.com/3DSPu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3DSPu.png" alt="enter image description here"></a></p>