RMLio / yarrrml-parser

A YARRRML parser library and CLI in Javascript
MIT License
41 stars 17 forks source link

Union operator not picked up by parser #207

Open jpwijbenga opened 4 months ago

jpwijbenga commented 4 months ago

I'm not sure in the docs I can find the restrictions on the JSON path allowed in the subjects expression. Is union supported? Like this example?

{
  "timestamp": "2024-03-05T13:05:47.812Z",
  "updates": [
    {
      "after": {
        "id": 123
      },
      "before": {
        "id": 456
      }
    },
    {
      "after": {
        "id": 123
      },
      "before": {
        "id": 456
      }
    },
    {
      "after": {
        "id": 123
      },
      "before": {
        "id": 456
      }
    }
  ]
}
prefixes:
 ex: "http://example.com/"

mappings:
  person:
    sources:
      - ['data.json~jsonpath', '$.updates[*].before,after']
    s: http://example.com/$(id)
    po:
      - [a, foaf:Person]

Issue type: :bug: Bug

Description

Is the docs missing restrictions on json path allowed or am I doing something wrong?

Steps

See example code. Tested json path with online tool at jsonpath.com

Environment

Online Matey / yarrrml parser v1.6.1