Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ref value support #124

Open
asnir opened this issue Nov 19, 2014 · 3 comments
Open

Add ref value support #124

asnir opened this issue Nov 19, 2014 · 3 comments

Comments

@asnir
Copy link

asnir commented Nov 19, 2014

Is there any way that I can use reference value? In order to reduce the number of lines at the config file.
At the example bellow, I would like to create a new entry named: common which will contain the db section.

{
  "serviceX": {
    "param1": "val1",
    "param2": "val2",
    "db": {
      "connection": {
        "host": "",
        "port": "",
        "schema": "",
        "username": "",
        "password": ""
      }
    },
    "param3": "val3",
    "param42": "val4",
    "param5": "val5"
  },
    "serviceY": {
    "param1": "val89",
    "param2": "val23",
    "db": {
      "connection": {
        "host": "",
        "port": "",
        "schema": "",
        "username": "",
        "password": ""
      }
    },
    "param32": "val2",
    "param42": "val43"
  }
}
@indexzero
Copy link
Owner

@asnir not sure I understand you.

@asnir
Copy link
Author

asnir commented Nov 30, 2014

The result will be something like that:

{
  "serviceX": {
    "param1": "val1",
    "param2": "val2",
    "db": {
      "@ref": "common.db"
    },
    "param3": "val3",
    "param42": "val4",
    "param5": "val5"
  },
  "serviceY": {
    "param1": "val89",
    "param2": "val23",
    "db": {
      "@ref": "common.db"
    },
    "param32": "val2",
    "param42": "val43"
  },
  "common": {
    "db": {
      "connection": {
        "host": "",
        "port": "",
        "schema": "",
        "username": "",
        "password": ""
      }
    }
  }
}

@indexzero
Copy link
Owner

No, but a PR would be welcome for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants