Skip to content

Reverse properties in embedded nodes #40

Open
@rubensworks

Description

@rubensworks

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions