User Guide

Table Of Contents
878 Chapter 35: Using XML and WDDX
Complex data types
WDDX can represent the following complex data types:
Data type comparisons
The following table compares the basic WDDX data types with the data types to which they
correspond in the languages and technologies commonly used on the web:
Time zone processing
Producers and consumers of WDDX packets can be in geographically dispersed locations.
Therefore, it is important to use time zone information when serializing and deserializing data, to
ensure that date-time values are represented correctly.
Data type Description
Array Arrays are integer-indexed collections of objects of arbitrary type. Because most
languages start array indexes at 0, while CFML array indexes start at 1, working with
array indices can lead to nonportable data.
Structure Structures are string-indexed collections of objects of arbitrary type, sometimes
called associative arrays. Because some of the languages supported by WDDX are
not case-sensitive, no two variable names in a structure can differ only in their case.
Recordset Recordsets are tabular rows of named fields, corresponding to ColdFusion query
objects. Only simple data types can be stored in recordsets. Because some of the
languages supported by WDDX are not case-sensitive, no two field names in a
recordset can differ only in their case. Field names must satisfy the regular
expression [_A-Za-z][_.0-9A-Za-z]* where the period (.) stands for a literal period
character, not “any character”.
Binary The binary data type represents strings (blobs) of binary data. The data is encoded in
MIME base64 format.
WDDX CFML XML
Schema
Java ECMAScript/
JavaScript
COM
null N/A N/A null null VT_NULL
boolean Boolean boolean java.lang.Boolean boolean VT_BOOL
number Number number java.lang.Double number VT_R8
dateTime DateTime dateTime java.lang.Date Date VT_DATE
string String string java.lang.String string VT_BSTR
array Array N/A java.lang.Vector Array VT_ARRAY |
VT_VARIANT
struct Structure N/A java.lang.
Hashtable
Object IWDDXStruct
recordset Query
object
N/A coldfusion.run
time.QueryTable
WddxRecordset IWDDXRecordset
binary Binary binary byte[] WddxBinary V_ARRAY | UI1