Compaction of IRIs with "@list" @container for sets of @list
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 106
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
Compacting this document:
{
"http://schema.org/prop": [
{
"@list": ["foo", "bar"]
},
{
"@list": ["baz", "qux"]
}
]
}
with this context:
{
"prop": {
"@id": "http://schema.org/prop",
"@container": "@list"
}
}
produces this new document:
{
"@context": {
"prop": {
"@id": "http://schema.org/prop",
"@container": "@list"
}
},
"prop": [
"baz",
"qux"
]
}
which is missing the first of the two lists.
(Tested with the JSON-LD playground , PyLD, and the ruby-ld gem)
As far as I can tell, this is caused by step 12.8.7.3 of the compaction algorithm, which sets 'item active property' first to ["foo", "bar"] then to ["baz", "qux"] causing the first value to be overwritten, and lost from the compacted document.
Is this an expected consequence of the algorithm specification?
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
The issue names step 12.8.7.3 of the JSON-LD 1.1 compaction algorithm but no repository files or tests. Start by reproducing the two-list example in the JSON-LD playground, PyLD, and the ruby-ld gem, then compare the algorithm's handling of repeated @list values. Done means the specification's expected behavior and any required conformance coverage are clearly established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100