2020 Feb 02 9:49 AM
HI,
I have a rawstring stored in my ztable, am able to read the rawstring and convert it to JSON format.
However from this file, I have a specific requirement to read a one specific object/node from Json file.. For example: The JSON file has R1 (root node) C1 (child node) C2 , C3 and C4.
Then based on input I should be able to fetch one node data like C3 ( this may have data in array fashion too). This functionality is similar to XPATH/Jsonpath operations. ( $data[*].nodename) .
Can you please guide on to how to do this in ABAP?
Thanks,
Raj
You might want to try using Simple Transformation to convert JSON to ABAP and vice versa. Please see https://blogs.sap.com/2013/04/15/abap-2-json-and-json-2-abap-with-st/.
2020 Feb 03 6:03 PM
You might want to try using Simple Transformation to convert JSON to ABAP and vice versa. Please see https://blogs.sap.com/2013/04/15/abap-2-json-and-json-2-abap-with-st/.
2020 Feb 06 10:20 AM
Hi Gabriel, Thanks.
Though we do transformation JSON to ABAP. How to read a specific a node which may have a nested structures?
Also how to generate transformation id (demo_st_json_table) when I have JSON?
CALL TRANSFORMATION demo_st_json_table SOURCE carriers = carriers
RESULT XML json_writer.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |