Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

json-editor-vue

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-editor-vue

JSON editor & viewer for Vue 2 and 3 powered by svelte-jsoneditor & vue-json-viewer.

  • 0.3.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23K
decreased by-0.45%
Maintainers
1
Weekly downloads
 
Created
Source

English | 简体中文

json-editor-vue

JSON editor & viewer for Vue 2 and 3 powered by svelte-jsoneditor & vue-json-viewer

svelte-jsoneditor is a brand new JSON editor created by the same author of jsoneditor which 'has become hard to maintain, and the architecture needed a big overhaul'. json-editor-vue is the Vue version for svelte-jsoneditor.


Features

  • JSON editing + JSON viewing
  • Support both Vue2 & Vue3
  • Support v-model
  • Repair malformed JSON strings automatically
  • element-plus & element-ui adaptable ( readonly status goes with el-form by default )
  • Import locally or globally, config locally or globally

Installation

NPM

Vue3

npm add json-editor-vue svelte-jsoneditor
// import globally

import JsonEditorVue from 'json-editor-vue'

createApp(App)
.use(JsonEditorVue, {
  // global config
})
<!-- import locally -->

<template>
  <JsonEditorVue v-model="value" v-bind="{/* local config */}"/>
</template>

<script setup>
import JsonEditorVue from 'json-editor-vue'
</script>

Vue2

npm add json-editor-vue svelte-jsoneditor @vue/composition-api
// import globally

import JsonEditorVue from 'json-editor-vue'

Vue.use(JsonEditorVue, {
  // global config
})
<!-- import locally -->

<template>
  <JsonEditorVue :modelValue.sync="value" v-bind="{/* local config */}"/>
</template>

<script>
import JsonEditorVue from 'json-editor-vue'

export default {
  components: { JsonEditorVue },
}
</script>

Props

NameDescriptionTypeAccepted ValuesDefault
v-model / modelValuebinding valueany
readonlywhether JsonEditorVue is readonlybooleanfalse
readonlyOptionsprops of vue-json-viewerobject
...props of svelte-jsoneditor

Config rules

  • Props of two-way data binding ( v-model / modelValue ) only support local config.
  • All other props support both local and global config.

Priority:

  • Local config is higher than global config.
  • For object type, global config will be merged into local config.

Keywords

FAQs

Package last updated on 22 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc