title: Json.NET - How to exclude properties from Serialization without access to class
body: <p>I am trying to serialize a class using <a href="http://www.newtonsoft.com/json" rel="nofollow noreferrer">Json.NET</a>. Here's what I do for the moment.</p>
  
  <pre><code>public class AClass
  {
      // I don't have access to BClass
      public BClass b;
  }
  
  AClass a = new AClass();
  JsonConvert.SerializeObject(a);
  </code></pre>
  
  <p>I don't have access to <code>BClass</code>. I want to serialize my <code>AClass</code> but I don't want to serialize all properties of <code>BClass</code>, only some of them.</p>
  
  <p>How can I do that ?<br></p>