Examples

Example configuration snippets

Demo configuration with inclusion and expansion

Assume the following directories/files:

/
+ server/
  + config/
    + config.json
    + includes/
      + globals.json
      + modules/
        + mod01.json
        + mod02.json
+ demo/
  + file01
  + file02  
config/config.json
{
    "globals": "@include:includes/globals.json",
    "modules": "@include:includes/modules"
}
config/includes/globals.json
{
    "demo_dir": "/demo"
}

When inclusion and expansion is performed, config.json will have the following content:

Note that:

  • globals.json include was expanded to an object

  • modules include was expanded to an array containing each of the JSON files in the directory as elements

  • all expansion expressions (${globals.demo_dir}) are replaced with the property value ("/demo")