title: How to globally set default options for System.Text.Json.JsonSerializer?
body: <p>Instead of this:</p>
  <pre class="lang-cs prettyprint-override"><code>JsonSerializerOptions options = new JsonSerializerOptions
  {
      PropertyNamingPolicy = JsonNamingPolicy.CamelCase
      // etc.
  };
  var so = JsonSerializer.Deserialize&lt;SomeObject&gt;(someJsonString, options);
  </code></pre>
  <p>I would like to do something like this:</p>
  <pre class="lang-cs prettyprint-override"><code>// This property is a pleasant fiction
  JsonSerializer.DefaultSettings = new JsonSerializerOptions
  {
      PropertyNamingPolicy = JsonNamingPolicy.CamelCase
      // etc.
  };
  
  // This uses my options
  var soA = JsonSerializer.Deserialize&lt;SomeObject&gt;(someJsonString); 
  
  // And somewhere else in the same codebase...
  // This also uses my options
  var soB = JsonSerializer.Deserialize&lt;SomeOtherObject&gt;(someOtherJsonString); 
  
  </code></pre>
  <p>The hope is to not have to pass an instance of <code>JsonSerializerOptions</code> for our most common cases, and override for the  exception, not the rule.</p>
  <p>As indicated in <a href="https://stackoverflow.com/questions/21815759/set-default-global-json-serializer-settings">this q &amp; a</a>, this is a useful feature of Json.Net. I looked in <a href="https://docs.microsoft.com/en-us/dotnet/api/system.text.json.jsonserializer?view=netcore-3.0" rel="noreferrer">the documentation</a> for <code>System.Text.Json</code> as well as <a href="https://github.com/dotnet/core" rel="noreferrer">this GitHub repo</a> for .NET Core.  And <a href="https://github.com/dotnet/corefx/tree/master/src/System.Text.Json/src/System/Text/Json" rel="noreferrer">this one</a>.</p>
  <p>There doesn't seem to be an analog for managing JSON serialization defaults in .NET Core 3.  Or am I overlooking it?</p>
  <hr />
  <ul>
  <li><p><strong>UPDATE [2020-07-18]:</strong> <em>See <a href="https://stackoverflow.com/a/59457858/1011722">this answer</a> for a <strong><a href="https://www.nuget.org/packages/Fetchgoods.Text.Json.Extensions/" rel="noreferrer">nuget package</a></strong> with convenience methods that honor default settings.</em></p>
  </li>
  <li><p><strong>UPDATE [2019-12-23]:</strong> <em>Due in part to vocal <a href="https://github.com/dotnet/runtime/issues/31094" rel="noreferrer">community input</a> this issue has been <a href="https://stackoverflow.com/a/59457858/1011722">added to the roadmap</a> for .NET 5.0.</em></p>
  </li>
  <li><p><strong>UPDATE [2019-10-10]:</strong> <em>If interested in seeing this behavior implemented for <em><strong><code>System.Text.Json.JsonSerializer</code></strong></em> head on over to <strong><a href="https://github.com/dotnet/runtime/issues/31094" rel="noreferrer">the open GitHub issue</a></strong> pointed out by <a href="https://stackoverflow.com/a/58331570/1011722">Chris Yungmann</a> and weigh in.</em></p>
  </li>
  </ul>