Hi i have a problem becouse my json isn\'t display as formatted json.
in my web page i have a tag, it cointains json string:
JSON.stringify
takes an object, but you are passing it a string. To use this approach, you would need to turn your string into an object then back into a string:
http://jsfiddle.net/yEez8/
var jsonStr = $("pre").text();
var jsonObj = JSON.parse(jsonStr);
var jsonPretty = JSON.stringify(jsonObj, null, '\t');
$("pre").text(jsonPretty);