abap-observability-tools / abap-metrics-provider

Let's you use predefined or custom metrics to monitor your abap stack with a monitoring tool of your choice.
https://abap-observability-tools.org/abap-metrics-provider
MIT License
24 stars 7 forks source link

Escape JSON strings in zcl_amp_conv_http_json #151

Open ThoralfHaensel opened 3 years ago

ThoralfHaensel commented 3 years ago

The ABAP method "escape" can be used to escape all JSON strings (keys and values) in zcl_amp_conv_http_json.

https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenescape_functions.htm#@@ITOC@@ABENESCAPE_FUNCTIONS_3

JohannesKonings commented 3 years ago

replacement of the regex: https://github.com/abap-observability-tools/abap-metrics-provider/blob/385a55383accbdf2f24361a3bbd9ebdccc180997/src/zamp_converter/zcl_amp_conv_http_json.clas.abap#L39

Maybe also addition to the unit tests https://github.com/abap-observability-tools/abap-metrics-provider/blob/main/src/zamp_converter/zcl_amp_conv_http_json.clas.testclasses.abap