mirror of
https://github.com/tenrok/vue-json-viewer.git
synced 2026-06-02 16:04:08 +03:00
c29fa5680d03e950fe3a44f61f9a12bf93af712e
vue-json-viewer
Simple json display component, based on vue
Installing:
Using npm:
$ npm install vue-json-viewer
Using bower:
$ yarn add vue-json-viewer
Example:
<json-viewer
:value="jsonData"
:show-copy="true"
icon-prefix="ion"
:show-bigger="true"
:sort-keys="true" />
export default {
name: 'Page',
data() {
return {
jsonData: {
name: [
{key: 2},
{key: 'hello word'},
],
val: {
c: () = {},
b: 'a',
a: 'hello word',
asd2: 1,
asd: false,
foo: null,
bar: undefined
}
}
}
}
}
Result:
Options:
| Property | Description |
|---|---|
| value | json data |
| show-copy | display the copy button |
| show-bigger | display the bigger button |
| icon-prefix | Custom Font icon prefix |
| sort-keys | Sort items by key names |
Languages
Vue
66.2%
JavaScript
32.7%
HTML
0.9%
CSS
0.2%
