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

Allow aliases to be resolve in prop meta data #172

Closed
trazek opened this issue Nov 9, 2018 · 1 comment
Closed

Allow aliases to be resolve in prop meta data #172

trazek opened this issue Nov 9, 2018 · 1 comment

Comments

@trazek
Copy link
Contributor

trazek commented Nov 9, 2018

Given the following data file:

{
  "global": {
    "type": "test",
    "category": "test"
  },
  "aliases": {
    "TEST_1": "EEEEE",
    "TEST_2": "DDDDD",
    "TEST_3": "FFFFF",
    "META_1": "AAAAA",
    "META_2": "ZZZZZ"
  },
  "props": {
    "test1": {
      "value": "{!TEST_1}"
    },
    "test2": {
      "value": {
        "nested": "{!TEST_2}",
        "deep": {
          "deep_value": "{!TEST_3}"
        }
      },
      "meta": {
        "meta_1": "{!META_1}",
        "meta_root": {
          "meta_2": "{!META_2}"
        }
      }
    }
  }
}

Allow aliases to be resolved in meta data, resulting in the following raw file:

{
  "aliases": {
    "TEST_1": {
      "value": "EEEEE"
    },
    "TEST_2": {
      "value": "DDDDD"
    },
    "TEST_3": {
      "value": "FFFFF"
    },
    "META_1": {
      "value": "AAAAA"
    },
    "META_2": {
      "value": "ZZZZZ"
    }
  },
  "props": {
    "test1": {
      "type": "test",
      "category": "test",
      "value": {
        "type": "test",
        "category": "test",
        "value": "EEEEE",
        "originalValue": "{!TEST_1}",
        "name": "test1"
      },
      "originalValue": "{!TEST_1}",
      "name": "test1"
    },
    "test2": {
      "type": "test",
      "category": "test",
      "value": {
        "type": "test",
        "category": "test",
        "value": {
          "nested": "DDDDD",
          "deep": {
            "deep_value": "FFFFF"
          }
        },
        "meta": {
          "meta_1": "AAAAA",
          "meta_root": {
            "meta_2": "ZZZZZ"
          }
        },
        "originalValue": {
          "nested": "{!TEST_2}",
          "deep": {
            "deep_value": "{!TEST_3}"
          }
        },
        "name": "test2"
      },
      "name": "test2",
      "originalValue": {
        "nested": "{!TEST_2}",
        "deep": {
          "deep_value": "{!TEST_3}"
        }
      }
    }
  }
}
@trazek
Copy link
Contributor Author

trazek commented Nov 9, 2018

I have created a pull request for this: #173

@trazek trazek closed this as completed Dec 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant