From 6f93cd19c1eb468733a7ba380347d7cf54b54593 Mon Sep 17 00:00:00 2001 From: ShareVB Date: Fri, 10 Jul 2026 21:55:11 +0200 Subject: [PATCH] feat(new tool): JSON Patch Tools Fix #1776 --- package.json | 1 + pnpm-lock.yaml | 8 ++ src/tools/json-patch/index.ts | 13 +++ src/tools/json-patch/json-patch.vue | 175 ++++++++++++++++++++++++++++ 4 files changed, 197 insertions(+) create mode 100644 src/tools/json-patch/index.ts create mode 100644 src/tools/json-patch/json-patch.vue diff --git a/package.json b/package.json index a9e18f42..d99bc41c 100644 --- a/package.json +++ b/package.json @@ -195,6 +195,7 @@ "exif-be-gone": "^1.5.1", "exifreader": "^4.33.1", "fanger": "0.3.1", + "fast-json-patch": "^3.1.1", "fast-xml-parser": "^5.7.2", "fast_array_intersect": "^1.1.0", "fflate": "^0.8.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 44b2e7c3..b641b907 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -470,6 +470,9 @@ importers: fanger: specifier: 0.3.1 version: 0.3.1 + fast-json-patch: + specifier: ^3.1.1 + version: 3.1.1 fast-xml-parser: specifier: ^5.7.2 version: 5.9.3 @@ -6872,6 +6875,9 @@ packages: resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} engines: {node: '>=8.6.0'} + fast-json-patch@3.1.1: + resolution: {integrity: sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==} + fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} @@ -17498,6 +17504,8 @@ snapshots: merge2: 1.4.1 micromatch: 4.0.8 + fast-json-patch@3.1.1: {} + fast-json-stable-stringify@2.1.0: {} fast-levenshtein@2.0.6: {} diff --git a/src/tools/json-patch/index.ts b/src/tools/json-patch/index.ts new file mode 100644 index 00000000..bccf52c7 --- /dev/null +++ b/src/tools/json-patch/index.ts @@ -0,0 +1,13 @@ +import { defineTool } from '../tool'; + +export const tool = defineTool({ + name: 'Json Patch Tester', + path: '/json-patch', + description: + 'A simple tool for creating and testing JSON patches according to RFC 6902. And list paths of a JSON object.', + keywords: ['json', 'patch', 'rfc6902', 'path'], + component: () => import('./json-patch.vue'), + icon: defineAsyncComponent(() => import('@vicons/tabler/es/FileDiff')), + createdAt: new Date('2026-07-05'), + category: 'JSON', +}); diff --git a/src/tools/json-patch/json-patch.vue b/src/tools/json-patch/json-patch.vue new file mode 100644 index 00000000..8a6030d5 --- /dev/null +++ b/src/tools/json-patch/json-patch.vue @@ -0,0 +1,175 @@ + + +