Ansicht
Dokumentation

ABENABAP_JSON_NAMES_TO_UPPER_ABEXA - ABAP JSON NAMES TO UPPER ABEXA

ABENABAP_JSON_NAMES_TO_UPPER_ABEXA - ABAP JSON NAMES TO UPPER ABEXA

rdisp/max_wprun_time - Maximum work process run time   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

- Transforming Names

Transforms the names of JSON objects to uppercase letters.

Source Code

Execute

Description

This example demonstrates how the names of JSON data objects can be transformed to uppercase letters, so that they can be bound to the corresponding ABAP data in deserializations using the statement CALL TRANSFORMATION for example. Two transformation methods are demonstrated:

  • Parsing and rendering in the method json_names_to_upper_pr
  • This transforms the JSON data to JSON-XML.

  • The attributes with the name name are transformed to uppercase letters as in the executable example Modifying XML Data.

  • The result is rendered back to JSON using a JSON writer.

  • Calling a transformation in the method json_names_to_upper_tr

  • The modified JSON data is read from the writer.

The statement ASSERT guarantees that the results of both transformations are the same. After the transformation, the data is deserialized successfully to the ABAP structure. The method used in practice depends on performance and the volume of data expected.

The XSL transformation used DEMO_JSON_XML_TO_UPPER is as follows:






CPI1466 during Backup   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 2817 Date: 20240420 Time: 134606     sap01-206 ( 32 ms )