Azure EventHub - EventData.body_as_json returns a dict #29044
Labels
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Event Hubs
Messaging
Messaging crew
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
EventData.body_as_json in Azure EventHub code currently returns a dictionary. This is not expected based on the name, as what is expected (in Python) is a string representing a json object.
Since there is already body_as_str method, I would suggest that this method gets renamed as body_as_dict.
In the interim, it could be kept for backwards compatibility, but it is not intuitive for new users of this module.
In Python, JSON != dict, at least not as a type. That is why we use json.loads to move JSON into a dict.
The text was updated successfully, but these errors were encountered: