title: c# JSON SerializeObject with Custom List
body: <p>I have an JSON Object like this:</p>
  
  <pre><code>    public class RootObject
  {
      public string Number { get; set; }
      public string ChannelType { get; set; }
      public string ServiceName { get; set; }
      public List&lt;ImageInfos&gt; ImageInfos { get; set; }
      public bool IsInMixedFolder { get; set; }
      public string Name { get; set; }
      public string Id { get; set; }
      public string DateCreated { get; set; }
      public string DateModified { get; set; }
      public string DateLastSaved { get; set; }
      public List&lt;object&gt; LockedFields { get; set; }
      public string ParentId { get; set; }
      public List&lt;string&gt; Studios { get; set; }
      public List&lt;string&gt; Genres { get; set; }
      public ProviderIds ProviderIds { get; set; }
  }
  </code></pre>
  
  <p>With ImageInfos like this:</p>
  
  <pre><code>    public class ImageInfos
  {
      private string Path;
      private string Type;
      private string DateModified;
  
      public ImageInfos(string Path, string Type, string DateModified)
      {
          this.Path = Path;
          this.Type = Type;
          this.DateModified = DateModified;
      }
  </code></pre>
  
  <p>I am trying to fill the json ImageInfos-List with values and serialize it to a new string:</p>
  
  <pre><code>            jsonObject = JsonConvert.DeserializeObject&lt;RootObject&gt;(json);
  
              List&lt;ImageInfos&gt; newInfos = new List&lt;ImageInfos&gt;();
              newInfos.Add(new ImageInfos("Test", "Test", "Test"));
              jsonObject.ImageInfos = newInfos;
              string newJSON = JsonConvert.SerializeObject(jsonObject);
  </code></pre>
  
  <p>But the new json looks like that:</p>
  
  <blockquote>
    <p>"{\"Number\":\"35\",\"ChannelType\":\"TV\",\"ServiceName\":\"DVBLink\",\"ImageInfos\":[{}],\"IsInMixedFolder\":false,\"Name\":\"13th Street HD\",\"Id\":\"466ab1fb9be4f77e65ad2b229a15c326\",\"DateCreated\":\"2015-09-14T12:55:51.4081476Z\",\"DateModified\":\"0001-01-01T00:00:00.0000000Z\",\"DateLastSaved\":\"2015-10-17T13:34:37.4214116Z\",\"LockedFields\":[],\"ParentId\":\"00000000000000000000000000000000\",\"Studios\":[],\"Genres\":[],\"ProviderIds\":{\"ProviderExternalId\":\"13250000\"}}"</p>
  </blockquote>
  
  <p>Why is ImageInfos empty in the new JSON string ?</p>