Feature Request: Support binary serialization formats beyond JSON
While JSON serialization is quite common, it's far from the only payload (serialization) format that is commonly used. In fact, it's quite a poor format for IoT and similar data that often gets transferred over MQTT - therefore many systems use other, more compact and more performant, formats. These are generally binary formats that are not human-readable.
In light of this, it would be great to allow for other (common) binary formats to be inspected in a similar user-readable fashion inside MQTT Explorer. The most common ones are likely to be the following, split into two categories:
Schema-less
These can usually be mapped directly to JSON-like payloads via existing libraries. I.e. development effort to support should therefore be more limited:
- CBOR (the one we use, and the reason I'm creating this feature; CBOR is also the only format apart from JSON that's officially supported by AWS IoT)
- MsgPack (similar to CBOR)
- Gzipped JSON (existing feature request https://github.com/thomasnordquist/MQTT-Explorer/issues/506)
Schema-based
These can be mapped to JSON-like payloads based on schema. Given the need to register the schema in MQTT Explorer, the development effort to support these may be a bit higher:
- Apache Avro (existing feature request https://github.com/thomasnordquist/MQTT-Explorer/issues/195)
- Protocol Buffers
- Thrift Protobufs and Thrift are mostly used in the context of RPC, so may be less relevant in the MQTT context, but I figured I'd add them just to give a sense of the landscape.
Either way, I thought I'd create this issue in order to gauge the interest in (and likelihood of) having this be implemented.
I would also like to voice my interest in CBOR support. Thanks for all the effort that has gone into this app!
I'm after protobuf support, or at least a better way of copying messages out / displaying them
I've added ProtoBuf support in this PR, it works (use settings menu item to then select a proto folder - subfolders auto included). You then get a dropdown at the top of the right side panel, the topic section (yeah wrong place), for Decoder, and another for view format (hex/json/string). https://github.com/tyeth/thomasnordquist_MQTT-Explorer/pull/1 If you goto a topic and activate protobuf decoder, then you get a dropdown above the value, with the different found protos, and it auto suggests compatible looking ones (* at top) along with matching the topic end segment to any proto names (StartsWith). There's also publish, but not verified the output although it does come out, still it supports complex types which was my main aim.
I'll clean up and finish the todo's/testing eventually, but the assets work in CI, so you can always clone/fork and run the actions again to get assets for all 3 platforms (win/mac/linux). ~https://github.com/tyeth/thomasnordquist_MQTT-Explorer/actions/runs/18107986005~ https://github.com/tyeth/thomasnordquist_MQTT-Explorer/actions/runs/18133332368 (searchable dropdown for protos)