W3C home > Mailing lists > Public > public-csv-wg@w3.org > February 2014

Re: CSV-LD proposal

From: Alf Eaton <eaton.alf@gmail.com>
Date: Wed, 12 Feb 2014 17:28:00 +0000
Message-ID: <CAJVrAaRimrR8Kw=JTP_bK0OPh6xosV7oAFy=jFKjhoN+iJs3Jg@mail.gmail.com>
To: "public-csv-wg@w3.org" <public-csv-wg@w3.org>
I've been having a go at writing a PHP class that will read a JSON
description file and use it to extract linked data from a CSV file.

The JSON description file a) describes how to parse the CSV file, and
b) links to a JSON-LD context document that describes how to map the
column names to URIs.

Example description file:
Example context document:

It's not finished yet (or documented), but has been useful for
experimenting with ideas for the description file, so I thought I'd
post it to the list.

The idea is to get to the point where any CSV file can be parsed
successfully using just the declarative information in the description
file. Perhaps the conversion of field names to URIs using the context
document should be moved out into a separate step with a dedicated
JSON-LD parser, I'm not sure.

It's similar to the Simple Data Format, except that SDF has its own
schema/fields definition section rather than pointing to a separate
JSON-LD context document. It might be possible to merge the two
together, and maybe in fact there will still be some field-specific
parsing instructions (e.g. the format of date fields) that need a
separate schema definition…


On 1 February 2014 01:52, Gregg Kellogg <gregg@greggkellogg.net> wrote:
> I added a proposal for something I call CSV-LD to the wiki [1]. As the name might suggest, this is strongly tied to JSON-LD, and uses JSON-LD context and frame definitions to both provide meaning to CSV, allowing it to be losslessly transformed to JSON-LD, or to create CSV from JSON-LD (with or without embedding).
> Consider this a straw-man proposal. It does lay out some use cases that are generally useful (and perhaps should be copied to other pages on the wiki), but there may be more use cases to consider. IMO, creating a specification for this, and extending an existing JSON-LD implementation to support this would not be too difficult.
> Gregg Kellogg
> gregg@greggkellogg.net
> [1] https://www.w3.org/2013/csvw/wiki/CSV-LD
Received on Wednesday, 12 February 2014 17:28:47 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:21:38 UTC