title: Change json property name in output using Json.Net
body: <p>I am trying to read a JSON file, rename the property names, and export a new JSON with the new names. As stated in this example, <a href="https://www.newtonsoft.com/json/help/html/JsonPropertyName.htm" rel="nofollow noreferrer">https://www.newtonsoft.com/json/help/html/JsonPropertyName.htm</a>, we can use JsonProperty to specify a different name internally in the code.  However, when you export the json, it returns the original name.  So in the example it still returned "release_date" instead of "ReleaseDate" when it was logged in the console.  Is there any way to do this without creating a brand new object?</p>
  
  <p>To clear things up, here is example of what I am trying to do:</p>
  
  <p>JSON Input:</p>
  
  <pre><code>{ "name": "Starcraft", "release_date": "1998-01-01T00:00:00" }
  </code></pre>
  
  <p>Object Used to deserialize the data:</p>
  
  <pre><code>public class Videogame
  {
      public string name{ get; set; }
  
      [JsonProperty("release_date")]
      public DateTime releaseDate { get; set; }
  }
  </code></pre>
  
  <p>Code that is called:</p>
  
  <pre><code>var json = JsonConvert.DeserializeObject&lt;Videogame&gt;(File.ReadAllText(path))
  Console.WriteLine(JsonConvert.SerializeObject(json));
  </code></pre>
  
  <p>Resulted Output:</p>
  
  <pre><code>{ "name": "Starcraft", "release_date": "1998-01-01T00:00:00" }
  </code></pre>
  
  <p>Desired Output:</p>
  
  <pre><code>{ "name": "Starcraft", "releaseDate": "1998-01-01T00:00:00" }
  </code></pre>
  
  <p>The only way that I currently know how to solve it is to create a new object and use it to serialize my output.  Wasn't sure if there is any simpler way to do this.</p>