Performant Large JSON Viewer In Vanilla JavaScript
Install the Big JSON Viewer.
# NPM $ npm install big-json-viewer --save
Import the module.
import { BigJsonViewerDom, BigJsonViewerOptions } from 'big-json-viewer'; Render the JSON data you provide as follows:
BigJsonViewerDom.fromData(JSON.stringify({
test: 23,
someArray: [45, 2, 5, true, false, null]
})).then(viewer => {
const node = viewer.getRootElement();
document.body.appendChild(node);
node.openAll(1);
}); Possible options to customize the JSON viewer.
{
// the maximum number of nodes
objectNodesLimit: 50,
arrayNodesLimit: 50,
// if true the label for every node will show the full path to the element
labelAsPath: false,
workerPath: null,
collapseSameValue: 5,
showExtendedJson: false,
maxStringPreviewLength: 250,
} v0.2.2 (12/01/2025)
v0.1.7 (03/23/2019)
v0.1.6 (01/16/2019)
v0.1.5 (01/15/2019)
The post Performant Large JSON Viewer In Vanilla JavaScript appeared first on CSS Script.
Anthropic is expanding Claude Cowork Desktop with a new Projects feature designed to keep files,…
FORT WAYNE, Ind. (AP) — A 63 year old Ossian woman has been sentenced to…
Crimson Desert just launched yesterday to a bit of a chaotic and mixed reception from…
One of the better regarded 3D printers with multi-color print capability is now priced well…
Spring is officially here, and that means we’re in for tons of spring sales events…
This website uses cookies.