|
|
7b60fc252d
|
feat(middleware): add MQTT payload parser with dot-notation JSON path extraction
- src/modules/mqtt/payload-parser.ts: extractValue() supporting \$.field and \$.nested.deep paths
- Returns raw string when no path provided, null for invalid JSON or missing paths
- Stringifies numbers/booleans, returns JSON string for objects/arrays
- tests/payload-parser.test.ts: 19 tests covering no-path passthrough, simple/nested fields, missing paths, invalid JSON, and edge cases (null, zero, arrays)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-04-06 12:48:29 +02:00 |
|