# How WDDX Works

The WDDX vocabulary describes a data object with a high level of abstraction. For instance, a simple object with two string properties might take the following form after it is serialized into a WDDX XML representation for delivery via HTTP:

    <var name='x'>
        <struct>

            <var name='a'>
                <string>Property a</string>
            </var>

            <var name='b'>
                <string>Property b</string>
            </var>

        </struct>
    </var>

The deserialization of this XML by the WDDX Deserializer object would create a structure similar to what would be created directly by this JavaScript object declaration:

    Comparison of JavaScript object and deserialized XML

    JavaScript

    CFML

    x = new Object();
    x.a = "Property a";
    x.b = "Property b";
    x = structNew();
    x.a = "Property a";
    x.b = "Property b";

See the CFML Language Reference for more information on JavaScript objects.