For the complete documentation index, see llms.txt. This page is also available as Markdown.

tomlDeserializeFile

Read and parse a TOML file into a BoxLang struct

Reads a TOML file and parses it into a BoxLang struct.

Method Signature

tomlDeserializeFile( path [, charset] [, options] )

Arguments

Argument
Type
Required
Description
Default

path

string

true

The path to the TOML file to parse.

charset

string

false

The charset used to read the file.

The system default charset

options

struct

false

Per-call settings that override the module configuration. Deserialization options are specVersion and ordered.

{}

Returns

A BoxLang struct containing the parsed TOML data.

Examples

Read a TOML file

config = tomlDeserializeFile( "config/app.toml" )
writeOutput( config.database.host )

Specify a file charset

Override parser options

Last updated

Was this helpful?