title: Convert object to json in angular 7
body: <p>I'm trying to convert an object to json using:</p>
  
  <pre><code>object.json();
  </code></pre>
  
  <p>I'm getting the following error:</p>
  
  <pre><code>core.js:15713 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'json' of undefined TypeError: Cannot read property 'json' of undefined
  </code></pre>
  
  <p>I think it's some change from the new version. Version 7</p>
  
  <p>Can somebody help me?</p>