Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON-LD serialization and media type #151

Closed
philarcher opened this issue Jan 5, 2021 · 6 comments
Closed

JSON-LD serialization and media type #151

philarcher opened this issue Jan 5, 2021 · 6 comments
Assignees
Labels

Comments

@philarcher
Copy link

In our (GS1's) implementation of linkset (not yet complete but coming along nicely), we're using conneg to go between linkset and linkset+json. Actually, whether you ask for application/linkset+json or just application/json won't matter as we only have one JSON format and it's linkset.

But we're Linked Data people so we'll also include the HTTP Link Header pointing to a JSON-LD context file (ours is currently at https://www.gs1.org/gs1-digital-link/artifacts/dl-resolver-context.jsonld but might move). You'll get that HTTP link header whether you ask for it or not.

What we'd really like though is to be able to request the linkset as JSON-LD with the context file in the file itself. That suggests we'd need a media type of application/linkset+ld+json.

If others agree that this is a desired feature then you'll notice the two + symbols. Which is a problem. The good news is that others have the same issue. Amy Guy (@rhiaro) has drafted https://rhiaro.github.io/draft-w3cdidwg-media-types-with-multiple-suffixes/ on this topic and it's being discussed over at https://mailarchive.ietf.org/arch/msg/media-types/tXyxl2ZvKuZIArOAoZW5u43sOxA/.

Do others want to see application/linkset+ld+json as a media type?

@hvdsomp
Copy link
Collaborator

hvdsomp commented Jan 5, 2021 via email

@philarcher
Copy link
Author

That's the fallback if two + symbols aren't allowed, yes.

@hvdsomp
Copy link
Collaborator

hvdsomp commented Jan 5, 2021 via email

@dret
Copy link
Owner

dret commented Jan 5, 2021 via email

@dret dret added the linkset label Jan 5, 2021
@asbjornu
Copy link

asbjornu commented Jan 5, 2021

Do others want to see application/linkset+ld+json as a media type?

That looks very unorthodox to me. I'm not a JSON-LD expert, but I haven't seen any other media type than application/ld+json used for it. The "profile" of a JSON-LD document is specified in its @context, either inline or via the HTTP Link header. I suppose adding a profile URI to further clarify the flavour of JSON-LD we're dealing with is fine as a hint for those that won't parse the content as linked data (RDF).

@richsalz
Copy link

Please use ietf-wg-httpapi/linkset#1 now.

@dret dret closed this as completed Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants