Vladimir Alexiev, Ontotext
2022-10-28, Ontotext Last Friday
Links:
jsonld-js, often used for testingLinks are to latest editor drafts:
Map JSON to RDF and back in flexible ways:
Link header)@id, or blank if nonerdf:type is field @type, can be array@base@set, default) or rdf:List (@list)@nest extra fixed JSON props on RDF serialization, or omit JSON props on parsing@container)"url": "@id", "a": "@type", "lang": "@language"So what to do if a more complex transformation is needed?

See epcis-context.jsonld or my epcis-context-simple.jsonld.
Field type means different RDF props depending on context:
sourceList it’s epcis:sourceOrDestinationType (eg cbv:SDT-possessing_party)bizTransactionList it’s epcis:bizTransactionList (eg cbv:BTT-bol)sensorReport it’s epcis:measurementType (eg gs1:AbsoluteHumidity) "@context": {
"type": "@type",
"sourceList": {
"@id": "epcis:sourceList",
"@context": [
"possessing_party": "cbv:SDT-possessing_party", ...
"type": {
"@id": "epcis:sourceOrDestinationType",
"bizTransactionList": {
"@id": "epcis:bizTransactionList",
"@context": [
"bol": "cbv:BTT-bol", ...
"type": {
"@id": "epcis:bizTransactionType",
"sensorElementList": {
"@id": "epcis:sensorElementList",
"sensorReport": {
"@id": "epcis:sensorReport",
"@context": {
"type": {
"@context": {
"AbsoluteHumidity": "gs1:AbsoluteHumidity", ...
"@id": "epcis:measurementType",
Can you spot a bug above?


Examples:
Eg https://jsld.org: use cases building on JSON-LD by transmute.industries
Compared to JSON-LD 1.0, 1.1 has many advanced features:
… too numerous to list all.
Best feature of W3C specs: accompanied by Implementation Reports

jsonld-java (rdf4j#3654)
jsonld-java!xsd!date 2022-10-28 -> datatypesSo I started thinking about YAML-LD: w3c/json-ld-syntax#389
dc:date: !xsd!date 2022-05-18 # short form
dc:date: # subfields (long form)
@type: xsd:date
@value: 2022-05-18
$ instead of @: more dev-friendly "@context":
"@sigil": $
$base: http://example.org/resource/
$vocab: http://example.org/ontology/
$graph:
$id: bart
spouse: marge
{$id: bob, age: 42}: {certainty: 0.8} # very natural!
$id: bob
age:
$value: 42
$annotation: # new keyword (long form)
certainty: 0.8
For efficient RDF modeling, you need to define multiple related artefacts:
Efforts to marry JSON Schema with JSON-LD contexts have been undertaken in:
Many are YAML-based: