Gathering detailed insights and metrics for jsoneditor
Gathering detailed insights and metrics for jsoneditor
Gathering detailed insights and metrics for jsoneditor
Gathering detailed insights and metrics for jsoneditor
@types/jsoneditor
TypeScript definitions for jsoneditor
v-jsoneditor
vue use jsoneditor
jsoneditor-react
React implementation of https://github.com/josdejong/jsoneditor
jsoneditor-standalone
This is a wrapper for jsoneditor package, it can be run offline without any dependencies and privacy concerns.
A web-based tool to view, edit, format, and validate JSON
npm install jsoneditor
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
11,653 Stars
1,784 Commits
2,042 Forks
228 Watching
5 Branches
85 Contributors
Updated on 26 Nov 2024
Minified
Minified + Gzipped
JavaScript (87.58%)
SCSS (6.77%)
HTML (5.65%)
Cumulative downloads
Total Downloads
Last day
-4.4%
34,087
Compared to previous day
Last week
-5.9%
172,814
Compared to previous week
Last month
11.6%
751,985
Compared to previous month
Last year
9.2%
8,387,616
Compared to previous year
9
JSON Editor is a web-based tool to view, edit, format, and validate JSON. It has various modes such as a tree editor, a code editor, and a plain text editor. The editor can be used as a component in your own web application. It can be loaded as CommonJS module, AMD module, or as a regular javascript file.
The library was originally developed as core component of the popular web application https://jsoneditoronline.org and has been open sourced since then.
Supported browsers: Chrome, Firefox, Safari, Edge.
Â
Cross browser testing for JSONEditor is generously provided by BrowserStack
This library jsoneditor
has a successor: svelte-jsoneditor
. The new editor is not a one-to-one replacement, so there may be reasons to stick with jsoneditor
.
The main differences between the two are described here.
JSONEditor has various modes, with the following features.
with npm (recommended):
npm install jsoneditor
Alternatively, you can use another JavaScript package manager like https://yarnpkg.com/, or a CDN such as https://cdnjs.com/ or https://www.jsdelivr.com/.
Note that in the following example, you'll have to change the urls
jsoneditor/dist/jsoneditor.min.js
andjsoneditor/dist/jsoneditor.min.css
to match the place where you've downloaded the library, or fill in the URL of the CDN you're using.
1<!DOCTYPE HTML> 2<html lang="en"> 3<head> 4 <!-- when using the mode "code", it's important to specify charset utf-8 --> 5 <meta charset="utf-8"> 6 7 <link href="jsoneditor/dist/jsoneditor.min.css" rel="stylesheet" type="text/css"> 8 <script src="jsoneditor/dist/jsoneditor.min.js"></script> 9</head> 10<body> 11 <div id="jsoneditor" style="width: 400px; height: 400px;"></div> 12 13 <script> 14 // create the editor 15 const container = document.getElementById("jsoneditor") 16 const options = {} 17 const editor = new JSONEditor(container, options) 18 19 // set json 20 const initialJson = { 21 "Array": [1, 2, 3], 22 "Boolean": true, 23 "Null": null, 24 "Number": 123, 25 "Object": {"a": "b", "c": "d"}, 26 "String": "Hello World" 27 } 28 editor.set(initialJson) 29 30 // get json 31 const updatedJson = editor.get() 32 </script> 33</body> 34</html>
The code of the JSON Editor is located in the folder ./src
. To build
jsoneditor:
Install dependencies:
npm install
Build JSON Editor:
npm run build
This will generate the files ./jsoneditor.js
, ./jsoneditor.css
, and
minified versions in the dist of the project.
To automatically build when a source file has changed:
npm start
This will update ./jsoneditor.js
and ./jsoneditor.css
in the dist folder
on every change, but it will NOT update the minified versions as that's
an expensive operation.
Run unit tests:
npm test
Run code linting (JavaScript Standard Style):
npm run lint
The source code of JSONEditor consists of CommonJS modules. JSONEditor can be bundled in a customized way using a module bundler like browserify or webpack. First, install all dependencies of jsoneditor:
npm install
To create a custom bundle of the source code using browserify:
browserify ./index.js -o ./jsoneditor.custom.js -s JSONEditor
The Ace editor, used in mode code
, accounts for about one third of the total
size of the library. To exclude the Ace editor from the bundle:
browserify ./index.js -o ./jsoneditor.custom.js -s JSONEditor -x brace -x brace/mode/json -x brace/ext/searchbox
To minify the generated bundle, use uglifyjs:
uglifyjs ./jsoneditor.custom.js -o ./jsoneditor.custom.min.js -m -c
jsoneditor
is released as open source under the permissive the Apache 2.0 license.
If you are using jsoneditor commercially, there is a social (but no legal) expectation that you help fund its maintenance. Start here.
The latest stable version of the package.
Stable Version
2
5.3/10
Summary
Regular Expression Denial of Service in jsoneditor
Affected Versions
< 9.5.6
Patched Versions
9.5.6
6.1/10
Summary
Cross-site Scripting in jsoneditor
Affected Versions
< 9.0.2
Patched Versions
9.0.2
Reason
no dangerous workflow patterns detected
Reason
23 commit(s) and 9 issue activity found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
5 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 1
Details
Reason
Found 0/15 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More