A React-based web application for comparing and visualizing JSON structures side by side.
- Input two JSON structures for comparison
- Visual tree representation of JSON data
- Color-coded differences highlighting
- Expandable/collapsible nodes for easy navigation
- Copy and clear functionality for input fields
- Node.js (version 12 or higher)
- npm (usually comes with Node.js)
-
Clone the repository:
git clone https://github.com/yourusername/json-tree-compare-viewer.git
-
Navigate to the project directory:
cd json-tree-compare-viewer
-
Install dependencies:
npm install
To start the development server:
Open http://localhost:3000 to view the application in your browser.
- Enter or paste JSON data into the "Left JSON" and "Right JSON" text areas.
- Click the "Compare" button to visualize the JSON structures.
- Expand or collapse nodes to explore the JSON hierarchy.
- Use the copy and clear buttons for easy input management.
- Red: Extra data in left JSON
- Blue: Extra data in right JSON
- Green: Matching primitive values
- Gray: Matching keys or array indices
- React
- Tailwind CSS
- Lucide React (for icons)
The main component of the application is JsonTreeCompareViewer
, which can be found in:
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.