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

Create conditionally valued symbols/allow sourcing symbol values from other places #62

Open
mlorbetske opened this issue Aug 9, 2016 · 0 comments
Assignees
Milestone

Comments

@mlorbetske
Copy link
Member

mlorbetske commented Aug 9, 2016

Allow a constant symbol to be defined (and available for replacement) such that its value depends on the value of another symbol

ex.

"a": {
    "type": "conditional",
    "when": [
        {
            "condition": "(foo == \"bar\")",
            "value": "baz"
        }
    ],
    "default": "quux"
}

The values that are used should also be able to be expressed as references to other documents or document fragments (being able to pick out an element in another JSON file).

Update after discussing this one, it looks like we should pursue the notion of "resources" that are able to fetch and model a document and a new type of symbol that is capable of extracting a value from a resource. Resources would be able to depend on symbols (supporting multistage fetching of information), this may add some complication to resolution ordering.

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