Adobe ColdFusion 8

serializeValue

Description

Recursively serializes eligible data in a passed instance. Eligible data includes:

  • String
  • Number
  • Boolean
  • Date
  • Array
  • Recordset
  • Any JavaScript object

This function serializes null values as empty strings.

Syntax

object.serializeValue( obj )

Parameters

Parameter

Description

object

Instance name of the WddxSerializer object

obj

Instance name of the WddxRecordset object to serialize

Return value

Returns a Boolean True if obj was serialized successfully; False, otherwise.

Usage

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

Example

This example is from the WddxSerializer serialize function:

...
this.wddxPacket = "";
this.write("<wddxPacket version='1.0'><header/><data>");
bSuccess = this.serializeValue(rootObj);
this.write("</data></wddxPacket>");
if (bSuccess)
{
    return this.wddxPacket;
}
else
{
    return null;
}
...