w-jsonview-tree

1.0.31 • Public • Published

w-jsonview-tree

A wrapper for json-view.

language npm version gzip file size npm download npm download jsdelivr download

Documentation

To view documentation or get support, visit docs.

Example

To view some examples for more understanding, visit examples:

small data: ex-small.html [source code]

large data: ex-large.html [source code]

formatter: ex-formatter.html [source code]

Installation

Using npm(ES6 module):

Note: w-jsonview-tree is not dependent on any package.

npm i w-jsonview-tree

By import:

import jv from 'w-jsonview-tree'

let data={a1:123,b1:'xyz',c1:[1.2,3.4,'5.6',false],d1:{cid:'WK2WHS',name:'peter',unique:false}}
let ele=document.querySelector('#id')

jv(data, element, {expanded:true})

In a browser(UMD module):

Add script for w-jsonview-tree.

<script src="https://cdn.jsdelivr.net/npm/w-jsonview-tree@1.0.31/dist/w-jsonview-tree.umd.js"></script>

Directly use:

let jv=window['w-jsonview-tree']

let data={a1:123,b1:'xyz',c1:[1.2,3.4,'5.6',false],d1:{cid:'WK2WHS',name:'peter',unique:false}}
let ele=document.querySelector('#id')

jv(data, ele, {expanded:true})

Package Sidebar

Install

npm i w-jsonview-tree

Weekly Downloads

171

Version

1.0.31

License

MIT

Unpacked Size

1.26 MB

Total Files

59

Last publish

Collaborators

  • semisphere