w3c / w3c/json-ld-syntax

bug in example-http-request-with-profile-requesting-a-compacted-document-with-a-reference-to-a-compaction-context

Open
#402 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Editorial ErratumRaised
Dominant language
HTML
Stars
139
Forks
23
PR merge metrics
No merged PRs in 30d

Description

EXAMPLE 168: HTTP Request with profile requesting a compacted document with a reference to a compaction context

GET /ordinary-json-document.json HTTP/1.1
Host: example.com
Accept: application/ld+json;profile="http://www.w3.org/ns/json-ld#flattened http://www.w3.org/ns/json-ld#compacted"

Requests the server to return the requested resource as JSON-LD in both compacted document form and flattened document form.

"reference to a compaction context" is missing from the example.
If we look at https://w3c.github.io/json-ld-syntax/#interpreting-json-as-json-ld, perhaps adding a Link header is needed.

GET /ordinary-json-document.json HTTP/1.1
Host: example.com
Link: <https://json-ld.org/contexts/person.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
Accept: application/ld+json;profile="http://www.w3.org/ns/json-ld#flattened http://www.w3.org/ns/json-ld#compacted"

But is this allowed in a Request?

And you should add to the description:

Also requests a specific compaction context to be used, through the "Link" header 
as described in section <a href="#interpreting-json-as-json-ld">6.1 Interpreting JSON as JSON-LD</a>

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 Example 168 in the JSON-LD syntax specification and read section 6.1, “Interpreting JSON as JSON-LD,” including its guidance on Link headers. Confirm whether a request may include the proposed compaction-context Link header, then update the example and description so the referenced compaction context is represented accurately.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.