This project is a powerful and user-friendly JSON Diff Viewer built with React, TypeScript, and Vite. It allows users to easily compare two JSON objects side-by-side and view the differences in a clean, syntax-highlighted, color-coded format. The tool is especially useful for developers, testers, and data analysts who need to analyze structural or data changes between JSON payloads.
- π§ Smart JSON Comparison β Detects and highlights additions, deletions, and changes.
- π Color Coded Output β
- π© Added keys/values
- π₯ Removed keys/values
- π¨ Modified values
- π Dark/Light Mode Toggle β Seamlessly switch themes to reduce eye strain.
- π§Ύ Syntax Highlighting β Powered by
react-syntax-highlighter
. - π§© Side-by-Side Diff Layout β Enhanced visual clarity of changes.
- β»οΈ Live Updates β Re-renders diff on input change in real-time.
- π‘ No Tailwind or UI Libraries β Styled using clean, custom CSS.
You can deploy this project across multiple platforms with CI/CD integration:
- Vercel β Connect your GitHub repo and deploy instantly with zero config.
- Cloudflare Pages β Edge-deployed for super-fast delivery.
- GitHub Pages β Great for hosting fallback or demo versions.
Follow the steps below to clone and run this project locally:
git clone https://github.com/your-username/json-diff-viewer.git
cd json-diff-viewer
### 2. Install Dependencies
```bash
npm install
### 3. Run the Development Server
npm run dev
### The app will be available at http://localhost:5173.
### 4. Build for Production
npm run build
### 5. Preview the Production Build
npm run preview
π¦ Future Improvements
π Side-by-side visual diff layout β Enhanced comparison for better readability.
π Multilingual support for accessibility β Reach a wider global audience.
π‘ AI-based suggestion for JSON improvement β Smart hints to improve data quality and structure.
# React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
## Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
```js
export default tseslint.config({
extends: [
// Remove ...tseslint.configs.recommended and replace with this
...tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
...tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
...tseslint.configs.stylisticTypeChecked,
],
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default tseslint.config({
plugins: {
// Add the react-x and react-dom plugins
'react-x': reactX,
'react-dom': reactDom,
},
rules: {
// other rules...
// Enable its recommended typescript rules
...reactX.configs['recommended-typescript'].rules,
...reactDom.configs.recommended.rules,
},
})
π Click here to view the deployed app on Vercel
π§βπ Author Made with β€οΈ by Dhanashri Patil
π§ Email: [email protected]