Alternate versions of the vocabulary definition exist in Turtle and JSON-LD.
This document, and the associated documents in alternative formats, defines the JSON-LD Namespace. This includes URIs required for HTTP Profile and media-type profile definitions, Link relations used for locating JSON-LD context files, and a vocabulary that can be used for representing JSON-LD contexts in RDF.
For example, the following Turtle defines a subset of the terms defined in the JSON-LD vocabulary context definition:
@prefix : <http://www.w3.org/ns/json-ld> . [ a :Context :version 1.1; :definition [ a :PrefixDefinition; :term "jsonld"; :iri <http://www.w3.org/ns/json-ld#>; ], [ a :TermDefinition; :term "Context"; :iri :Context ], [ a :TermDefinition; :term "base"; :iri :base; :type "@id" ] ] .
The following are
class definitions
in the
jsonld
namespace:
Context |
Context
§
Defines term definitions and other aspects of a JSON-LD A context definition MUST be a map whose keys MUST be either terms, compact IRIs, IRIs, or one of the keywords |
PrefixDefinition |
Prefix Definition
§
A string (simple term definition), expanding to an IRI. You can read more about this feature in the JSON-LD Syntax Specification. |
TermDefinition |
Term Definition
§
A term definition is an entry in a context, where the key defines a term which may be used within a dictionary as a key, type, or elsewhere that a string is interpreted as a vocabulary item. Its value is an expanded term definition. An expanded term definition MUST be a map composed of zero or more keys from |
The following are
property definitions
in the
jsonld
namespace:
base |
base
§
If the context definition has an
|
container |
container
§
The associated If the expanded term definition contains the
If the value is If the value is
|
context |
context
§
As an IRI, this link relation is used to associate a JSON-LD context with a JSON document so that it can be interpreted as JSON-LD. In an HTTP request header, specifies the location of a context to use for compaction. As a Context, defines an inline
|
definition |
definition
§
Term definition(s) associated with this context.
|
direction |
direction
§
If the context definition has an
|
id |
id
§
The
|
import |
import
§
If the context definition contains the
|
language |
language
§
The default language is set in the context using the
|
nest |
nest
§
If the expanded term definition contains the
|
prefix |
prefix
§
With the value
|
propagate |
propagate
§
If the context definition contains the
|
protected |
protected
§
If the context definition contains the
|
reverse |
reverse
§
The
|
term |
term
§
The term associated with a term definition. You can read more about this feature in the JSON-LD Syntax Specification.
|
type |
type
§
If the context definition contains the If the expanded term definition contains the
|
version |
version
§
The processing mode defines how a JSON-LD document is processed. By default, all documents are assumed to be conformant with JSON-LD 1.1`. By defining a different version via explicit API option, other processing modes can be accessed. This specification defines extensions for the
|
vocab |
vocab
§
Used to expand properties and values in
|
The following are
instance definitions
in the
jsonld
namespace:
compacted |
compacted
§
This profile IRI is used to request or specify compacted JSON-LD document form. You can read more about this feature in the JSON-LD Syntax Specification. |
expanded |
expanded
§
This profile URI is used to request or specify expanded JSON-LD document form. You can read more about this feature in the JSON-LD Syntax Specification. |
flattened |
flattened
§
This profile URI is used to request or specify flattened JSON-LD document form. You can read more about this feature in the JSON-LD Syntax Specification. |
frame |
frame
§
As an IRI, this link relation is used to associate a JSON-LD frame with a JSON-LD document. In an HTTP request header, specifies the location of a frame to use for framing. You can read more about this feature in the JSON-LD Syntax Specification. |
framed |
framed
§
This profile URI is used to request or specify framed JSON-LD document form. You can read more about this feature in the JSON-LD Syntax Specification. |
graphContainerType |
@graph
§
If the expanded term definition contains the |
idContainerType |
@id
§
If the expanded term definition contains the |
indexContainerType |
@index
§
If the expanded term definition contains the |
languageContainerType |
@language
§
If the expanded term definition contains the |
listContainerType |
@list
§
If the expanded term definition contains the |
setContainerType |
@set
§
If the expanded term definition contains the |
streaming |
streaming
§
This profile URI is used to request or specify streaming JSON-LD document form. You can read more about this feature in the JSON-LD Syntax Specification. |
typeContainerType |
@type
§
If the expanded term definition contains the |