jsonTreeViewer is a lightweight, pure-JavaScript library and viewer for rendering JSON data as an interactive collapsible tree. Version 0.0.2 (no longer actively maintained) provides a simple way to visualize JSON objects in the browser with expand/collapse, JSONPath display, and node marking. It depends on no external frameworks and consists of just a JS and CSS file. Compared to alternatives like react-json-tree or jqTree, it is minimal, self-contained, and works in any JavaScript environment.
npm install json-tree-viewerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to include the library via script tags, create a tree from a JavaScript object, and expand all nodes.
var data = JSON.parse(jsonString); jsonTree.create(data, wrapper);
Ensure the wrapper is appended to the DOM before calling create().
Consider migrating to a maintained library.
Ensure <script src="path/to/jsonTree.js"></script> is placed before any code that calls jsonTree.create().
Check the path to jsonTree.js; if using npm, copy the files from node_modules/json-tree-viewer/libs/jsonTree/ to your project.
jsonTree.create(data, document.getElementById('tree'));No dependency data recorded yet.