-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Description
It might be worthwhile to simplify the JSON-LD a bit by using a more verbose context and referencing it from the json-ld. For example:
{
"@context": "http://project-open-data.github.io/context.json",
"title": "HealthData.gov Catalog Hub",
"homepage": "http://hub.healthdata.gov",
"dataset": [
{
"@id": "http://hub.healthdata.gov",
"@type": "dcat:Catalog",
"title": "HealthData.gov Catalog Hub",
"homepage": "http://hub.healthdata.gov",
"dataset": [
{
"@id": "http://hub.healthdata.gov/dataset/7ab73b9c-238d-4a41-b789-679664810d02",
"@type": "dcat:Dataset",
"title": "Nursing Home Profile",
"keyword": [
"complaint",
"enforcement",
"inspection",
"nursing homes"
],
...
}
},
},
...
]
}and then you'd serve up the context at http://project-open-data.github.io/context.json:
{
"@context": {
"title": "http://purl.org/dc/terms/title",
"homepage": "http://xmlns.com/foaf/0.1/homepage",
"dataset": "http://www.w3.org/ns/dcat#dataset",
"keyword": "http://www.w3.org/ns/dcat#keyword",
...
}
}The main advantages are:
- the JSON-LD looks more like the current JSON, with an eye towards possibly folding them together?
- implementers wouldn't need to repeat the context (perhaps incorrectly) in their own data.json files
- the JSON could be used more idiomatically from Javascript: e.g. datasets.title instead of datasets['title'].
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels