User Guide

790 Chapter 6: WDDX JavaScript Objects
alert("Couldn't serialize data");
}
}
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
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.
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>");
...
serializeValue
Description
Recursively serializes eligible data in a passed instance. Eligible data includes:
String
Number
Boolean
Date
Array
Parameter Description
object Instance name of a WddxSerializer object
name Property to serialize
obj Instance name of the value to serialize