msrest.serialization serializes CloudEvent data field object as string #12831
Labels
Client
This issue points to a problem in the data-plane of the library.
Event Grid
Messaging
Messaging crew
Milestone
Uh oh!
There was an error while loading. Please reload this page.
I am trying to send a CloudEvent to an Event Grid topic, where CloudEvent is a model which inherits from
msrest.serialization.Model
. The CloudEvent is the following:The CustomSample class is:
When the CloudEvent is serialized to send to the Event Grid service, the CustomSample object in the data field is serialized into a string. This means that, when I try to deserialize the CloudEvent again on the receiving side, the data is not deserialized into the original CustomSample object again.
For example, this code:
results in this output:
When the value of the data field is set to another type, such as an int or dict, it is serialized/deserialized as an int or dict, respectively. I would similarly expect the data field to be serialized/deserialized as a CustomSample object, instead of a string.
The text was updated successfully, but these errors were encountered: