562
CFML Language Reference
WddxSerializer Object
The WddxSerializer object includes functions that serialize any JavaScript data
structure.
The only function that developers typically call is serialize.
serialize
Creates a WDDX packet for a passed WddxRecordset instance.
Syntax
object.
serialize
(
rootobj )
object
Instance name of the WddxSerializer object.
rootobj
JavaScript data structure to be serialized.
Return
value
String. Returns the serialized WDDX packet if the function succeeds and a null value if
an error occurs.
Usage
Call this function to serialize the data in a WddxRecordset instance.
Example
This example illustrates a JavaScript function that you can call to serialize a
WddxRecordset instance. The function copies serialized data to a form field for display:
function serializeData(data, formField)
{
wddxSerializer = new WddxSerializer();
wddxPacket = wddxSerializer.serialize(data);
if (wddxPacket != null)
{
formField.value = wddxPacket;
}
else
{
alert("Couldn’t serialize data");
}
}
serializeVariable
Serializes a property of a structure. If an object is not a string, number, array, Boolean,
or a date, WddxSerializer treats it as a structure.
Syntax
object.
serializeVariable
(
name, obj )
Summary of Contents for COLDFUSION 4.5-CFML LANGUAGE
Page 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Page 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Page 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Page 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Page 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Page 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Page 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Page 584: ...560 CFMLLanguageReference...
Page 594: ...570 CFMLLanguageReference...