Closed martijns closed 2 years ago
I am seeing this issue even though the scope for the JSON keys should be differentiating.
For example:
{
"propertyA" : "valueA",
"propertyB" : "valueB",
...
"level2" : {
"eventStuff" : {
"eventStuffProperty1" : "value1",
"eventStuffProperty2" : "value2",
...
}
...
},
"eventStuff" : {
"eventStuffProperty1" : "value1",
"eventStuffProperty2" : "value2",
...
}
}
We sometimes get a Deserialization Error on "eventStuffProperty1".
Closing stale issues
Stream analytics is unable to handle JSON messages where a property of an object is defined multiple times.
The following JSON message is submitted by a device to IoT Hub:
Stream analytics (listening on a consumer group of IoT Hub) does not process the message. Enabling execution logs shows the following error (with some id's redacted):
Newtonsoft's JSON deserializer does properly deserialize the object as tested with an Azure Function listening on another consumer group on the IoT Hub.
Even though JSON keys are recommended to be unique, they are not required to be so.
I guess it's up to the implementor to decide whether to error on this, but IMHO Stream Analytics should be robust and not error on a message like this.