namespace Serialize

Provies a set of functions to serialize and deserialize objects

namespace attributes [NB. highlighted items are covered in other pages - namespaces or classes]
function toNative() - Serializes an object to a string
function toXML() - Serializes an object to a XML string
function fromNative() - Deserializes an object

Functions

function toNative Click to go up to the list
Serializes an object to a string
Declaration:
    native function toNative( string name, object o )
Description:
This function serializes the contents of the variables in the specified object to a string using a Ferite specific format. The class definition, functions, and static variables aren't included. Object references are recursively serialized and included in the output, up to a limit. The name of the object in the serialized output is set to the specified string.
Parameters:
    Parameter #1: string name - The name of the object to use in the serialized output
    Parameter #2: object o - The object to serialize
Returns:
    A string containing the serialized object

function toXML Click to go up to the list
Serializes an object to a XML string
Declaration:
    native function toXML( string name, object o )
Description:
This function serializes the contents of the variables in the specified object to a XML string. The class definition, functions, and static variables aren't included. Object references are recursively serialized and included in the output, up to a limit. The name of the object in the serialized output is set to the specified string.
Parameters:
    Parameter #1: string name - The name of the object to use in the serialized output
    Parameter #2: object o - The object to serialize
Returns:
    A string containing the serialized object

function fromNative Click to go up to the list
Deserializes an object
Declaration:
    native function fromNative( string data )
Description:
This function takes a string which was previously created by Serialize.toNative() and creates an object from it with the variables filled in. If the data is corrupted, the class definition is different to what it was when the object was serialized, or if the class doesn't exist at all, the results are undefined (Ferite may even crash).
Parameters:
    Parameter #1: string data - The serialized object data
Returns:
    The deserialized object

Automatically generated at 8:45pm, Wednesday 08 January 2003 by feritedoc.