The change you suggested in “modbus_data_sender” to remove square brackets has been implemented. “option json_segment_count ‘all’” already existed. Added “option format_non_array ‘1’” line.
Square brackets removed. However, there are multiple requests in the topic. This time, the commas between the curly braces containing the requests have also disappeared. This is an undesirable situation. In this case, the broker does not take into account anything other than the first request.
In this case, there’s not much can be done. You could introduce a comma in the data to sender (something like {%a}, , but this would result in an additional comma at the very end as well.
I would suggest to either use the standard format with square brackets, or set segment count to 1. This way, the device will send each request separately, but there will be no square brackets.
While there will be more customization, I am not sure if it will allow for the format you are looking for. For TRB245, the firmware will be released very soon.