title: Nightmare issue with Angular and WebApi2.2 JSON parse
body: <p>That's what the problem is:</p>
  
  <p>My WebAPI 2.2 (ASP NET) has a controller which returns from db context info about Clients. It looks like that:</p>
  
  <pre><code>public class ClientsController : ControllerBase
  { 
     [HttpGet("[action]")]
     public  IEnumerable&lt;Client&gt; GetClient()
     { 
        return _context.Client;
     }
  }
  </code></pre>
  
  <p>Clients side app (written in angular) should recive the data and display it. As long as I hard code some data in controller it works fine, but when it is _context.Client, there is an errow thrown (below) in console.</p>
  
  <p>Angular code:</p>
  
  <pre><code>  public clients: Client[];
  
    constructor(http: HttpClient, @Inject('BASE_URL') baseUrl: string) {
      http.get&lt;Client[]&gt;(baseUrl + 'api/Clients/GetClient').subscribe(result =&gt; {
        console.log(result);
        this.clients = result;
      }, error =&gt; console.error(error));
    }
  </code></pre>
  
  <p>And the error is  SyntaxError: Unexpected end of JSON input at JSON.parse () at XMLHttpRequest.l, message: Http failure during parsing for <a href="http://localhost:8080/api/Clients/GetClient" rel="nofollow noreferrer">http://localhost:8080/api/Clients/GetClient</a></p>
  
  <p>I am being suspicious about this Client[] array, anyone knows something about similar problems?</p>