title: How can i configure JSON format indents in ASP.NET Core Web API
body: <p>How can i configure ASP.NET Core Web Api controller to return pretty formatted json for <code>Development</code> enviroment only?</p>
  
  <p>By default it returns something like:</p>
  
  <pre><code>{"id":1,"code":"4315"}
  </code></pre>
  
  <p>I would like to have indents in the response for readability:</p>
  
  <pre><code>{
      "id": 1,
      "code": "4315"
  }
  </code></pre>