Gathering detailed insights and metrics for react-json-editor-ajrm
Gathering detailed insights and metrics for react-json-editor-ajrm
Gathering detailed insights and metrics for react-json-editor-ajrm
Gathering detailed insights and metrics for react-json-editor-ajrm
@types/react-json-editor-ajrm
TypeScript definitions for react-json-editor-ajrm
react-json-editor-ajrm-example
A simple website to showcase react-json-editor-ajrm component
react-json-editor-ajrm-ts-platform
A stylish, editor-like, modular, react component for viewing, editing, and debugging javascript object syntax!
@cto.ai/react-json-editor-ajrm
This repository is a fork of the [React JSON Editor (AJRM)](https://github.com/AndrewRedican/react-json-editor-ajrm) project by [Andrew Redican](https://github.com/AndrewRedican). The original project aimed to provide a versatile JSON editor for React app
A modular, easy to use, react component, to view, edit, and debug javascript objects.
npm install react-json-editor-ajrm
Typescript
Module System
Node Version
NPM Version
95
Supply Chain
37.2
Quality
76.2
Maintenance
100
Vulnerability
100
License
JavaScript (98.88%)
HTML (0.94%)
CSS (0.18%)
Total Downloads
16,352,300
Last Day
8,126
Last Week
53,595
Last Month
245,296
Last Year
3,245,736
MIT License
359 Stars
391 Commits
127 Forks
9 Watchers
4 Branches
16 Contributors
Updated on Apr 17, 2025
Minified
Minified + Gzipped
Latest Version
2.5.14
Package Id
react-json-editor-ajrm@2.5.14
Unpacked Size
341.83 kB
Size
55.97 kB
File Count
36
NPM Version
8.5.0
Node Version
16.14.1
Published on
Jan 29, 2023
Cumulative downloads
Total Downloads
Last Day
-37.5%
8,126
Compared to previous day
Last Week
-3.6%
53,595
Compared to previous week
Last Month
1.3%
245,296
Compared to previous month
Last Year
-14.9%
3,245,736
Compared to previous year
1
Warning:
As you may already know, the react-json-editor-ajrm's orignal project is not actively maintained and that it will eventually be deprecated. So I've decided to set an official date for deprecation. The tentative date for this is June 15, 2023.
I would like to thank those who used it in their projects and those who have contributed in some way to the project. I simply no longer wish to maintain this project. It was made in the early days of my software engineer career, and it has not caught up to today's standards nor mine.
But don't fret. I intend to breathe new life into this project rewriting it from the ground up.
I would like to take the learnings of the past, and avoid some of the issues react-json-editor-ajrm currently has. I would also like to highlight the things done well, and I wish to carry on.
I've setup home for this new project here enio. I've also set up a discussion here if you have any questions or comments.
A stylish, editor-like, modular, react component for viewing, editing, and debugging javascript object syntax!
$ npm i --save react-json-editor-ajrm
import JSONInput from 'react-json-editor-ajrm';
import locale from 'react-json-editor-ajrm/locale/en';
<JSONInput
id = 'a_unique_id'
placeholder = { sampleObject }
colors = { darktheme }
locale = { locale }
height = '550px'
/>
Hint: There are two different root paths: react-json-editor-ajrm
and react-json-editor-ajrm/es
. The first contains polyfilled ES5 code, the second unpolyfilled ES6. The react-json-editor-ajrm/es
version is not compatible with create-react-app
. If you are unsure of which one you need/want, pick the first - it has the best compatibility with tools and browsers.
The ./examples
folder contains two examples:
$ cd path/to/repo/react-json-editor-ajrm/example/webpack-project
$ npm i
$ npm start
http://localhost:8080
in the web browserplaceholder
property to display after component mounts.English
, German
, Spanish
, Chinese
, French
, Indonesian
, Russian
, Hindi
, Japanese
and Tamil
.Name | Description | Type | Required |
---|---|---|---|
locale | The locale of your editor. Import locales like this: import locale from 'react-json-editor-ajrm/locale/en' . Learn More | object | Mandatory |
id | An optional id to assign to the actual text input DOM node. Asides the from the text input, the following nodes will also receive an id: {id}-outer-box , {id}-container , {id}-warning-box , {id}-labels | string | Optional |
placeholder | Send a valid javascript object to be shown once the component is mounted. Assign a different value to have the component's initial content re-rendered. | object | Optional |
reset | Send true to have component always re-render or 'reset' to the value provided on the placeholder property. | boolean | Optional |
viewOnly | Send true if you would like for content shown not to be editable. | boolean | Optional |
onChange | Whenever onKeyPress event take place, it will return content values. | object | Optional |
onBlur | Whenever onBlur event take place, it will return content values. | object | Optional |
confirmGood | Send false if you would like for the checkmark to confirm good syntax to be hidden. | boolean | Optional |
height | A shorthand property to set a specific height for the entire component. | string | Optional |
width | A shorthand property to set a specific width for the entire component. | string | Optional |
onKeyPressUpdate | Send false if you would like for component not to automatically update on key press. | boolean | Optional |
waitAfterKeyPress | Amount of milliseconds to wait before re-rendering content after keypress. Value defaults to 1000 when not specified. In other words, component will update if there is no additional keystroke after the last one within 1 second. Less than 100 milliseconds does not makes a difference. | number | Optional |
modifyErrorText | A custom function to modify the component's original warning text. This function will receive a single parameter of type string and must equally return a string . | function | Optional |
error | Contains the following properties: | object | Optional |
error.reason | A string containing a custom error messsage | string | Optional |
error.line | A number indicating the line number related to the custom error message | number | Optional |
theme | Specify which built-in theme to use. | string | Optional |
colors | Contains the following properties: | object | Optional |
colors.default | Hex color code for any symbols, like curly braces , and comma . | string | Optional |
colors.string | Hex color code for tokens identified as string values. | string | Optional |
colors.number | Hex color code for tokens identified as integeter , double , or float values. | string | Optional |
colors.colon | Hex color code for tokens identified as colon . | string | Optional |
colors.keys | Hex color code for tokens identified as keys or property names. | string | Optional |
colors.keys_whiteSpace | Hex color code for tokens identified as keys wrapped in quotes. | string | Optional |
colors.primitive | Hex color code for tokens identified as boolean values and null. | string | Optional |
colors.error | Hex color code for tokens marked with an error tag. | string | Optional |
colors.background | Hex color code for component's background. | string | Optional |
colors.background_warning | Hex color code for warning message displaying at the top in component. | string | Optional |
style | Contains the following properties: | object | Optional |
style.outerBox | Property to modify the default style of the outside container div of component. | object | Optional |
style.container | Property to modify the default style of the container of component. | object | Optional |
style.warningBox | Property to modify the default style of the container div of the warning message. | object | Optional |
style.errorMessage | Property to modify the default style of the warning message. | object | Optional |
style.body | Property to modify the default style of the container div of row labels and code. | object | Optional |
style.labelColumn | Property to modify the default style of the container div of row labels. | object | Optional |
style.labels | Property to modify the default style of each row label. | object | Optional |
style.contentBox | Property to modify the default style of the container div of the code. | object | Optional |
outerBox
+-- container
+--- warningBox
+---- errorMessage
+--- body
+---- labelColumn
+----- labels
+---- contentBox
+----- auto generated markup
Whenever RJEA re-renders its content, any function passed onto onChange
property will receive a single object parameter with the following keys and values:
Key | Description |
---|---|
plainText | A string representation of then content which includes linebreaks and indentation. Great to console.log() |
markupText | A string representation of the auto-generated markup used to render content. |
json | A JSON.stringify version of content. |
jsObject | A javascript object version of content. Will return undefined if the content's syntax is incorrect. |
lines | Number of lines rendered for content to be displayed. |
error | Returns false unless the content's syntax is incorrect, in which case returns an object with a token and a line number which corresponds to the location at which error occurred and a reason |
RJEA supports built-in theme. Here is the list.
This project is licensed under the MIT License - see the LICENSE.md file for details.
Thanks goes to these wonderful people :smile::
This project follows the all-contributors specification. Contributions of any kind welcome!
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
project is archived
Details
Reason
Found 1/13 approved changesets -- 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
134 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-05-26
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