Introduction¶
OO-LD Schema aims to connect the structural modelling of objects and subobjects with the modelling of the semantic relations without reinventing the wheel. It therefore combines existing standards, primarily JSON Schema and a JSON-LD context in the same document.
Why OO-LD?
- OO-LD schema documents are supported by a wide range of existing tools (all JSON Schema and JSON-LD tooling!)
- OO-LD schema documents themselves follow linked data principles to make them retrievable over the web to allow flexible schema compositions
- OO-LD schemas allow generic ex- and import of RDF
- OO-LD schemas are compatible with LLM APIs
- OO-LD schemas can be used as function (dataclasses) and API signatures (OpenAPI)
- OO-LD schemas can be used to define graphical user interfaces, in particular forms
JSON, JSON Schema and JSON-LD technology stack with OpenSemanticLab as example document store / platform
New to OO-LD? Head to Get Started for a first hands-on example, then work through the Guide.
!!! note "Guide vs. Specification"
This site is the didactic, example-driven guide (primer). The normative, W3C-style Specification defines the conformance requirements (MUST/SHOULD) with defined terms and references. The two are cross-linked: use the guide to learn, the specification to cite.
Fundamentals¶
Design Goals and Rationale¶
Compatibility¶
An OO-LD document is always a valid JSON document. This ensures that all the standard JSON libraries work seamlessly with OO-LD documents.
An OO-LD instance document is always a valid JSON-LD document. This ensures that all the standard JSON-LD libraries work seamlessly with OO-LD instance documents.
An OO-LD schema document is always both a valid JSON Schema document and JSON-LD remote context. This ensures that all the standard JSON Schema and JSON-LD libraries work seamlessly with OO-LD schema documents.
Expressiveness¶
An OO-LD schema document allows the developer to express the syntax of a JSON instance document side by side with its semantics in a single source.
In addition, syntactical and semantic definitions can also be applied to external JSON instance documents that reference OO-LD schema documents.
This allows to specify well-defined patterns in a directed graph and enables tools relying on a hierarchical object structure to produce data for and consume data from such a graph.
Interoperability¶
OO-LD schema documents allow to specify all information that is needed to automatically transform data between semantically equivalent but syntactically different notations.
Related Work¶
OO-LD as bridge between linked data and the general software domain
A detailed comparison with related schema languages and data models (OWL, SHACL, Asset Administration Shell, SAMM, LinkML, dlite, NOMAD, and more) is collected in the Reference ยป Related Work table.