ryayl
ryayl

Reputation: 163

Azure IoT Edge Support for JSON Arrays in Device Twin

Microsoft seems to have recently added support for JSON Array fields in the Device Twin. I can successfully set an array as a desired property and can receive and parse it on my device. However, when I try to generate a reported property in array form and send this from my device back to the cloud, it fails with a 400 error.

I am using version 0.2.0.0-26xenial of the Azure IoT C SDK to implement an IoTHubDeviceClient and then using IoTHubDeviceClient_SendReportedState() to send updates to the reported properties.

What is the latest on support for JSON arrays in the device twin?

Upvotes: 1

Views: 422

Answers (1)

Stefan Wick  MSFT
Stefan Wick MSFT

Reputation: 13850

You need to update your C-SDK to 0.2.0.0-27xenial for this.

For reference, here is the commit that updated the API version to enable this feature: https://github.com/Azure/azure-iot-sdk-c/commit/6f5632ca2ca18da9c786095faa9037a32800cf2b

Upvotes: 1

Related Questions