-
Notifications
You must be signed in to change notification settings - Fork 47
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
media type / content type / MIME type for Croissant (JSON-LD "profile" parameter) #792
Comments
Hi Phil, Your proposal makes sense to me. I suggest we add a small section about signposting to the next version of the Croissant spec, where we recommend using profile in this way. Would you like to send a PR for that? Best, |
Sure, I'm happy to. However, profile is more generic than Signposting so maybe the PR would have two main points:
That is, yes, I can imagine Signposting could have its own section in the spec, but perhaps we can talk about Croissant's profile in a more generic place. 🤔 |
I went ahead and made a pull request (against the future 1.1 spec) to add the media type (including the profile): I didn't add anything about Signposting. I'm not opposed to it but I don't want to shoehorn it in. |
tl;dr
Can the Croissant spec be updated to formally state that the media type for Croissant is
application/ld+json; profile="http://mlcommons.org/croissant/1.0"
(the value from"conformsTo": "http://mlcommons.org/croissant/1.0"
)?Long version
During the excellent presentation @stain gave this week on Signposting I learned that JSON-LD allows you use a "profile" parameter to help distinguish between formats that are all "application/ld+json" (such as Croissant, CodeMeta, RO-Crate, etc.).
For example, the RO-Crate docs have a section called RO-Crate JSON-LD Media type that shows the following example (note the use of "profile"):
HEAD http://example.com/ro-123/ro-crate-metadata.json HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/ld+json; profile="http://www.w3.org/ns/json-ld#flattened http://www.w3.org/ns/json-ld#compacted https://w3id.org/ro/crate"
During the call I asked what I should use for "profile" for Croissant. @benjelloun indicated I should use the value from
"conformsTo": "http://mlcommons.org/croissant/1.0"
like this:Content-Type: application/ld+json; profile="http://mlcommons.org/croissant/1.0"
This makes complete sense and I'll try it but it would be nice to see this mentioned specifically in the spec. I'm happy to create a pull request if you like!
For more on the JSON-LD "profile" parameter, here's a screenshot of some docs from https://www.w3.org/TR/json-ld/#application-ld-json
The text was updated successfully, but these errors were encountered: