title: .NET Core Newtonsoft JSON - Serialize decimal without trailing zeros
body: <p>How to remove trailing zeros while serialization in Newtonsoft.Json?</p>
  <p>.NET Core 3.1</p>
  <p>Newtonsoft.Json 12.0.3</p>
  <p>Global options:</p>
  <pre><code>.AddNewtonsoftJson(options =&gt;
  {
      // Response as PascalCase instead of default camelCase
      options.SerializerSettings.ContractResolver = new DefaultContractResolver();
  })
  </code></pre>
  <p>Input is just default DTO (<code>MyDecimalProperty</code> is just decimal):</p>
  <pre><code>var data = new MyDTO();
  </code></pre>
  <p>Output from <code>JsonConvert.SerializeObject(data)</code>:</p>
  <p><code>&quot;MyDecimalProperty&quot;:0.0</code></p>
  <p><strong>Expected output:</strong></p>
  <p><code>&quot;MyDecimalProperty&quot;:0</code></p>