Skip to content

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

@mlorbetske

Description

@mlorbetske

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions