2023 Oct 23 7:27 PM
Hi Experts,
When it comes to ABAP on Cloud (Steampunk) what is the recommended approach to work with JSON data (Serialisation, Deserialisation). The Classic Class: /UI2/CL_JSON is a released API even in the latest version (2308) but at the same time XCO library is also available for developers to deal with JSON data.
Please note: /UI2/CL_DATA_ACCESS class is not a released API (not sure why)
So, what is the general recommendation/best practice from SAP for working with JSON data in ABAP on SAP BTP Environment.
2024 Oct 09 1:54 PM
I have explored both XCO library and /UI2/CL_JSON, and I find both have important limitations. /UI2/CL_JSON has not been updated to support pascal case, so any JSON integration requiring pascal case cannot utilize that class. XCO supports pascal, but unlike /UI2/CL_JSON it doesn't support compression. Therefore, every element is filled with a blank value.
In the case below if we have a structure with three elements, and in that structure Phone is blank, XCO passes Phone with a blank value. I need an option that skips elements, arrays, etc. that are all blank values.
3 weeks ago
Thanks for highlighting the differences that you have observed. It is helpful
a week ago
/UI2/CL_JSON does support pascal case since new release.
Even in older versions, you could use pascal by starting the field names with underscore, but is not ideal