Skip to content

Instantly share code, notes, and snippets.

@ldodds
Last active June 3, 2021 02:45
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ldodds/932e46e2459775d0ef8c3978866a745a to your computer and use it in GitHub Desktop.
Save ldodds/932e46e2459775d0ef8c3978866a745a to your computer and use it in GitHub Desktop.
Example of a simple custom JSON-LD context
{
"@context":{
"label":"http://www.w3.org/2000/01/rdf-schema#label",
"xsd":"http://www.w3.org/2001/XMLSchema#",
"ext":"http://example.org/jsonld#",
"id":"@id"
},
"ext:myCustomProperty":{
"id":"ext:myCustomProperty",
"label":"This is the label"
},
"ext:myNumericProperty":{
"id":"ext:myNumericProperty",
"label":"This is a property with a number value",
"@type":"xsd:integer"
},
"ext:myURLProperty":{
"id":"ext:myURLProperty",
"label":"This is a property with a URI value",
"@type":"@id"
}
}
{
"@context": [
"https://www.openactive.io/ns/oa.jsonld",
"https://gist.githubusercontent.com/ldodds/932e46e2459775d0ef8c3978866a745a/raw/e561eb4fba120764d6f36c0f8544cb33dd226301/custom.jsonld"
],
"type": "Event",
"ext:myCustomProperty": "foo"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment