

The converter/reverter principle is based on data transformation into a representation from which the instance can be restored. There are four types of converters for each category, listed in the following table: A conversion can be associated with a type or with a field of the user class. They may have to be extended with custom converters for user fields that cannot be properly serialized through RTTI. Not all user-defined objects can be serialized solely based on the marshaling classes. TJSONMarshal and TJSONUnMarshal are two out-of-the-box implementations of the serialization based on JSON objects: user objects are transformed into equivalent JSON objects and those are reverted back into user objects.

User objects can be transformed into an equivalent representation and then reverted back to user instances based on a suite of converter and reverter classes. DataSnap provides a generic serialization suite in the DBXJSONReflect unit through the TTypeMarshaller class. The paradigm is based on marshaling user objects into JSON objects and then back into user objects on the opposite side. It is now possible to pass user-defined objects between client and server methods using JSON objects. Go Up to Developing DataSnap Applications
