object-visualizer

Visualize JSON object to DOM.
11,885 223
Install
npm install object-visualizer
Latest Version:5.0.0
Vue:3
License:MIT
Last Updated:Jan 16, 2025
Links: GitHub  ·  npm
Maintainer: iendeavor

Object Visualizer

A vue component to visualize the JSON object to the DOM.

E2E on Chrome visitors donate

Live Demo

As same as Chrome's object tree As same as Chrome's object tree

Feature

  • getKeys: customize visible keys in any nested data

  • expandOnCreatedAndUpdated: expand or collapse after created or updated

    Starting from v4.0.0, this feature is only available for objects due to performance issues.

    • Recursive expand Meta+Click
    • Recursive collapse Meta+Shift+Click
  • Light/Dark mode

Installation

NPM

$ npm install object-visualizer
import { ObjectVisualizer } from 'object-visualizer'
import 'object-visualizer/dist/index.min.css'

CDN

<script src="https://unpkg.com/object-visualizer"></script>
<link
  type="text/css"
  rel="stylesheet"
  href="https://unpkg.com/object-visualizer/dist/index.min.css"
/>

<script>
  const { ObjectVisualizer } = window.ObjectVisualizer
</script>

Usage

<ObjectVisualizer
  :data="['foo', 'bar']"
  rootName="Data"
  :expandOnCreatedAndUpdated="(path) => false"
  :getKeys="(object, path) => Object.keys(object)"
></ObjectVisualizer>

License

MIT

Donate

If this library helped you out feel free to donate.

Related Packages

vue-json-cool

a json plugin for vue,support spread and shrinkage

17,877
vue-dd

Vue.js component for displaying JavaScript objects with circular references, for...

17,539 17
vue-json-viewer

vuejs展示json的组件

2,352,644 579
fourdom

A DOM toolkit library

43,700 1
vue-json-edit

visual JSON editor built as an vue component

11,485 285

Version History

Version Released Vue License
5.0.0 ^3.2.39 MIT
4.1.0 ^3.0.2 MIT
4.0.0 ^3.0.2 MIT
3.1.1 ^3.0.2 MIT
3.1.0 ^3.0.2 MIT
Pre-releases (6)
Version Released Vue License
5.0.0-beta.5 ^3.2.39 MIT
5.0.0-beta.4 ^3.2.39 MIT
5.0.0-beta.3 ^3.2.39 MIT
5.0.0-beta.2 ^3.2.39 MIT
5.0.0-beta.1 ^3.2.39 MIT