Gathering detailed insights and metrics for jsoneditor-react
Gathering detailed insights and metrics for jsoneditor-react
Gathering detailed insights and metrics for jsoneditor-react
Gathering detailed insights and metrics for jsoneditor-react
react wrapper implementation for https://github.com/josdejong/jsoneditor
npm install jsoneditor-react
Typescript
Module System
Node Version
NPM Version
JavaScript (99.76%)
CSS (0.24%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
273 Stars
99 Commits
107 Forks
5 Watchers
16 Branches
9 Contributors
Updated on Apr 14, 2025
Latest Version
3.1.2
Package Id
jsoneditor-react@3.1.2
Unpacked Size
63.44 kB
Size
14.41 kB
File Count
8
NPM Version
8.1.0
Node Version
16.13.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
2
32
react wrapper implementation for josdejong/jsoneditor
npm install --save jsoneditor jsoneditor-react
jsoneditor-react
using minimalist version of jsoneditor
to minimize flat bundle size, so if you want to use Ajv or Ace Editor install them as well
Version 3.0.0
and higher provide only es build. Also you need some loaders (in terms of webpack) to load json editor icons and css, e.g.:
1module.exports = { 2 module: { 3 rules: [ 4 {test: /\.css$/, loader: 'css-loader'}, 5 {test: /\.svg$/, loader: 'file-loader'} 6 ] 7 } 8};
1import { JsonEditor as Editor } from 'jsoneditor-react'; 2import 'jsoneditor-react/es/editor.min.css';
later in render method:
1render() { 2 return ( 3 <Editor 4 value={yourJson} 5 onChange={this.handleChange} 6 /> 7 ); 8}
If you want use with Ajv:
1import Ajv from 'ajv'; 2 3const ajv = new Ajv({ allErrors: true, verbose: true }); 4 5... 6 7render() { 8 return ( 9 <Editor 10 value={yourJson} 11 onChange={this.handleChange} 12 ajv={ajv} 13 schema={yourSchema} 14 /> 15 ); 16}
If you want use with Ace Editor:
1import ace from 'brace'; 2import 'brace/mode/json'; 3import 'brace/theme/github'; 4 5... 6 7render() { 8 return ( 9 <Editor 10 value={yourJson} 11 onChange={this.handleChange} 12 ace={ace} 13 theme="ace/theme/github" 14 schema={yourSchema} 15 /> 16 ); 17}
Or:
1import 'brace'; 2import 'brace/mode/json'; 3import 'brace/theme/github'; 4 5... 6 7render() { 8 return ( 9 <Editor 10 value={yourJson} 11 onChange={this.handleChange} 12 theme="ace/theme/github" 13 schema={yourSchema} 14 /> 15 ); 16}
Or define your own ace theme
If you using webpack and es6 dynamic imports you can load jsoneditor-react
asynchronously.
You can use react-imported-component or your own implementation
1import importedComponent from 'react-imported-component'; 2 3const JsonEditor = importedComponent(() => import(/* webpackChunkName:'jsoneditor' */'jsoneditor-react'));
Or with Ajv and Ace Editor:
1const JsonEditor = importedComponent(() => Promise.all([ 2 import(/* webpackChunkName:'jsoneditor' */'jsoneditor-react'), 3 import(/* webpackChunkName:'jsoneditor' */'brace'), 4 import(/* webpackChunkName:'jsoneditor' */'ajv'), 5 import(/* webpackChunkName:'jsoneditor' */'brace/mode/json'), 6 import(/* webpackChunkName:'jsoneditor' */'brace/theme/github') 7]).then(([{ JsonEditor: Editor }, ace, Ajv ]) => { 8 const ajv = new Ajv(); 9 return function EditorHoc(props) { 10 return ( 11 <Editor 12 ace={ace} 13 ajv={ajv} 14 theme="ace/theme/github" 15 {...props} 16 /> 17 ); 18 } 19}));
You can view usage of jsoneditor-react
using our storybook.
npm run dev
http://localhost:9001
Right now only one story exporting in storybook: /stories/Editor.jsx
, to add more use /.storybook/config.js
Working on docs
folder.
Right now you can use props declaration
Will be soon!😁
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/4 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
82 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
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