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
Hello,
The oref_eventgrid->set_eventgrid_schema method does a json serialization of the gt_egrid_schema input parameter, although the data payload of the structure is mostly already a string in a json format. This results in escaping the existing json string. Eg. a " is converted to /" by escaping the " character. The data payload is then also not considered a json anymore by the event hub. So things like filtering in the event grid subscription don't work anymore.
And previously :
** Convert Data into json format
/ui2/cl_json=>serialize(
EXPORTING
data = lv_event_data
compress = abap_true
pretty_name = /ui2/cl_json=>pretty_mode-camel_case
RECEIVING
r_json = lv_json_string ).
Would it be possible that the payload-data is not serialized or that we can have a generic (nested) structure as input?
Greetings,
Bart
The text was updated successfully, but these errors were encountered:
Thanks for reaching out. The payload-data has to be the JSON format as per the event Payload Grid Schema. So, the Payload-Data can have any number of name entity and there is no specific type. The final payload schema should also be in the Json format. So, there is requirement to convert payload-data as well as the whole payload schema in the Json format.
Since you are looking to filter out based on payload-data in event Hub. The escape character /" will cause problem. I will make some adjustments set_eventgrid_schema->set_eventgrid_schema to make Payload-data Json as valid.
We pushed another demo program "ZADF_EVENTGRID_ANY_DEMO. " This program has the demo of generic type of Deep Structure having Dynamic internal table as payload.
Also made some adjustments to class method zcl_adf_service_eventgrid~set_eventgrid_schema to accommodate Dynamic deep structure. Please let me know us know if you still face issue in Even hub receiver.
Good news is now you can have generic (nested) structure as input in payload-data.
Hello,
The oref_eventgrid->set_eventgrid_schema method does a json serialization of the gt_egrid_schema input parameter, although the data payload of the structure is mostly already a string in a json format. This results in escaping the existing json string. Eg. a " is converted to /" by escaping the " character. The data payload is then also not considered a json anymore by the event hub. So things like filtering in the event grid subscription don't work anymore.
Example :
{
"subject": "OnlineShop/Order/Created",
"eventtype": "onlineshop.order.created",
"id": "12345678",
"data": "{"ordernr":"12345678","createdby":"DEVELOPERBD",**"event":"**created","date":*"2023-02-14","**time":*"**08:21:30"}",
"dataversion": "2.0",
"metadataversion": "1",
"eventtime": "2023-02-14T08:21:30Z",
...
}
This behaviour also occurs in the sample program:
oref_eventgrid->set_eventgrid_schema( EXPORTING it_egrid_schema = lt_payload
RECEIVING rv_xstring = DATA(lv_pxstring) ).
where ls_payload-data = lv_json_string.
And previously :
** Convert Data into json format
/ui2/cl_json=>serialize(
EXPORTING
data = lv_event_data
compress = abap_true
pretty_name = /ui2/cl_json=>pretty_mode-camel_case
RECEIVING
r_json = lv_json_string ).
Would it be possible that the payload-data is not serialized or that we can have a generic (nested) structure as input?
Greetings,
Bart
The text was updated successfully, but these errors were encountered: