big-json-viewer
Version:
JavaScript Library to view big JSON structures.
23 lines (21 loc) • 578 B
HTML
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JSON Viewer basic example</title>
<link rel="stylesheet" href="https://unpkg.com/big-json-viewer/dist/default.css">
<script src="https://unpkg.com/big-json-viewer/dist/browser-api.js"></script>
</head>
<body>
<script>
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);
});
</script>
</body>
</html>