title: .NET Core: Remove null fields from API JSON response
body: <p>On a global level in .NET Core 1.0 (all API responses), how can I configure Startup.cs so that null fields are removed/ignored in JSON responses?</p>
  
  <p>Using Newtonsoft.Json, you can apply the following attribute to a property, but I'd like to avoid having to add it to every single one:</p>
  
  <pre><code>[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
  public string FieldName { get; set; }
  [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
  public string OtherName { get; set; }
  </code></pre>