Skip to content

Multiple Suggestion: Add yaml support via json-yaml equivalence, variable decorators #2

@jptalukdar

Description

@jptalukdar

Since JPL already supports json, supporting yaml shouldn't be a issue.

For example, the following json can be converted to yaml to get rid of the braces for the python folks

[
  { "let": { "name": "JSON", "times": 3 } },
  {
    "for": {
      "var": "i",
      "from": 1,
      "to": "times",
      "do": [
        { "print": { "add": ["Hello ", "name"] } }
      ]
    }
  }
]

is equivalent to

- let:
    name: JSON
    times: 3
- for:
    var: i
    from: 1
    to: times
    do:
      - print:
          add:
            - 'Hello '
            - name

If you detect a yaml, check if you can convert to a json. If not say this yaml is not supported.

secondly, there isn't any difference between a variable or a string. One suggestion would be to consider everything as a string and perform string templating either via markers such as $var_name or {{ var_name }} [Jinja style] or " { var_name } " [Java Template style]

This would make the language even more powerful

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions