Ansicht
Dokumentation

ABENSERIALIZABLE_OBJECT_ABEXA - SERIALIZABLE OBJECT ABEXA

ABENSERIALIZABLE_OBJECT_ABEXA - SERIALIZABLE OBJECT ABEXA

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   CPI1466 during Backup  
This documentation is copyright by SAP AG.
SAP E-Book

Adjusted Serialization and Deserialization

This example demonstrates the adjusted serialization and deserialization of objects.

Source Code

Execute

Description

Using the identity transformation ID, objects in two classes are serialized to asXML and to asJSON, and then deserialized.

The object of the class cl_unsafe is processed by default. The example shows that the standard behavior allows an object in a class to be created for which a private attribute receives a value set from outside, both for asXML and for asJSON After deserialization, the value of the private attribute attr in the new class does not match the value defined in the class.

The object of the class cl_safe is processed in an adjusted way. The example shows demonstrates how the methods SERIALIZE_HELPER and DESERIALIZE_HELPER can be used to prevent unwanted manipulation of attributes. The private attribute attr is serialized using SERIALIZE_HELPER but is not deserialized in DESERIALIZE_HELPER.






BAL_S_LOG - Application Log: Log header data   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 1448 Date: 20240329 Time: 105945     sap01-206 ( 72 ms )