Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
react-json-view-new
Advanced tools
React function component for displaying javascript arrays and JSON objects.
npm install react18-json-view --save
import JsonView from 'react18-json-view'
import 'react18-json-view/src/style.css'
<JsonView src={my_json_object} />
Name | Type | Default | Description |
---|---|---|---|
src | JSON Object | None | This property contains your input JSON |
collapseStringsAfterLength | integer | 99 | When an integer value is assigned, strings will be cut off at that length. Collapsed strings are inserted by an ellipsis. String content can be expanded and collapsed by clicking on the string value. |
collapseObjectsAfterLength | integer | 20 | When an integer value is assigned, the object and array will be collapsed initially. |
enableClipboard | boolean | true | When prop is not false, the user can copy objects and arrays to clipboard by clicking on the clipboard icon. |
react-json-view does not support React 18.
Here are all the style codes, you can freely change color variables, such as --json-property, or others.
.json-view {
--json-property: #009033;
--json-index: #676dff;
--json-number: #676dff;
--json-string: #b2762e;
--json-boolean: #dc155e;
--json-null: #dc155e;
}
.json-view .json-view--property {
color: var(--json-property);
}
.json-view .json-view--index {
color: var(--json-index);
}
.json-view .json-view--number {
color: var(--json-number);
}
.json-view .json-view--string {
color: var(--json-string);
}
.json-view .json-view--boolean {
color: var(--json-boolean);
}
.json-view .json-view--null {
color: var(--json-null);
}
.json-view:hover > .json-view--copy {
display: inline-block;
}
.json-view .json-view--pair:hover > .json-view--copy {
display: inline-block;
}
.json-view .json-view--copy {
display: none;
width: 1em;
height: 1em;
margin-left: 4px;
vertical-align: -11%;
cursor: pointer;
}
.json-view .jv-indent {
padding-left: 16px;
}
.json-view .jv-chevron {
display: inline-block;
vertical-align: -20%;
cursor: pointer;
opacity: 0.4;
}
.json-view .jv-chevron:hover {
opacity: 0.8;
}
.json-view .jv-button {
background: transparent;
outline: none;
border: none;
cursor: pointer;
}
.json-view .cursor-pointer {
cursor: pointer;
}
FAQs
JSON viewer for react18
We found that react-json-view-new demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.