I need to use:
JSON.stringify()
which should be supported by Chrome, Safari, and Firefox. I think IE8 also has support for the JSON object.
If you try JSON.stringify() using IE 8 you need to ensure it is not working in compatibility mode. See JSON object undefined in Internet Explorer 8
You'll need to add
to your page