Compact an IRI to its short identifier
the IRI to compact
whether to compact according to the vocab (or otherwise the base)
Expand an identifier to its full IRI
the identifier to expand
whether to expand according to the vocab (or otherwise the base)
Obtain additional information about a given context key
context entry key
expanded term definition key
Generated using TypeDoc. Delivered by Vercel. @m-ld/m-ld - v0.10.0 Source code licensed MIT. Privacy policy
In m-ld, all API interactions are done 'in context'. All identifiers of significant data entities, including Subjects, properties and types are actually IRIs, but in an API call they may appear to be simple strings.
The default context for API calls in m-ld (if not overridden in the config), uses the provided domain name to scope all identifiers, as follows:
http://≪domain≫/
(the so-called "base" of the domain)http://≪domain≫/#
(note the extra hash; this is the so-called "vocabulary", or "vocab" of the domain)A
MeldContext
allows an application to translate between simple strings and IRIs. This is typically only necessary in advanced use-cases, such as when creating constraints.https://www.w3.org/TR/json-ld/#the-context