Migration to 0.1
Version 0.1.0 modernizes v3-jsoneditor while keeping the core API (v-model, options, currentMode, modeList, language, height, plus) intact. Most apps upgrade without code changes. This page lists what behaves differently and what is new.
Breaking or visible changes
New default theme
The default theme is now the modern light theme. To keep the original jsoneditor look (blue menu bar), set theme="classic":
<Vue3Jsoneditor v-model="json" theme="classic" />See Theming.
Option callbacks are merged, not overridden
Previously, a callback in options such as onChange could replace the component's internal handler (breaking v-model), or be replaced by it. Now both run: the component's handler (which emits events) and yours. If you used options.onChange as a workaround for missing events, you may now receive two notifications if you also listen to @change; keep one.
Options are honored more consistently
- The starting mode comes from the
currentModeprop (default'code'). Props take precedence overoptions, which take precedence over defaults. options.indentationis now respected. The default is2.
Clearing the editor emits null
Emptying the editor in code or text mode now emits null through update:modelValue instead of leaving the previous value.
modelValue accepts any JSON
modelValue is no longer restricted to objects. Arrays, strings, numbers, booleans and null are all valid, so Vue no longer warns about prop types for these.
jsoneditor v10
The underlying jsoneditor is upgraded to v10. It drops Internet Explorer 11 support. If you used jsoneditor APIs through getEditor(), check the jsoneditor changelog.
Import path
The package entry is now the preferred import:
// Before
import Vue3Jsoneditor from 'v3-jsoneditor/src/Vue3Jsoneditor.vue'
// After
import Vue3Jsoneditor from 'v3-jsoneditor'The old path still works, so this change is optional, but the package entry is what the TypeScript types describe.
Built-in color picker works again
jsoneditor's built-in color picker now works. The component only overrides onColorPicker if you listen to @colorPicker or pass options.onColorPicker.
New features
themeprop:light,dark,auto,classic.v-model:currentModeand themode-change(newMode, oldMode)event.v-model:fullscreenand thefullscreen-changeevent; the fullscreen button works in every mode and Esc exits.validation-errorevent for schema and custom validation.- Reactive
options.schema. #toolbarslot to add your own buttons to the menu bar.v-model:textfor the raw editor text.readOnly,debounce,indentation,mainMenuBar,navigationBarandstatusBarprops.- Global defaults:
app.use(Vue3Jsoneditor, { theme: 'auto', height: 500, ... }), including a customcomponentName. - Default slot for placeholder content until the editor mounts.
getEditor(),get(),getText(),validate(),collapseAll()andfocus()methods.heightaccepts numbers (pixels).- TypeScript types with JSDoc.
- SSR-safe import for Nuxt and VitePress.
Upgrade checklist
- Update the package:
npm install v3-jsoneditor@latest. - Change imports to
import Vue3Jsoneditor from 'v3-jsoneditor'. - Add
theme="classic"if you want the old appearance. - If you passed
options.onChange(or other callbacks) and listen to the matching event, remove the duplicate. - If your code treats an empty editor specially, handle
nullfromv-model.