Wddxserializer Object; Functions; Serialize - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

WddxSerializer object

The WddxSerializer object includes functions that serialize any JavaScript data structure.

Functions

The only function that developers typically call is
Function syntax
object.serialize(rootobj)
object.serializeVariable(name, obj)
object.serializeValue(obj)
object.write(str)

serialize

Description
Creates a WDDX packet for a passed WddxRecordset instance.
Syntax
object.serialize( rootobj )
Parameters
Parameter
object
rootobj
Return value
Returns a serialized WDDX packet as a string if the function succeeds, or a null value if an error
occurs.
Usage
Call this function to serialize the data in a WddxRecordset instance.
Example
This example shows a JavaScript function that you can call to serialize a WddxRecordset instance.
It 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
{
Description
Instance name of the WddxSerializer object
JavaScript data structure to serialize
.
serialize
Description
Creates a WDDX packet for a passed WddxRecordset
instance.
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.
Recursively serializes eligible data in a passed instance.
Appends data to the serialized data stream.
WddxSerializer object
789

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents