Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3354

Re: How do I convert a JSON response to XML in ABAP

$
0
0

Hi Rong,

I think you need to transform the names of JSON objects to uppercase letters first like it is shown in demo report 'demo_json_names_to_upper'. You can use the predefined transformation 'demo_json_xml_to_upper' (or also ' wdr_json_xml_to_upper ') to update your JSON string.

 

Maybe like this:

DATA(lo_writer) = cl_sxml_string_writer=>create( type = if_sxml=>co_xt_json ).
CALL TRANSFORMATION wdr_json_xml_to_upper SOURCE XML lv_json
                                                                           RESULT XML lo_writer.
DATA(lv_json_upper) = lo_writer->get_output( ).
"JSON to ABAP
CALL TRANSFORMATION id SOURCE XML lv_json_upper
                                           RESULT access_token = lv_token.


Regards,

Bernd


Viewing all articles
Browse latest Browse all 3354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>