@crabas0npm2/suscipit-ab-laboriosam
v1.0.0
Published
A wrapper for json-view.
Downloads
2
Maintainers
Keywords
Readme
w-jsonview-tree
A wrapper for json-view.
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/[email protected]/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})