Using jsonnet

Jsonnet is a data templating language to generate config data.

It avoids duplications using object orientation.

E.g. eg.jsonnet

{
  person: {
    name: "Default",
    welcome: "Hello " + self.name + "!",
  },
  person_bob: self.person { name: "Bob", welcome: 'Hi ' + self.name },
}

output.json

{
  "person": {
    "name": "Default",
    "welcome": "Hello Default!"
  },
  "person_bob": {
    "name": "Bob",
    "welcome": "Hi Bob"
  }
}