Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
view-json-react
Advanced tools
Welcome to the JsonViewer component library! This React-based tool is designed to render JSON data in a beautifully structured, collapsible format. It offers a convenient and intuitive way to visualize JSON structures, with features that enhance both func
Welcome to the JsonViewer component library! This React-based tool is designed to render JSON data in a beautifully structured, collapsible format. It offers a convenient and intuitive way to visualize JSON structures, with features that enhance both functionality and user experience.
Install the JsonViewer component library with npm:
npm install view-json-react
Or with Yarn:
yarn add view-json-react
Incorporate the JsonViewer component into your React application like so:
import React from 'react';
import { JsonViewer } from 'view-json-react';
const App = () => {
const jsonData = {
/* your JSON data */
};
return <JsonViewer data={jsonData} expandLevel={1} />;
};
export default App;
The JsonViewer component accepts the following props:
data
(required): The JSON data to visualize.rootName
(optional): Name for the root node. No root name if not specified.style
(optional): CSS properties for custom styling.expandLevel
(optional, default: 0
): Initial JSON structure expansion level.onCopy
(optional): Callback for the copy action.Apply custom styles via the style
prop:
<JsonViewer
data={yourData}
style={{ backgroundColor: '#282c34', color: '#61dafb' }}
/>
Enable data copying with the onCopy
prop:
<JsonViewer
data={yourData}
onCopy={copyData => console.log('Copied data:', copyData)}
/>
We welcome contributions! Feel free to open an issue or submit a pull request for any bugs, feature requests, or improvements.
JsonViewer is made available under the MIT License. See the LICENSE file for more details.
FAQs
Welcome to the JsonViewer component library! This React-based tool is designed to render JSON data in a beautifully structured, collapsible format. It offers a convenient and intuitive way to visualize JSON structures, with features that enhance both func
The npm package view-json-react receives a total of 591 weekly downloads. As such, view-json-react popularity was classified as not popular.
We found that view-json-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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 malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.