w3c / csvw

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

feature request: support JSON-LD context #866

Open clarkfitzg opened 5 years ago

clarkfitzg commented 5 years ago

Following discussion on the CSVW mailing list, @gkellogg suggested creating this issue.

I would like to use a custom JSON-LD context inside a CSVW metadata file. I want to do this so I can extend the schema defined by CSVW and use it for offline statistical analysis of large data sets. Suppose mymeta.org defines the vocabulary. This would let me write something like this:

{
"url": "data.csv",
"notes": [{"@context": "http://mymeta.org", "numberRows": 1e6, "randomized": true}]
}

To comply with the current specification I would write the full URI's:

{
"url": "data.csv",
"notes": [{"http://mymeta.org/terms/numberRows": 1e6, "http://mymeta.org/terms/randomized": true}]
}
Robsteranium commented 4 years ago

We'd also like to be able to extend the context with our own prefixes but it looks like the tabular metadata vocabulary explicitly forbids this for compatibility:

Properties from other vocabularies MUST be named using absolute URLs.

Forbidding the declaration of new prefixes ensures consistent processing between JSON-LD-aware and non-JSON-LD-aware processors.