json格式化输出

JSON.stringify(jsObj, null, "\t"); // 缩进一个tab
JSON.stringify(jsObj, null, 4);    // 缩进4个空格

 

还有这个console.dir();能够输出对象的解析格式

posted @ 2017-07-10 11:34  晨光暖日  阅读(154)  评论(0编辑  收藏  举报