Conversion Functions

namedescription
arrayToListConverts a one-dimensional array to a list.
binaryDecodeConverts a string to a binary object. Used to convert binary data that has been encoded into string format back into binary data.
binaryEncodeConverts binary data to a string.
charsetDecodeConverts a string to a binary representation.
charsetEncodeUses the specified encoding to convert binary data to a string.
deserializeJSONConverts a JSON (JavaScript Object Notation) string data representation into CFML data, such as a CFML structure or array.
hashConverts a variable-length string to a fixed-length string that can act as a “fingerprint” or unique identifier for the original string. It is not possible to convert the hash result back to the source string.
isJSONEvaluates whether a string is in valid JSON (JavaScript Object Notation) data interchange format.
listToArrayCopies the elements of a list to an array.
serializeJSONConverts ColdFusion data into a JSON (JavaScript Object Notation) representation of the data.
toBase64Calculates the Base64 representation of a string or binary object. The Base64 format uses printable characters, allowing binary data to be sent in forms and e-mail, and stored in a database or file.
toBinaryCalculates the binary representation of Base64-encoded data or of a PDF document.
toScriptCreates a JavaScript or ActionScript expression that assigns the value of a ColdFusion variable to a JavaScript or ActionScript variable. This function can convert ColdFusion strings, numbers, arrays, structures, and queries to JavaScript or ActionScript syntax that defines equivalent variables and values.
toStringConverts a value to a string.
uRLDecodeDecodes a URL-encoded string.
uRLEncodedFormatGenerates a URL-encoded string. For example, it replaces spaces with %20, and non-alphanumeric characters with equivalent hexadecimal escape sequences. Passes arbitrary strings within a URL (ColdFusion automatically decodes URL parameters that are passed to a page).
valConverts numeric characters that occur at the beginning of a string to a number.
xmlParseConverts XML text into an XML document object.
xmlTransformApplies an Extensible Stylesheet Language Transformation (XSLT) to XML. The XML can be in string format or an XML document object.