mime type for csl input data

The Zotero API can now export CSL input data for items, either directly
(‘format=csljson’) or embedded within Atom (‘content=csljson’).


We’re currently serving direct output with the MIME type
application/vnd.citationstyles.csl+json, but we should come to a
consensus on the type to use. (Note that the pprint=1 above forces
text/plain for easier display in browsers.)

I don’t have a strong preference here, but here’s a rational for

  1. “vnd.” instead of “x-” per

  2. “citationstyles” instead of “csl” for uniqueness and for consistency
    with citationstyles.org

  3. “csl+json” because it’s JSON data and because everyone calls it “CSL
    JSON” already

The argument against #3 is that application/vnd.citationstyles.csl+xml
could be used (in lieu of the current text/x-csl) for CSL styles
themselves, and one could object to having csl+json and a potential
csl+xml refer to two entirely different types of data (rather than, say,
different representations of the same data). An alternative would be
"citeproc+json", since, even though “citeproc” isn’t mentioned in the
CSL spec, it’s the prefix for all or nearly all of the existing (public)
processors that use this data. But since we rarely call it “citeproc
JSON” anywhere else, it’s a little strange to do so in the media type.


The suggested MIME type looks sensible to me. One minor note on that
example, the output
uses ‘shortTitle’ rather than ‘title-short’ as in the current schema
on github (https://github.com/citation-style-language/schema/blob/master/csl-variables.rnc)-
although this variable is not in the CSL 1.0 spec.

Is there a recommended way to include non-standardized fields and
types in CSL JSON?


We’re following the standard. shortTitle is the variable specified by the JSON draft schema (https://raw.github.com/citation-style-language/schema/master/csl-data.json).

Whether a future schema should use title-short instead is a good question, but not one that I have a strong opinion on.