# v-jsoneditor

> vue use jsoneditor

Latest version **1.4.5** (published 2021-08-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install v-jsoneditor
pnpm add v-jsoneditor
yarn add v-jsoneditor
bun add v-jsoneditor
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.5 |
| Published | 2021-08-10 |
| First published | 2018-04-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 18.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 182 |
| Author | leiyswork@gmail.com |
| Maintainers | leiys |
| Keywords | vue, jsoneditor |

## Links

- npm: https://www.npmjs.com/package/v-jsoneditor
- Repository: https://github.com/yansenlei/VJsoneditor
- Homepage: https://github.com/yansenlei/VJsoneditor#readme
- Issues: https://github.com/yansenlei/VJsoneditor/issues
- npm.io page: https://npm.io/package/v-jsoneditor

## Dependencies (1)

- [jsoneditor](https://npm.io/package/jsoneditor.md) ^9.5.3

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.4.5 (latest) — 2021-08-10
- 1.4.4 — 2021-05-19
- 1.4.3 — 2021-05-19
- 1.4.2 — 2020-10-30
- 1.4.1 — 2020-04-26
- 1.4.0 — 2020-04-24
- 1.3.0 — 2020-04-16
- 1.2.3 — 2019-10-10
- 1.2.2 — 2019-08-22
- 1.2.1 — 2019-07-08
- 1.2.0 — 2019-07-03
- 1.1.6 — 2019-05-09
- 1.1.5 — 2019-05-06
- 1.1.4 — 2019-03-08
- 1.1.3 — 2019-03-08
- … 22 more at https://npm.io/package/v-jsoneditor/versions

## README

[![npm version](https://badge.fury.io/js/v-jsoneditor.svg)](https://badge.fury.io/js/v-jsoneditor)
[![Build Status](https://api.travis-ci.org/yansenlei/VJsoneditor.svg?branch=master)](https://travis-ci.org/yansenlei/VJsoneditor) 
[![license](https://img.shields.io/npm/l/express.svg)](https://github.com/yansenlei/VJsoneditor/blob/master/LICENSE) 
[![license](https://img.shields.io/npm/dm/v-jsoneditor.svg)](https://github.com/yansenlei/VJsoneditor/blob/master/LICENSE) 

# v-jsoneditor

> Vue JSONEditor

## Try the demo

https://yansenlei.github.io/VJsoneditor/

![demo](./v-jsoneditor.gif)

## Installation

```bash
npm install v-jsoneditor
```

## Using

### Import globally

```javascript
import Vue from 'vue'
import VJsoneditor from 'v-jsoneditor'

Vue.use(VJsoneditor)
```

### Import

```javascript
import VJsoneditor from 'v-jsoneditor'

export default {
    name: 'app',
    components: {
        VJsoneditor
    },
    data() {
        return {
            json: {
                "hello": "vue"
            }
        }
    },
    methods: {
        onError() {
            console.log('error')
        }
    }
}
```

### Browser
```html
<script src='https://unpkg.com/vue@latest'></script>
<script src="./dist/v-jsoneditor.min.js"></script>
```

### Use in template

```html
<v-jsoneditor v-model="json" :options="options" :plus="false" height="400px" @error="onError">
```

### Options
| Name           | Description                                                                                                                                                   | type    | default          |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: | :--------------: |
| options        | Jsoneditor params, You can look at the detailed  [configuration](https://github.com/josdejong/jsoneditor/blob/master/docs/api.md#configuration-options?blank) | Object  | { mode: 'code' } |
| value(v-model) | Object value                                                                                                                                                  | Object  | { }              |
| plus           | Whether full screen switching is added                                                                                                                        | Boolean | true             |
| height         | Default height                                                                                                                                                | String  | -                |

### Events
| Name  | Description    |
| ----- | -------------- |
| error | Error callback |



## Build Setup

``` bash
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build
```

---
_Source: https://npm.io/package/v-jsoneditor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
