Small helper to serialize json to MQTT topics
see the tests for detail of the formatting options
Example usage:
const mqttSerializer = const bunchOfObjects = a: "b" c: "abc" d: "def" const result =
Will return
topic: "exampleNameSpace/a/0" message: "b" topic: "exampleNameSpace/a/1/c" message: "abc" topic: "exampleNameSpace/d" message: "def"