node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey »



Highlight your JSON with HTML markup

npm install markupify

Markupify will take a JSON document and add markup to it so it can be styled in a browser.

var markupify = require('markupify');
var html = markupify({hello:'world'});

The above example will print the following HTML

<div class="markupify">{
    <span class="key">hello:</span> <span class="string">"world"</span>

Afterwards you can use css to style your output to your liking. A stylesheet similar to JSON view is included in style.css