W3C home > Mailing lists > Public > public-csv-wg@w3.org > June 2015

(Admin) Re: application/csvm+json magic number [was Re: .well-known]

From: Ivan Herman <ivan@w3.org>
Date: Sat, 20 Jun 2015 08:07:09 +0200
Cc: Gregg Kellogg <gregg@greggkellogg.net>, W3C CSV on the Web Working Group <public-csv-wg@w3.org>
Message-Id: <59DC236D-F41C-494D-B1EB-5A9DEE1C304B@w3.org>
To: David Booth <david@dbooth.org>

could you add this as a comment on the github issue list:


We register and work through all the comments using github, it helps us a lot in organizing our own work



> On 20 Jun 2015, at 24:44 , David Booth <david@dbooth.org> wrote:
> On 06/19/2015 04:19 PM, Gregg Kellogg wrote:
>>> On Jun 19, 2015, at 12:17 PM, David Booth <david@dbooth.org>
>>> wrote:
>>> A technical question: does a CSVW metadata file supposed to contain
>>> a particular string -- a 'magic number' perhaps -- that identifies
>>> it as being a CSVW file?   If the metadata file is discovered first
>>> -- such as through a web search -- then this would help prevent a
>>> non-CSVW JSON file that just happens to look like a CSVW metadata
>>> file from being erroneously interpreted as a CSVW metadata file.
>> The IANA registration shows no Magic Number, but valid metadata
>> documents MUST have the context "http://www.w3.org/ns/csvw, which
>> will typically (although not necessarily) appear at the beginning of
>> the document. In fact, this is what my JSON-LD processor looks to to
>> not treat it as JSON-LD, but as Tabular Metadata.
> I think this is important to note in the IANA registration.  I would suggest adding something like the following:
> http://w3c.github.io/csvw/metadata/#iana-considerations
> [[
> Magic number(s):
>    An application/csvm+json document MUST contain a JSON property named "@context" whose value is either the string "http://www.w3.org/ns/csvw" or a JSON array whose first element is the string "http://www.w3.org/ns/csvw".  For parsers that are not JSON-aware, this means that an application/csvm+json document MUST contain the following two strings (including quotes), in order, separated by at least one character (not necessarily whitespace), somewhere in the document though usually near the beginning:
>        "@context"
>        "http://www.w3.org/ns/csvw"
> Thanks,
> David Booth
>> Gregg
>>> I did not find the answer to this question when I looked in the
>>> spec, but maybe I looked in the wrong place.
>>> Thanks, David Booth

Ivan Herman, W3C
Digital Publishing Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
ORCID ID: http://orcid.org/0000-0003-0782-2704

Received on Saturday, 20 June 2015 06:07:19 UTC

This archive was generated by hypermail 2.3.1 : Saturday, 20 June 2015 06:07:20 UTC