Azure / azure-iot-explorer

Cross-platform UI for interacting with devices attached to Azure IoT Hub. This tool is meant for learning and testing, not for production environment.
MIT License
224 stars 73 forks source link

[BUG] Json data in telemetry should be between single quote #606

Closed survivant closed 1 year ago

survivant commented 1 year ago

Describe the bug The generated command line to send telemetry message in json format is wrap between double quote, which doesn't work. az iot device simulate --device-id a-b-c-d-e --login "HostName=XXXX.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=XXXX" --data "{ "test": "1"}"

To Reproduce Steps to reproduce the behavior: just go into the device/send message and enter a json content and click on the copy button and paste it in a terminal

Expected behavior

the command line generated should work as is.

the ouptut should has been az iot device simulate --device-id a-b-c-d-e --login "HostName=XXXX.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=XXXX" --data '{ "test": "1"}'

Screenshots

image

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

YingXue commented 1 year ago

Thank you for reporting the issue. The new release has this bug fixed, please give it a try: https://github.com/Azure/azure-iot-explorer/releases/tag/v0.15.6