JSON.stringify output to div in pretty print way

后端 未结 12 2398
野趣味
野趣味 2020-11-29 18:17

I JSON.stringify a json object by

result = JSON.stringify(message, my_json, 2)

The 2 in the argument above is su

12条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-29 18:21

    Full disclosure I am the author of this package but another way to output JSON or JavaScript objects in a readable way complete with being able skip parts, collapse them, etc. is nodedump, https://github.com/ragamufin/nodedump

提交回复
热议问题