x
 
<!DOCTYPE html>
<html>
<body>
<h1>使用 <em>space</em> 参数</h1>
<p>为每个空格插入单词 “SPACE”:</p>
<pre id="demo"></pre>
<script>
var obj = { "name":"Bill", "age":"19", "city":"Seattle"};
var text = JSON.stringify(obj, null, "SPACE");
document.getElementById("demo").innerHTML = text; 
</script>
</body>
</html>