Debug json data in ease and fast
- Auto hide when env is Production
- Flexible styling
- Default theme variant
- Copy button for each single object in Array
npm install vue-json-preview --save
<template>
<vue-json-preview :data="data" :position="position" />
</template>
<script>
import VueJsonPreview from "vue-json-preview";
export default {
data() {
return {
data: ["linux", "windows", "osx", "solaris"],
position: "BOTTOM_RIGHT"
}
},
components: {
VueJsonPreview
}
}
</script>
Props | Type | Default | Description |
---|---|---|---|
data | [Object, Array, String, Boolean] | Array | Data you want to debug |
position | String | BOTTOM_RIGHT | The position of element in DOM, optional value: ['BOTTOM_RIGHT', 'BOTTOM_LEFT', 'TOP_RIGHT', 'TOP_LEFT'] |
If you find issue or bug please refer to issue section. If you think this needs couple improvements please discuss and send PR.