Vue component that renders JSON data in a collapsible tree structure.
use in browsers
- Include the CSS and JS along with Vue, so you get a
- Instantiate the component with your data.
use with webpack and vue-loader
- Install the
vue-json-treepackage via NPM.
npm install --save vue-json-tree
- Import the SFC (with CSS embedded) and register it as a component, either globally or in another component.
The data you want to present in the tree view. Must be a valid JSON string, otherwise it fails.
If your JSON data has already been parsed, bind this one instead. Must be something that can be produced by
Sometimes the data structure is very deep. You could set them to collapsed on load. By default all levels are expanded.
MIT © Leo