title: dynamically change the json property name and serialize
body: <p>i want to change the json property name dynamically and serialize the object.</p>
  
  <p>here is my json for two different entities </p>
  
  <p><em>For customer</em></p>
  
  <pre><code>{
    "userName": "66666",
    "password": "test1234",  
    "customersList": [
      {
        "address": "Test Stree2",
        "customerNumber": "US01-000281",
        "city": ""
  
      }
    ]
  }
  </code></pre>
  
  <p><em>For contact</em></p>
  
  <pre><code>{
    "userName": "66666",
    "password": "test1234",  
    "contactList": [
      {
        "address": "Test stree1",
        "contactNumber": "US01-000281",
        "city": ""
  
      }
    ]
  }
  </code></pre>
  
  <p>and the model that is holding this data is as follows </p>
  
  <pre><code>public class URequest&lt;T&gt;
      {
  
          [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
          public string userName { get; set; }
  
          [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
          public string password { get; set; }    
  
         [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
          public IList&lt;T&gt; requestList { get; set; }
  
      }
  </code></pre>
  
  <p>in above code <code>requestList</code> could contain list of <code>contacts</code> or <code>customer</code> but while sending i want to change the <code>requestList</code> json property name to respective entity name i.e. for <code>customer</code> it will be <code>customerList</code> and for <code>contact</code> it will be <code>contactList</code> after serializing.</p>