vanilla-jsoneditor
A web-based tool to view, edit, format, transform, and validate JSON
Last updated 2 years ago by josdejong .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ npm install vanilla-jsoneditor 
SYNC missed versions from official npm registry.

vanilla-jsoneditor

A web-based tool to view, edit, format, transform, and validate JSON.

Try it out: https://jsoneditoronline.org

This is the vanilla variant of svelte-jsoneditor, which can be used in vanilla JavaScript or frameworks like SolidJS, React, Vue, Angular.

JSONEditor tree mode screenshot JSONEditor text mode screenshot

Features

  • View and edit JSON
  • Has a low level text mode and high level tree mode
  • Format (beautify) and compact JSON
  • Sort, query, filter, and transform JSON
  • Repair JSON
  • JSON schema validation and pluggable custom validation
  • Color highlighting, undo/redo, search and replace
  • Utilities like a color picker and timestamp tag
  • Handles large JSON documents up to 512 MB

Install

Install using npm:

npm install vanilla-jsoneditor

Remark: for usage in a Svelte project, install svelte-jsoneditor instead.

Use

Browser example loading the ES module:

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>JSONEditor</title>
  </head>
  <body>
    <div id="jsoneditor"></div>

    <script type="module">
      import { JSONEditor } from 'vanilla-jsoneditor'

      let content = {
        text: undefined,
        json: {
          greeting: 'Hello World'
        }
      }

      const editor = new JSONEditor({
        target: document.getElementById('jsoneditor'),
        props: {
          content,
          onChange: (updatedContent, previousContent, { contentErrors, patchResult }) => {
            // content is an object { json: JSONData } | { text: string }
            console.log('onChange', { updatedContent, previousContent, contentErrors, patchResult })
            content = updatedContent
          }
        }
      })

      // use methods get, set, update, and onChange to get data in or out of the editor.
      // Use updateProps to update properties.
    </script>
  </body>
</html>

Documentation

For documentation, see: https://github.com/josdejong/svelte-jsoneditor

Current Tags

  • 0.11.0-beta.3                                ...           beta (2 years ago)
  • 0.23.7                                ...           latest (5 months ago)

101 Versions

  • 0.23.7                                ...           5 months ago
  • 0.23.6                                ...           5 months ago
  • 0.23.5                                ...           6 months ago
  • 0.23.4                                ...           6 months ago
  • 0.23.3                                ...           6 months ago
  • 0.23.2                                ...           7 months ago
  • 0.23.1                                ...           8 months ago
  • 0.23.0                                ...           8 months ago
  • 0.22.0                                ...           8 months ago
  • 0.21.6                                ...           9 months ago
  • 0.21.5                                ...           9 months ago
  • 0.21.4                                ...           10 months ago
  • 0.21.3                                ...           10 months ago
  • 0.21.2                                ...           10 months ago
  • 0.21.1                                ...           a year ago
  • 0.21.0                                ...           a year ago
  • 0.20.0                                ...           a year ago
  • 0.19.0                                ...           a year ago
  • 0.18.13                                ...           a year ago
  • 0.18.12                                ...           a year ago
  • 0.18.11                                ...           a year ago
  • 0.18.10                                ...           a year ago
  • 0.18.9                                ...           a year ago
  • 0.18.8                                ...           a year ago
  • 0.18.7                                ...           a year ago
  • 0.18.6                                ...           a year ago
  • 0.18.5                                ...           a year ago
  • 0.18.4                                ...           a year ago
  • 0.18.3                                ...           a year ago
  • 0.18.2                                ...           a year ago
  • 0.18.1                                ...           a year ago
  • 0.18.0                                ...           a year ago
  • 0.17.10                                ...           a year ago
  • 0.17.9                                ...           a year ago
  • 0.17.8                                ...           a year ago
  • 0.17.7                                ...           a year ago
  • 0.17.6                                ...           a year ago
  • 0.17.5                                ...           a year ago
  • 0.17.4                                ...           a year ago
  • 0.17.3                                ...           2 years ago
  • 0.17.2                                ...           2 years ago
  • 0.17.1                                ...           2 years ago
  • 0.17.0                                ...           2 years ago
  • 0.16.1                                ...           2 years ago
  • 0.16.0                                ...           2 years ago
  • 0.15.1                                ...           2 years ago
  • 0.15.0                                ...           2 years ago
  • 0.14.10                                ...           2 years ago
  • 0.14.9                                ...           2 years ago
  • 0.14.8                                ...           2 years ago
  • 0.14.7                                ...           2 years ago
  • 0.14.6                                ...           2 years ago
  • 0.14.5                                ...           2 years ago
  • 0.14.4                                ...           2 years ago
  • 0.14.3                                ...           2 years ago
  • 0.14.2                                ...           2 years ago
  • 0.14.1                                ...           2 years ago
  • 0.14.0                                ...           2 years ago
  • 0.13.1                                ...           2 years ago
  • 0.13.0                                ...           2 years ago
  • 0.12.0                                ...           2 years ago
  • 0.11.8                                ...           2 years ago
  • 0.11.6                                ...           2 years ago
  • 0.11.5                                ...           2 years ago
  • 0.11.4                                ...           2 years ago
  • 0.11.3                                ...           2 years ago
  • 0.11.2                                ...           2 years ago
  • 0.11.1                                ...           2 years ago
  • 0.11.0                                ...           2 years ago
  • 0.11.0-beta.3                                ...           2 years ago
  • 0.10.4                                ...           2 years ago
  • 0.11.0-beta.2                                ...           2 years ago
  • 0.11.0-beta.1                                ...           2 years ago
  • 0.10.2                                ...           2 years ago
  • 0.10.1                                ...           2 years ago
  • 0.10.0                                ...           2 years ago
  • 0.9.2                                ...           2 years ago
  • 0.9.1                                ...           2 years ago
  • 0.9.0                                ...           2 years ago
  • 0.8.0                                ...           2 years ago
  • 0.7.11                                ...           2 years ago
  • 0.7.10                                ...           2 years ago
  • 0.7.9                                ...           2 years ago
  • 0.7.8                                ...           2 years ago
  • 0.7.7                                ...           2 years ago
  • 0.7.6                                ...           2 years ago
  • 0.7.5                                ...           2 years ago
  • 0.7.4                                ...           2 years ago
  • 0.7.3                                ...           2 years ago
  • 0.7.2                                ...           2 years ago
  • 0.7.1                                ...           2 years ago
  • 0.7.0                                ...           2 years ago
  • 0.6.6                                ...           2 years ago
  • 0.6.5                                ...           2 years ago
  • 0.6.4                                ...           2 years ago
  • 0.6.3                                ...           2 years ago
  • 0.6.2                                ...           2 years ago
  • 0.6.1                                ...           2 years ago
  • 0.6.0                                ...           2 years ago
  • 0.5.0                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE