JSON Patch Applier is a web-based tool that allows users to apply JSON Patch operations to JSON data and visualize the changes. It provides an intuitive interface for working with JSON Patch, making it easier to understand and manipulate JSON data.
- Apply JSON Patch operations to JSON data
- Visualize differences between original and patched JSON
- Generate reverse JSON Patch operations
- Prettify JSON input
- Persistent state using local storage
- Responsive design for various screen sizes
- React
- TypeScript
- Vite
- Tailwind CSS
- immutable-json-patch
- jsondiffpatch
- pnpm (Package manager)
- Node.js (v14 or later)
- pnpm (v6 or later)
-
Clone the repository:
git clone https://github.com/your-username/json-patch-applier.git cd json-patch-applier
-
Install dependencies:
pnpm install
To start the development server:
pnpm dev
The application will be available at http://localhost:4242
.
To create a production build:
pnpm build
The built files will be in the dist
directory.
- Enter your JSON data in the "JSON Data" textarea.
- Enter your JSON Patch operations in the "Proposed JSON Patch" textarea.
- Click the "Apply Patch" button to see the result.
- The patched JSON will appear in the "Result" textarea.
- The reverse JSON Patch will be displayed in the "Revert JSON Patch" textarea.
- Use the "Prettify JSON" button to format the input JSON.
- Toggle the "Show unchanged values" checkbox to control the diff view.
- Use the "Reset" button to clear all inputs and results.
src/App.tsx
: Main application componentsrc/components/react-formatter.tsx
: Component for rendering JSON diffssrc/main.tsx
: Entry point of the applicationsrc/index.css
: Global styles (Tailwind CSS)public/
: Static assetsvite.config.ts
: Vite configurationtailwind.config.js
: Tailwind CSS configurationtsconfig.json
: TypeScript configurationpnpm-lock.yaml
: pnpm lock file for consistent dependency versions
pnpm dev
: Start the development serverpnpm build
: Build the project for productionpnpm lint
: Run ESLint for code lintingpnpm preview
: Preview the production build locally
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.
- immutable-json-patch for JSON Patch operations
- jsondiffpatch for JSON diffing
- Tailwind CSS for styling
- Vite for fast development and building
- pnpm for efficient package management