title: Newtonsoft json converter - Cannot serialize an all attributes of an overridden class
body: <p>I wrote a little example that explains my problem.</p>
  
  <p>I have main class: <code>MainClass</code></p>
  
  <pre><code>public class MainClass
  {
      public string ID
      {
          get;
          set;
      }
  }
  </code></pre>
  
  <p>And I have leaf class: <code>LeafClass</code></p>
  
  <pre><code>public class LeafClass : MainClass
  {
      public string ID2
      {
          get;
          set;
      }
  
      #region Constructor
      public LeafClass(MainClass oMainClass)
      {
          this.ID = oMainClass.ID;
          this.ID2 = "my 2nd ID";
      }
      #endregion
  }
  </code></pre>
  
  <p>In my main:</p>
  
  <pre><code>MainClass MC = new MainClass();
  LeafClass[] LF = {new LeafClass(MC), new LeafClass(MC)};
  JsonSerializer serializer = new JsonSerializer();
  serializer.Converters.Add(new Newtonsoft.Json.Converters.StringEnumConverter());
  serializer.Converters.Add(new Newtonsoft.Json.Converters.KeyValuePairConverter());
  string JsonData = JsonConvert.SerializeObject(LF, serializer.Converters.ToArray());
  </code></pre>
  
  <p>I don't have my ID2 in my Json, I have only the base attributes. Any idea how to make it work?</p>