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

media type / content type / MIME type for Croissant (JSON-LD "profile" parameter) #792

Open
pdurbin opened this issue Jan 10, 2025 · 0 comments

Comments

@pdurbin
Copy link
Member

pdurbin commented Jan 10, 2025

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

Screenshot 2025-01-10 at 3 47 13 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant