JSON.Stringify with intendation
This question already has an answer here:
JSON.stringify
function takes 3 parameters. The third one defines how many spaces will be inserted for indentation. So that you can use it:
JSON.stringify({a: 'avalue', b: 'bvalue'}, null, 2);
链接地址: http://www.djcxy.com/p/48196.html
上一篇: 如何以编程方式美化JSON?