So I am trying to publish some values to a topic using jsondoc, but unfortunately only some of the values get published. It sends 6 out of the 10. My memory is 256 for the doc here is the code. The output I get in node red is
This is what my Arduino publish routine looks like. I had to increase the StaticJsonDocument size to 384 otherwise nothing got publish. It took a long time tracking down the problem. Hope this helps.
In my situation nothing was being sent via MQTT, so I just increased the size from 256 to 384 (trial and error). I did try visually counting the characters in the message but gave up.
I'm using version 6 of the ArduinoJson library by Benoit Blanchon. There is an Assistant program on his website that enables an accurate length of the document-string to be calculated.