pretty-print JSON using JavaScript

后端 未结 24 1717
一向
一向 2020-11-21 06:45

How can I display JSON in an easy-to-read (for human readers) format? I\'m looking primarily for indentation and whitespace, with perhaps even colors / font-styles / etc.

24条回答
  •  别跟我提以往
    2020-11-21 07:18

    I use the JSONView Chrome extension (it is as pretty as it gets :):

    Edit: added jsonreport.js

    I've also released an online stand-alone JSON pretty print viewer, jsonreport.js, that provides a human readable HTML5 report you can use to view any JSON data.

    You can read more about the format in New JavaScript HTML5 Report Format.

提交回复
热议问题