in term definition, the co-occurrence of `@language` and `@type` should be an error
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 106
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
Consider the following JSON-LD
{
"@context": {
"p": {
"@id": "x:p",
"@type": "x:datatype",
"@language": "en"
}
},
"p": "foo"
}
It expands to
[
{
"x:p": [
{
"@type": "x:datatype",
"@value": "foo"
}
]
}
]
The @language is simply ignored.
This is the correct behaviour w.r.t. to the spec. Step 22 of the "Create Term Definition" algorithm explicitly instructs to ignore @language if @type is present.
I consider this as a bug in the spec. The context above makes no sense, and should be rejected with an invalid term definition error (at least, as of JSON-LD 1.2 -- we could preserve the current behaviour if mode is 1.0 or 1.1).
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 1.1 API specification's Create Term Definition algorithm, especially step 22, and compare it with the supplied expansion example. Review the open discussion before deciding the intended version-specific behavior; done means the specification and its conformance expectations consistently address the co-occurrence of @language and @type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100