User Guide

Table Of Contents
Moving complex data across the web with WDDX 877
</struct>
</var>
When you deserialize this XML into CFML or JavaScript, the result is a structure that is created
by either of the following scripts:
Conversely, when you serialize the variable x produced by either of these scripts into WDDX, you
generate the XML listed above.
ColdFusion provides a tag and JavaScript objects that convert between CFML, WDDX, and
JavaScript. Serializers and deserializers for other data formats are available on the web. For more
information, see www.openwddx.org.
Note: The cfwddx tag and the wddx.js JavaScript functions use UTF-8 encoding to represent data.
Any tools that deserialize ColdFusion-generated WDDX must accept UTF-8 encoded characters.
UTF-8 encoding is identical to the ASCII and ISO 8859 single-byte encodings for the standard 128
"7-bit" ASCII characters. However, UTF-8 uses a two-byte representation for "high-ASCII" ISO
8859 characters where the initial bit is 1.
WDDX data type support
The following sections describe the data types that WDDX supports. This information is a
distillation of the description in the WDDX DTD. For more detailed information, see the DTD
at www.openwddx.org.
Basic data types
WDDX can represent the following basic data types:
JavaScript CFScript
x = new Object();
x.a = "Property a";
x.b = "Property b";
x = structNew();
x.a = "Property a";
x.b = "Property b";
Data type Description
Null Null values in WDDX are not associated with a type such as number or
string. The
cfwddx tag converts WDDX Nulls to empty strings.
Numbers WDDX documents use floating point numbers to represent all numbers. The
range of numbers is restricted to +/-1.7E+/-308. The precision is restricted
to 15 digits after the decimal point.
Date-time values Date-time values are encoded according to the full form of ISO8601; for
example, 2002-9-15T09:05:32+4:0.
Strings Strings can be of arbitrary length and must not contain embedded nulls.
Strings can be encoded using double-byte characters.