vue-json-content

A Vue.js component that displays pretty json
10,285 3
Install
npm install vue-json-content
Latest Version:1.0.5
Vue:2
License:MIT
Last Updated:Dec 1, 2017
Links: GitHub  ·  npm
Maintainer: kmetsalu

vue-json-content

A Vue component that shows a pretty printed json.

This isn't particularly useful, it's used as a demo for how to publish Vue components to NPM!

Installation

npm i --save-dev vue-json-content

Browser

Include the script file, then install the component with Vue.use(VueJsonContent); e.g.:

<script type="text/javascript" src="node_modules/vuejs/dist/vue.min.js"></script>
<script type="text/javascript" src="node_modules/vue-json-content/dist/vue-json-content.min.js"></script>
<script type="text/javascript">
  Vue.use(VueJsonContent);
</script>

Module

import VueJsonContent from 'vue-json-content';

Usage

Once installed, it can be used in a template as simply as:

<div v-json-content="json"></div>

Version History

Version Released Vue License
1.0.5 ^2.2.1 MIT
1.0.4 ^2.2.1 MIT
1.0.3 ^2.2.1 MIT
1.0.2 ^2.2.1 MIT
1.0.1 ^2.2.1 MIT