Data class Object provides the native method marshal. It returns a string representation of the receiver. The inverse functionality is implemented as method unmarshal in class String. The string representation of an object is in the xml format. And has the following rules:
<poosl_marshal_data root="1">
<object id="1" class="CustomObject"> <assignments> <assignment name="Aap" id="2"/> </assignments> </object>
<object id="2" class="String"> <value>aap</value> </object>This also applies to sub-classes from "String"
<object id="4" class="Array"> <assignments> <assignment name="#1" id="3"/> <assignment name="#2" id="6"/> </assignments> </object>
An example of a marshalled object (CustomObject):
<poosl_marshal_data root="1"> <object id="1" class="CustomObject"> <assignments> <assignment name="Aap" id="2"/> <assignment name="Noot" id="4"/> </assignments> </object> <object id="2" class="String"> <value>aap</value> </object> <object id="5" class="Boolean"> <value>true</value> </object> <object id="3" class="CustomString"> <assignments> <assignment name="test" id="4"/> </assignments> <value>noot</value> </object> <object id="4" class="Array"> <assignments> <assignment name="#1" id="3"/> <assignment name="#2" id="6"/> <assignment name="#3" id="5"/> </assignments> </object> <object id="6" class="Nil"> </object> </poosl_marshal_data>