Building Blocks defining JSON schemas can be annotated with JSON-LD contexts using either:
- including a file (context.jsonld) in the building block directory
- using the property
x-jsonld-context
in the _schema.(yaml/json) for the building block - e.g.x-jsonld-context: ../../../sosa-ssn.jsonld
The JSON LD context:
- Maps JSON elements to URIs (which can be URIs of a richer semantic model)
- Allows validation of complex logical constraints using SHACL Rules to validate examples
- Perform transforms to any other RDF model and validate results
JSON-LD contexts are very complex and hard to debug if the schema is at all complex.
The Building Blocks design allows automatic combination of contexts based on the schema re-use patterns.
_TBD: document local contexts and use of @base mappings. _