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

Reverse properties in embedded nodes #40

Open
rubensworks opened this issue Jan 27, 2023 · 1 comment
Open

Reverse properties in embedded nodes #40

rubensworks opened this issue Jan 27, 2023 · 1 comment

Comments

@rubensworks
Copy link
Contributor

The current spec says that

An embedded node MUST NOT, itself, use a reverse property.

I am wondering why this behaviour was chosen?

It seems reasonable to me to explicitly allow this behaviour.

For example, the following snippet would produce the following when applying the toRdf algorithm:

{
  "@context": {
    "rel": {"@reverse": "ex:rel"}
  },
  "@id": {
    "@id": "ex:rei",
    "rel": {"@id": "ex:value"}
  },
  "ex:prop": "value2"
}
<<ex:value ex:rel ex:rei>> ex:prop "value2".

As illustration, I have implemented this behaviour into jsonld-streaming-parser.js behind the rdfstarReverseInEmbedded flag.

@gkellogg
Copy link
Member

I'm afraid that the motivation is lost in the past, but IIRC, it led to some implementation challenges. Certainly can be re-visited.

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

2 participants