Skip to content

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

Open
@pdurbin

Description

@pdurbin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions