A React component for formatting JSON data into interactive JSX with collapsible nodes and syntax highlighting. Version 0.4.0, last updated in 2021, low release cadence. Ships TypeScript types. Lightweight alternative to react-json-view; focuses on basic formatting without advanced features like search or edit. Note: this package has no README and appears unmaintained.
npm install react-json-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic usage: pass a JSON object to the JsonFormatter component to render collapsible JSON.
Parse the string before passing: <JsonFormatter json={JSON.parse(jsonString)} />Override default styles via CSS classes or wrap the component in a styled container.
Consider using react-json-view or react-json-view-lite as maintained alternatives.
Parse the string with JSON.parse() before passing to the json prop.
Install via npm install react-json-formatter or yarn add react-json-formatter