title: How to serialize a class with Newtonsoft.Json.JsonConvert.SerializeObject to change empty List to null variable
body: <p>How to serialize a class <code>with Newtonsoft.Json.JsonConvert.SerializeObject</code>  to change empty List to null variable</p>
  
  <p>my result from serialization</p>
  
  <pre><code>{"images":[]} or {"images":{}}
  </code></pre>
  
  <p>and would like to get</p>
  
  <pre><code>{"images":null}
  </code></pre>
  
  <p>my simple class</p>
  
  <pre><code>public class Images
  {
  [JsonProperty("images", Required = Required.Always, NullValueHandling = NullValueHandling.Include)]
  
     public Images()
     {
     Parameters = new Parameters(); **//  I know I could not initiate here only when I need it but I don't want to do it**
     }
  
     [JsonProperty("parameters", Required = Required.Always, NullValueHandling = NullValueHandling.Include)]
     public Parameters Parameters { get; set; }
  }
  
  public class Parameters 
  {
     [JsonProperty("id", Required = Required.AllowNull, NullValueHandling = NullValueHandling.Include)]
     public string Id { get; set; }
  }
  </code></pre>