w3c / w3c/json-ld-api

Is the possibility of having `@id: null` in an expanded document intended?

Open
#480 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

defer-future-version ErratumRaised spec:enhancement substantive:class 4 wr:spec-updated
Dominant language
HTML
Stars
106
Forks
40
PR merge metrics
No merged PRs in 30d

Description

In the playground implementation, using a keyword-like value as @id causes the node id to explicitly expand to null. I see why it happens since it is the result of the IRI expansion. However this causes the expanded document to be an invalid JSON-LD document, since putting null for @id is forbidden.

Here is an example where the expanded output is an invalid input.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the playground implementation and the linked expanded-document example, then trace how the keyword-like @id value is handled during IRI expansion. Determine whether producing @id: null is intended and identify the expected behavior or specification change. Done means the behavior is resolved and the invalid expanded output is no longer left ambiguous.

Written by the indexing model from the issue text.

Assessment

Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.