Skip to main content

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
PropertyTypeDefaultDescription
contextStringrequiredContext to be parsed
optionsObjectSee the library doc for available options.
Return

The parsed context

validate

Validate a given context

Parameters
PropertyTypeDefaultDescription
contextStringrequiredContext to be validated
Return

True if the context is valid.