 
         } else if (value is Date) {
             // 0x08
-            throw new Error("Date support not supported");
+            throw new Error("Date serialization not supported");
 
         } else if (value is Array) {
             context.bytes.writeByte(0x09);

            return;
        }

        var denseEnd :int = 0;
        while (denseEnd < arr.size && arr[denseEnd] === undefined) {
            denseEnd ++;
        }
        encodeInteger(1 | (denseEnd << 1));

        for (var prop :Object in arr) {
            if ((prop is int || prop is uint) && prop >= 0 && prop < denseEnd) {
                continue;
            }
            encodeString(String(prop));
            encodeValue(context, arr[prop]);
        }
        encodeString("");

        for (var ii :int = 0; ii < denseEnd; ii ++) {
            encodeValue(context, arr[ii]);
        }

            context.bytes.writeByte(0x80 | ((n >> 7) & 0x7F));
            context.bytes.writeByte(0x00 | (n & 0x7F));

        } else if (n < 0x3FFFFFFF) {
            context.bytes.writeByte(0x80 | (n >> 21));
            context.bytes.writeByte(0x80 | ((n >> 14) & 0x7F));
            context.bytes.writeByte(0x80 | ((n >> 7) & 0x7F));
            context.bytes.writeByte(0x00 | (n & 0x7F));

        } else {
            throw new Error("Internal error - numerical overflow: " + n);
        }
    }

