streamdal/plumber

Ability to emit JSON

johntdyer opened this issue · 3 comments

When reading from a topic, MQTT in my case, it would be nice to have a mode to emit one JSON line per event rather then the table

------------- [Count: 29 Received at: 2021-12-10T12:39:21-05:00] -------------------

+----------------------+------------------------------------------+
| ID                   |                                        0 |
| Topic                |             aqualinkd/Solar_Heater/delay |
| QoS                  |                                        0 |
| Retain               |                                    false |
+----------------------+------------------------------------------+
52.00

would become

{
  "count" : 29,
  "received" : "2021-12-10T12:39:21-05:00", 
  "id" :0, 
  "topic" : "aqualinkd/Solar_Heater/delay", 
  "qos" : 0, 
  "retain": false, 
  "payload" : 52.00 
} 

Great suggestion. We'll get this added asap as I suspect this will be a common request (as folks are tying it into other scripts/etc.).

@johntdyer how about this?

#206

Addressed in latest release: https://github.com/batchcorp/plumber/releases/tag/v1.0.1

Thank you!