json-stringify-safe icon indicating copy to clipboard operation
json-stringify-safe copied to clipboard

Like JSON.stringify, but doesn't throw on circular references

Results 7 json-stringify-safe issues
Sort by recently updated
recently updated
newest added

Fixes [`TypeError` when trying to stringify a `BigInt` value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#exceptions) by [stringifying `BigInt` values as strings](https://github.com/GoogleChromeLabs/jsbi/issues/30#issuecomment-521460510). Fixes https://github.com/moll/json-stringify-safe/issues/33

This breaks with any Backbone view (I assume an example of a common type of object). For example, with backbone, in Chrome, in the console: ``` js safeStringify = require('safe-json-stringify')...

* Show correct output on the example * Fix the explanation of the `decycler` callback

JSON.stringify is happy with falsey values for replacer and 0 is shorter than null

I've been trying to log some objects that are very deep, but I'm actually not interested in the full object, just the parts that are not at a too big...

The documentations says: > The first three arguments are the same as to JSON.stringify. But when I try to pass an array of strings as the second parameter, the module...