Alternatives of JSON.stringify() in JavaScript

You should use the library json2.js. It is the basis for the standard JSON.stringify(...) that some browsers include natively.

You can find the page it originated from here:

The script automatically makes sure it only adds a JSON.stringify(...) method if it doesn’t already exist so there is no danger including it in a browser that has it.

Leave a Comment