diff --git a/components.d.ts b/components.d.ts index 3e65c3cc5..890d62d50 100644 --- a/components.d.ts +++ b/components.d.ts @@ -109,6 +109,7 @@ declare module '@vue/runtime-core' { Ipv6UlaGenerator: typeof import('./src/tools/ipv6-ula-generator/ipv6-ula-generator.vue')['default'] JsonDiff: typeof import('./src/tools/json-diff/json-diff.vue')['default'] JsonMinify: typeof import('./src/tools/json-minify/json-minify.vue')['default'] + JsonStringConverter: typeof import('./src/tools/json-string-converter/json-string-converter.vue')['default'] JsonToCsv: typeof import('./src/tools/json-to-csv/json-to-csv.vue')['default'] JsonToToml: typeof import('./src/tools/json-to-toml/json-to-toml.vue')['default'] JsonToXml: typeof import('./src/tools/json-to-xml/json-to-xml.vue')['default'] diff --git a/locales/en.yml b/locales/en.yml index b195dbd85..8bd7d5c8a 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -333,6 +333,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..d92f5c989 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'; @@ -106,6 +107,7 @@ export const toolsByCategory: ToolCategory[] = [ textToNatoAlphabet, textToBinary, textToUnicode, + jsonStringConverter, yamlToJson, yamlToToml, jsonToYaml, diff --git a/src/tools/json-string-converter/index.ts b/src/tools/json-string-converter/index.ts new file mode 100644 index 000000000..2a597df8a --- /dev/null +++ b/src/tools/json-string-converter/index.ts @@ -0,0 +1,12 @@ +import { IconBraces } from '@tabler/icons-vue'; +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: IconBraces, + createdAt: new Date('2024-10-17'), +}); 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 @@ + + +