window.onload = function(){ var obj = \'{ \"name\" : \"Raj\", \"age\" : 32, \"married\" : false }\'; var va
The function JSON.stringify will turn your json object into a string:
var jsonAsString = JSON.stringify(obj);
In case the browser does not implement it (IE6/IE7), use the JSON2.js script. It's safe as it uses the native implementation if it exists.