JSON data with colored syntax – pretty-print-json
|Format JSON data with colored syntax using pretty-print-json library.
JavaScript library to pretty-print for JSON data with colored syntax
An interesting tool for processing and formatting JSON as colored syntax. Pass data into prettyPrintJson.toHtml() and display the results.

Setup
npm install pretty-print-json
Sample
HTML
<pre id="account"></pre>
JS
const prettyPrintJson = require('pretty-print-json'); const data = { active: true, codes: [48348, 28923, 39080], city: 'London' }; $('#account').html(prettyPrintJson.toHtml(data));
License: MIT
Homepage
https://pretty-print-json.js.org
GitHub
https://github.com/center-key/pretty-print-json
See also
Enjoy!