I/O API¶
Module-level JSON-LD and RDF import/export. Preferred over OntoModel instance methods for new code.
For behavioral contract and stability tiers, see SPECS.md.
Module functions¶
ontosql.io.to_jsonld ¶
Export a semantic instance as a JSON-LD document dict.
ontosql.io.to_rdf ¶
to_rdf(instance: OntoModel, *, format: str = 'turtle', registry: PrefixRegistry | None = None) -> str
Export a semantic instance as an RDF serialization string.
ontosql.io.from_jsonld ¶
from_jsonld(entity_type: type[OntoModel], doc: dict[str, Any], *, mapper: type[Any], registry: PrefixRegistry | None = None) -> OntoModel
Hydrate an instance from a JSON-LD document using a mapper.
Related¶
- Export API — lower-level
instance_to_*helpers - Import API — RDF/JSON-LD hydration
- Upgrading — SOLID refactor