User Guide Cancel

SerializeXML

 

Description

Serializes a ColdFusion object to XML.

Returns

String

Function syntax

serializeXml( Object objToBeSerialized, boolean useCustomSerializer )

History

ColdFusion 11: Added this function. 

Parameters

Parameter

Description

objToBeSerialized

Required. An object to be serialized.

useCustomSerializer Boolean. Whether to use the custom serializer or not. The default value is true. The custom serializer will be always used for XML deserialization. If false, the XML/JSON deserialization will be done using the default ColdFusion behavior. If any other type is passed with useCustomSerializer as false, then TypeNotSupportedException will be thrown.

For more information see REST Enhancements in ColdFusion 11.

Get help faster and easier

New user?