universal-json-parser

n8n community node for converting any input to valid JSON

Package Information

Released: 5 mo ago
Downloads: 17 weekly / 70 monthly
Latest Version: 0.1.11
Author: toropov.ve

Documentation

n8n-nodes-universal-json-parser

Community node for n8n that parses arbitrary input into valid JSON.

Compatibility

  • n8n >= 1.120.4
  • Node.js >= 22 for local npm install / npm ci (peer n8n-workflow pulls isolated-vm@6, which requires Node 22+)

Node

  • Universal JSON Parser
    • Input: any expression value from n8n (string, object, array, primitive)
    • Output: normalized JSON in item.json
    • Modes:
      • Per Item: output item count equals input item count
      • Aggregate To One Item: merge all input items into one output item

Behavior

  • Tries JSON.parse for string values
  • Parses fenced markdown JSON like ```json ... ```
  • Converts true, false, null, numeric strings to corresponding JSON types
  • Converts Date to ISO string
  • Converts Buffer to UTF-8 string, then parses/normalizes
  • Replaces unsupported JSON values (undefined, function, symbol) with null
  • Detects circular references and replaces them with "[Circular]"
  • Wraps non-object top-level values into { "value": ... }

Install in n8n

For self-hosted n8n:

  1. Open Settings -> Community Nodes
  2. Click Install
  3. Enter package name: n8n-nodes-universal-json-parser
  4. Confirm installation and restart n8n if prompted

Local development

npm install
npm run lint
npm run build

Release flow (Git + ручная публикация в npm)

Автопубликация из GitHub Actions не используется (на npm для Trusted Publishers нужен 2FA / привязка репозитория). Релиз делается вручную с твоей машины.

1. Код в Git

git add .
git commit -m "feat: ..."
git push origin main

2. Версия в package.json

Подними версию (например патч):

cmd /c npm version patch

Или отредактируй version в package.json вручную и обнови package-lock.json через npm install.

3. Логин в npm

На Windows в PowerShell удобнее обходить политику выполнения так:

cmd /c npm whoami

Если не залогинен:

cmd /c npm login

Либо один раз через Granular Access Token (как ты уже делал):

cmd /c npm config set //registry.npmjs.org/:_authToken=ТВОЙ_ТОКЕН

4. Публикация

Сборка запустится сама из скрипта prepublishOnly:

cmd /c npm publish --access public

Локальная публикация без --provenance (provenance в основном для CI / Trusted Publishing).

5. Проверка

npm view n8n-nodes-universal-json-parser version

После этого пользователи self-hosted ставят пакет через Settings -> Community Nodes по имени n8n-nodes-universal-json-parser.

Discussion