Propose to add a section "MediaType and File Extensions" to Data Package spec containing the following:
The MediaType [RFC4288] for Data Package JSON SHOULD be application/x-datapackage.
We could look also to register an official mimetype e.g.
Sounds good, and would definitely be useful for discovery. I guess if we use think in a link rel, dpm (and other tools) could point directly at the (for instance) dataset page and find the link to the package.
Is this referring to just the datapackage.json file (eg is that what the rel links would point to)? If it's the Media type for the JSON file then it probably makes more sense to use a JSON vendor media type, eg:
If it's a zip or some other resource, then a custom one would make sense, but note that x. or x- media types are frown upon.
@amercader You're right, vnd is probably more appropriate until its registered, but I'd hope that would be quick enough that it wasn't a major problem :)
Edit: Just to clarify, I'm not overly keen on vnd media types because I think the +json is unnecessary. You need to discover what vnd.datapackage is anyway to make use of it, so that +json is a bit superfluous to requirements, but I guess the world has moved on since x-something was enough.
+1 for @amercader
OK, so i guess the new proposal is:
The MediaType [RFC4288] for Data Package JSON SHOULD be application/vnd.datapackage
Question: do we add the +json. My sense is that you are not always pointing to the datapackage.json itself (e.g. you may be pointing to the directory etc). Given this we can't always add the +json - but should we add an extra line like:
If you are pointing directly to the datapackage.json file then you may add +json
Final comments please and then this will go in :-)
@rgrp am ambivalent about +json but otherwise looks good.
[dp][s]: add mimetype for Data Packages - refs #245.
OK, the change has gone in to the spec.
Final step before closing is to register this with IANA as per https://tools.ietf.org/html/rfc6838#section-3.2 - @danfowler can you look into what is required here.
@danfowler can you please update here on your research (if any) 😄
@danfowler could you please report here any findings
Here's our form: http://www.iana.org/form/media-types
Also relevant to: #289
@danfowler can you prep the info for a submission and we review.
DUPLICATE (now). Closing in favour of #333 (comment)