JSON Patch Generator — VS Code Extension
Generate, apply, and validate RFC 6902 JSON Patches directly inside VS Code.
Features
🔄 Generate Patch
Command: JSON Patch: Generate Patch from Two Files
Compare two JSON files and instantly see the RFC 6902 patch that transforms one into the other. The result appears in a side panel with a one-click Copy to Clipboard button.
- If two JSON files are open in the editor, they'll be offered as quick-pick options.
- Otherwise, an OS file picker opens.
✅ Apply Patch
Command: JSON Patch: Apply Patch to Document
Pick a *.patch.json file and a target JSON document. The patched result opens in a new untitled editor for review before saving.
🔍 IntelliSense for Patch Files
Files named *.patch.json or *-patch.json get:
- Autocomplete for
op, path, value, from fields
- Enum suggestions:
add, remove, replace, move, copy, test
- Inline error squiggles for missing required fields
Usage
- Open the Command Palette (
Ctrl+Shift+P / Cmd+Shift+P)
- Type JSON Patch to see all available commands
Or right-click inside any JSON file in the editor for context menu shortcuts.
Development
cd vscode-extension
npm install
npm run build # one-time build
npm run watch # rebuild on save
npm run compile-check # type-check only (no emit)
Press F5 in VS Code to launch the Extension Development Host.