Adobe ColdFusion 8

serializeVariable

Description

Serializes a property of a structure. If an object is not a string, number, array, Boolean, or date, WddxSerializer treats it as a structure.

Syntax

object.serializeVariable( name, obj )

Parameters

Parameter

Description

object

Instance name of a WddxSerializer object

name

Property to serialize

obj

Instance name of the value to serialize

Return value

Returns a Boolean True if serialization was successful; False, otherwise.

This is an internal function; you do not typically call it.

Example

This example is from the WddxSerializer serializeValue function:

...
// Some generic object; treat it as a structure
    this.write("<struct>");
    for (prop in obj)
    {
        bSuccess = this.serializeVariable(prop, obj[prop]);
        if (! bSuccess)
        {
            break;
        }
    }
    this.write("</struct>");
...