688
}
serializeVariable
Serializes a property of a structure. If an object is not a string, number, array,
Description
Boolean, or date, WddxSerializer treats it as a structure.
object.
Syntax
Parameters
Parameter
object
name
obj
Return value
Returns a Boolean True if serialization was successful, or False if an error occurs.
Usage
This is an internal function; you do not typically call it.
This example is from the WddxSerializer serializeValue function:
Example
...
// Some generic object; treat it as a structure
...
serializeValue
Description
Recursively serializes eligible data in a passed instance. Eligible data includes:
{
alert("Couldn't serialize data");
}
serializeVariable
Description
Instance name of a WddxSerializer object
Property to serialize
Instance name of the value to serialize
this.write("<struct>");
for (prop in obj)
{
bSuccess = this.serializeVariable(prop, obj[prop]);
if (! bSuccess)
{
break;
}
}
this.write("</struct>");
String
Number
Boolean
Date
Array
Recordset
Any JavaScript object
Chapter 6 WDDX JavaScript Objects
( name, obj )
Need help?
Do you have a question about the COLDFUSION 5 - CFML and is the answer not in the manual?