configTranslate()
translate an old Lucee XML configuration to the new JSON configuration
Introduced: 6.0.0.460
configTranslate( source=string, target=string, type=string, mode=string, charset=string );
Returns: Struct
| Argument | Description | Default |
|---|---|---|
|
source
string,
required
|
edit
Path to the Lucee XML file (lucee-server.xml or lucee-web.xml.cfm) file or the data itself as a String. Alias: data, input |
|
|
target
string,
optional
|
edit
Path to the new Alias: output |
|
|
type
string,
optional
|
edit
Config Context to manipulate, server or web context. |
server |
|
mode
string,
optional
|
edit
Only used when type is set to [server], should be the resulting json set for single or multi mode. |
|
|
charset
string,
optional
|
edit
charset to use to read the XML file, if not defined, Lucee will use the default resource charset. |
Examples
edit//Translate Lucee Server XML configuration to .CFConfig JSON format
configResult = configTranslate(
source = "C:/lucee_old/tomcat/lucee-server/context/lucee-server.xml.cfm",
target = "C:/lucee_new/tomcat/lucee-server/context/.CFConfig.json",
type = "server",
mode = "single"
);
writeDump(configResult);
See also
- Lucee Server related Tags, Functions and Guides
- Configuration - CFConfig.json
- ConfigImport()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)