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.
In January, Qualcomm hinted to The Verge that it might finally bring its powerful Arm-based…
Students are seen on the campus of Columbia University on April 14, 2025, in New…
If you’ve been waiting to grab any video games, today might be the day. On…
I first took notice of Samson: A Tyndalston Story when its team of former Just…
Stardew Valley creator Eric Barone (ConcernedApe) has released a 10th anniversary video revealing, among other…
Highguard studio Wildlight Entertainment reportedly has less than 20 people remaining to work on the…
This website uses cookies.