The main config.json should be able to include other config files on initial parse. This would allow:
- large module configs to be self-contained
- easier sharing of example configs
- easier config templating --
cp template.json module_instance.json
On the other hand, it would make config editing by hand a bit more tedious, since now configs will be split up from one central location. Also, writing back to configs will have to be overhauled slightly to support this, and not stomp over the include directive.
Suggestion on how to implement:
As a key:
{
"include": "foo:bar.json"
}
would resolve to:
{
"foo":{...bar.json...}
}
As a value:
{
"foo":"include:bar.json"
}
would resolve to:
{
"foo":{...bar.json...}
}
The former is easiest to implement, and probably the cleanest. However, the latter may be needed in the event a config blob needs to be loaded as part of a list, e.g. "foo": ["include:bar.json", "include:baz.json"]
The main
config.jsonshould be able to include other config files on initial parse. This would allow:cp template.json module_instance.jsonOn the other hand, it would make config editing by hand a bit more tedious, since now configs will be split up from one central location. Also, writing back to configs will have to be overhauled slightly to support this, and not stomp over the
includedirective.Suggestion on how to implement:
As a key:
As a value:
The former is easiest to implement, and probably the cleanest. However, the latter may be needed in the event a config blob needs to be loaded as part of a list, e.g.
"foo": ["include:bar.json", "include:baz.json"]