yamlDeserializeFile

Reads a YAML file from disk and parses it into native CFML values (structs, arrays, numbers, booleans, strings and null).

yamlDeserializeFile(filePath [, charset]) → returns any

This function requires RustCFML.  Not supported on Lucee, Adobe ColdFusion, etc.

Argument Reference

filePath string
Required

Path to the YAML file to read and parse.

charset string
Default: utf8

Character encoding used to read the file (accepted for compatibility; files are read as UTF-8).

Examples
Sample code invoking the yamlDeserializeFile function

Reads and parses the YAML file in one call.

data = yamlDeserializeFile(expandPath("./config.yaml"));

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub