0.1.8 • Published 1 year ago

@matpool/vue-json-view v0.1.8

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

vue-json-view

JSON viewer component, for Vue.js 3.

This project is forked from react-json-view and is the vue3 version of that.

Show only, can’t modify.

Install

npm install --save @matpool/vue-json-view

Usage

// import the vue-json-view component
import VueJsonView from '@matpool/vue-json-view'

// use the component in your app!
<VueJsonView src={my_json_object} />

Props

NameTypeDefaultDescription
srcJSON ObjectNoneThis property contains your input JSON
namestring or falsefalseContains the name of your root node. Use null or false for no name.
themestring"monokai"RJV supports base-16 themes. Check out the list of supported themes in the demo. A custom "monokai" theme applies by default.
collapsedboolean or integerfalseWhen set to true, all nodes will be collapsed by default. Use an integer value to collapse at a particular depth.
sortKeysbooleanfalseset to true to sort object keys