diff --git a/locales/en.yml b/locales/en.yml index d1cd21c47..01571d3b1 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -332,6 +332,10 @@ tools: title: JSON minify description: Minify and compress your JSON by removing unnecessary whitespace. + json-string-converter: + title: JSON string converter + description: Convert your plain text or JavaScript objects into JSON string format and vice versa. + ulid-generator: title: ULID generator description: Generate random Universally Unique Lexicographically Sortable Identifier (ULID). diff --git a/src/tools/index.ts b/src/tools/index.ts index 388cfaf49..bed683113 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -1,6 +1,7 @@ import { tool as base64FileConverter } from './base64-file-converter'; import { tool as base64StringConverter } from './base64-string-converter'; import { tool as basicAuthGenerator } from './basic-auth-generator'; +import { tool as jsonStringConverter } from './json-string-converter'; import { tool as emailNormalizer } from './email-normalizer'; import { tool as asciiTextDrawer } from './ascii-text-drawer'; @@ -151,6 +152,7 @@ export const toolsByCategory: ToolCategory[] = [ crontabGenerator, jsonViewer, jsonMinify, + jsonStringConverter, jsonToCsv, sqlPrettify, chmodCalculator, diff --git a/src/tools/json-string-converter/index.ts b/src/tools/json-string-converter/index.ts new file mode 100644 index 000000000..858417fdf --- /dev/null +++ b/src/tools/json-string-converter/index.ts @@ -0,0 +1,12 @@ +import { Braces } from '@vicons/tabler'; +import { defineTool } from '../tool'; + +export const tool = defineTool({ + name: 'Json string converter', + path: '/json-string-converter', + description: '', + keywords: ['json', 'string', 'converter'], + component: () => import('./json-string-converter.vue'), + icon: Braces, + createdAt: new Date('2024-10-17'), +}); diff --git a/src/tools/json-string-converter/json-string-converter.e2e.spec.ts b/src/tools/json-string-converter/json-string-converter.e2e.spec.ts new file mode 100644 index 000000000..2062d178d --- /dev/null +++ b/src/tools/json-string-converter/json-string-converter.e2e.spec.ts @@ -0,0 +1,11 @@ +import { test, expect } from '@playwright/test'; + +test.describe('Tool - Json string converter', () => { + test.beforeEach(async ({ page }) => { + await page.goto('/json-string-converter'); + }); + + test('Has correct title', async ({ page }) => { + await expect(page).toHaveTitle('Json string converter - IT Tools'); + }); +}); diff --git a/src/tools/json-string-converter/json-string-converter.vue b/src/tools/json-string-converter/json-string-converter.vue new file mode 100644 index 000000000..71da26038 --- /dev/null +++ b/src/tools/json-string-converter/json-string-converter.vue @@ -0,0 +1,56 @@ + + +