title: NET Core Ok() return json formatted as string in Angular
body: <p>From .NET Core I return object in <code>Ok()</code> in method with <code>IActionResult</code> result:</p>
  <pre><code> public async Task&lt;IActionResult&gt; UploadJsonFiles()
  {
        return Ok(new { status = &quot;Ok&quot;, message = &quot;&quot; });
  }
  </code></pre>
  <p>In Angular I have that json but it is formatted as string. I don't have object with property status and message, only string:</p>
  <pre><code>this.uploader.response.subscribe(res =&gt; {
  ..
  
  res = &quot;{&quot;status&quot;:&quot;Ok&quot;,&quot;message&quot;:&quot;&quot;}&quot;
  </code></pre>
  <p>In Startup I have set formatters for controllers:</p>
  <pre><code>services.AddControllersWithViews().AddNewtonsoftJson();
  services.AddControllers(options =&gt;
  {
      options.RespectBrowserAcceptHeader = true; // false by default
  })
  .AddJsonOptions(options =&gt;
          options.JsonSerializerOptions.PropertyNamingPolicy = null);
  </code></pre>