title: Limit JSON stringification depth
body: <p>When stringifying an object using <code>JSON.stringify</code> (or something similar) is there a way to limit the stringification depth, i.e. only go <em>n</em> levels deep into the object tree and ignore everything that comes after that (or better: put placeholders in there, indicating something was left out)? </p>
  
  <p>I know that <code>JSON.stringify</code> takes a replacer function of the form <code>function (key, value)</code> but I didn't find a way to get the depth in the original object of the current key-value-pair handed to the replacer function.</p>
  
  <p>Is there a way to do this with the default JSON.stringify implementation? Or have I reached a point where I should just implement the stringification myself?
  Or is there another stringification library you can recommend that has this option?</p>