You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the datacontenttype declares the data to contain JSON-formatted content, a JSON serializer MUST translate the data value to a JSON value, and use the member name data to store it inside the JSON representation. The data value MUST be stored directly as a JSON value, rather than as an encoded JSON document represented as a string.
When an encoded json value is passed into the cloud even, when to_json is invoked the resulting json object has an encoded json object in the data field and not a JSON representation as required.
Although, I'm not sure this is actually an issue. Can you please verify how Event behaves? CloudEvent class as noted is a Python-friendly wrapper and thus is not obliged to follow the spec and may have different behavior.
There's also an open issue in the spec itself that I believe is related to the behavior you're showcasing: cloudevents/spec#558.
Expected Behavior
JSON format spec section [#3.1.1] states
Actual Behavior
When an encoded json value is passed into the cloud even, when
to_json
is invoked the resulting json object has an encoded json object in the data field and not a JSON representation as required.Specifications
#3.1.1
The text was updated successfully, but these errors were encountered: