title: Parse date with Angular 4.3 HttpClient
body: <p>I'm currently switching to the new HttpClient of Angular 4.3. One advantage is that I can specify a type info on the GET method and that the returned JSON is parsed into the given type, e.g.</p>
  
  <pre><code>this.http.get&lt;Person&gt; (url).subscribe(...)
  </code></pre>
  
  <p>But unfortunately, all dates in the JSON are parsed as numbers in the resulting object (probably because the Java Date objects are serialized as numbers in the backend).</p>
  
  <p>With the old Http I used a reviver function when calling JSON.parse() like this:</p>
  
  <pre><code>this.http.get(url)
    .map(response =&gt; JSON.parse(response.text(), this.reviver))
  </code></pre>
  
  <p>and in the reviver function I created date objects from the numbers:</p>
  
  <pre><code>reviver (key, value): any {
    if (value !== null &amp;&amp; (key === 'created' || key === 'modified'))
      return new Date(value);
  
    return value;
  }
  </code></pre>
  
  <p>Is there a similar mechanism with the new HttpClient? Or what is the best practice to do conversion when the JSON is parsed?</p>