w3c / csvw

Documents produced by the CSV on the Web Working Group
Other
161 stars 57 forks source link

Examples 41-48 suggest tableSchema can have array content #855

Open mgoodhand opened 6 years ago

mgoodhand commented 6 years ago

Section 6.1 of "Metadata Vocabulary for Tabular Data" has a number of examples that suggest tableSchema can have array content, e.g.

{
  "@context": { "http://www.w3.org/ns/csvw", { "@language": "en" } },
  "@type": "Table",
  "url": "http://example.com/table.csv",
  "tableSchema": [...],
  "dc:title": "The title of this Table"
}

https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#h-normalization-examples

The ellipses are clear enough, but I'd expect them to appear in an object (curly braces) rather than an array (square brackets), e.g.

{
  "@context": { "http://www.w3.org/ns/csvw", { "@language": "en" } },
  "@type": "Table",
  "url": "http://example.com/table.csv",
  "tableSchema": {...},
  "dc:title": "The title of this Table"
}
gkellogg commented 6 years ago

It's not incorrect to use [...], but as tableSchema is single valued, it is probably better to use an object form. This also fixes a use in csv2json.

iherman commented 6 years ago

Summary: (by @gkellogg) "It's not incorrect to use [...], but as tableSchema is single valued, it is probably better to use an object form. This also fixes a use in csv2json.". A separate PR (#857) is on file.

mgoodhand commented 6 years ago

Thanks for the prompt review and fix.