我正在尝试编写一个基于一组JSON配置文件来配置自身的系统。我有一些特定于某些流程的配置选项,但有些配置选项对所有流程都是通用的。有没有办法让我将一个通用的JSON配置文件包含在更具体的配置文件中。例如:
Common.json
# Common example
{
"log-level" : "debug",
"version" : "1.21"
}
Specific.json
# Specific example
# include <common.json> ????
{
"config" : {
"process" : "distro-center"
"id" : "12-3"
"log-path" : "/var/log/blah"
}
}
因此生成的JSON实际上是
{
"log-level" : "debug",
"version" : "1.21"
"config" : {
"process" : "distro-center"
"id" : "12-3"
"log-path" : "/var/log/blah"
}
}
想法?