Blank node as predicate tests
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 106
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
From https://github.com/digitalbazaar/jsonld.js/issues/498.
cc/ @pchampin @davidlehn
(the same issue is present in PyLD: https://github.com/digitalbazaar/pyld/issues/167)
Consider the following:
{
"@context": {
"t": "_:b"
},
"@type": "t:x"
}
It expands to
[
{
"@type": [
"t:x"
]
}
]
while it should expand to
[
{
"@type": [
"_:bx"
]
}
]
Indeed, step 14.2.5 of Create Term Definition clearly states:
If term contains neither a colon (:) nor a slash (/), simple term is true, and if the IRI mapping of definition is either an IRI ending with a gen-delim character, or a blank node identifier, set the prefix flag in definition to true.
(emphasis is mine)
Therefore, step 6.4 of IRI Expansion should apply.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the JSON-LD example in the issue and read the linked Create Term Definition and IRI Expansion algorithms, especially steps 14.2.5 and 6.4. Compare the current behavior with the expected expansion shown here; the work is done when blank node identifiers are handled according to those steps and the behavior is covered by the relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100