JsonLdContextService
This service allows you to do manage JSON-LD contexts.
Actions
The following service actions are available:
get
Get a context which combines all contexts of the registered ontologies.
Return
The combined context
getLocal
Get the local context, which combines a parsed version of all the registered ontologies, except those with preserveContextUri: true
.
Return
The local context
parse
Parse a JSON-LD context using the jsonld-context-parser library.
Parameters
Property | Type | Default | Description |
---|---|---|---|
context | String | required | Context to be parsed |
options | Object | See the library doc for available options. |
Return
The parsed context
validate
Validate a given context
Parameters
Property | Type | Default | Description |
---|---|---|---|
context | String | required | Context to be validated |
Return
True if the context is valid.