Prev | Current Page 867 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

Another area where serialization does not play well is events
management because the serialization process can potentially add reference objects that must not go
in the serialized object graph and the unserializer could not be able to re - wire the events properly during
the object reconstitution. Apart from those cases the serialization process is fast and efficient particularly
in the Neko platform where the code is optimized using a native implementation.
Part III: Extending the Possibilities
474
The Serializer class has a static variable USE_CACHE whose default value is set to false that
determines if the serialization process must account on recursive object references. It is fundamental to
set this variable to true if you need to serialize an object graph that has parent/child bidirectional
relations; otherwise the serialization process can end in an infinite loop.
As anticipated before, the haxe.Serializer and haxe.Unserializer classes can handle all the types
available in haXe including enum, class instances, and anonymous objects.


Pages:
855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879