title: JsonOutputFormatter in ASP.NET Core 3.0
body: <p>In asp.net core 2.2 I used to have the following,</p>
  
  <pre><code>  var jsonSettings = new JsonSerializerSettings
    {
      ContractResolver = new SubstituteNullWithEmptyStringContractResolver()
    };
  
  services.AddMvc(options =&gt;
  {
          options.OutputFormatters.RemoveType&lt;JsonOutputFormatter&gt;();
          options.OutputFormatters.Add(new ResponseJsonOutputFormatter(jsonSettings,ArrayPool&lt;char&gt;.Shared));
  }
  
  public class ResponseJsonOutputFormatter : JsonOutputFormatter
  {
   // Stuff in here
  }
  </code></pre>
  
  <p>However in 3.0 using:</p>
  
  <pre><code>services.AddControllersWithViews(options =&gt;
  </code></pre>
  
  <p>and the type <code>JsonOutputFormatter</code> is no longer available. </p>
  
  <p>What is the current suggested way of customizing a json response globally? </p>
  
  <p>I tried using <code>IOutputFormatter</code> but it doesn't seem to be wired in when I set it within <code>AddControllersWithViews</code> as an OutputFormatters so not sure if there are extra steps? </p>
  
  <p>Would middleware with the new endpoint routing be an option? Or is there a better way of achieving this? </p>