title: Overriding JSON.stringify causing error
body: <p>I just created a function that return JSON.stringify like this:</p>
  
  <pre><code>JSON.stringify = function (item, replacer, space) {
       return JSON.stringify(item, replacer, space);
  }
  </code></pre>
  
  <p>and it causes all these errors on angularjs:
  <a href="https://i.stack.imgur.com/qmSoy.jpg" rel="nofollow noreferrer">click here</a></p>
  
  <p>The reason I want to override the function is because I want to create a property in objects that tells the JSON to ignore a field, like this:</p>
  
  <pre><code>JSON.stringify = function (item, replacer, space) {
      if (angular.isObject(item)) {
          var newItem = angular.copy(item);
          var ignores = item.jsonIgnore || [];
  
          ignores.forEach(prop =&gt; {
              delete newItem[prop];
          });
  
          return JSON.stringify(newItem, replacer, space);
      }
  
      return JSON.stringify(item, replacer, space);
  }
  </code></pre>