From 33c503ab656ec8291fa5211a57f59479f27170b9 Mon Sep 17 00:00:00 2001
From: Gregg Kellogg application/ld+json
It is RECOMMENDED that profile URIs are dereferenceable and provide
useful documentation at that URI. For more information and background
please refer to [[RFC6906]].
This specification defines three values for the profile
parameter.
- To request or specify expanded JSON-LD document form,
- the URI http://www.w3.org/ns/json-ld#expanded
SHOULD be used.
- To request or specify compacted JSON-LD document form,
- the URI http://www.w3.org/ns/json-ld#compacted
SHOULD be used.
- To request or specify flattened JSON-LD document form,
- the URI http://www.w3.org/ns/json-ld#flattened
SHOULD be used.
- Please note that, according [[HTTP11]], the value of the profile
- parameter has to be enclosed in quotes ("
) because it contains
- special characters and, if multiple profiles are combined, whitespace.
This specification defines four values for the profile
parameter.
http://www.w3.org/ns/json-ld#expanded
http://www.w3.org/ns/json-ld#compacted
http://www.w3.org/ns/json-ld#flattened
http://www.w3.org/ns/json-ld#framed
+ When used as a media type paramter [[RFC2048]]
+ in an HTTP Accept header [[RFC7231]],
+ the value of the profile
parameter MUST be enclosed in quotes ("
) if it contains
+ special characters such as whitespace, when multiple profiles are combined.
In addition to the profile
values described above,
+ the profile
parameter MAY include one additional URL, which is interpreted as
+ the location of either a context or frame, depending on the other profile
+ parameters included. When used without an defined profile URI, such a URL
+ is interpreted as the location of a context.
JSON-LD processors MAY place restrictions on supported profiles, + MAY provide defaults for context and frame URLs, + and MAY restrict client-provided URLs for contexts and frames.
When processing the "profile" media type parameter, it is important to note that its value contains one or more URIs and not IRIs. In some cases it might therefore be necessary to convert between IRIs and URIs as specified in @@ -10488,9 +10502,9 @@
Since JSON-LD is intended to be a pure data exchange format for
directed graphs, the serialization SHOULD NOT be passed through a
code execution mechanism such as JavaScript's eval()
From f6ea3ebb9398d64b58023ae0313e4371fc810247 Mon Sep 17 00:00:00 2001
From: Gregg Kellogg The Context
either be a simple string, mapping the term to an IRI,
or a dictionary.
When a when a member with a term key has a dictionary value, the dictionary is called +
When a member with a term key has a dictionary value, the dictionary is called
an expanded term definition. The example above specifies that
the values of image
and homepage
, if they are
strings, are to be interpreted as
From 2646290098acb11c9ae6cb9e58622a1986286185 Mon Sep 17 00:00:00 2001
From: Gregg Kellogg application/ld+json
are treated as in RDF syntaxes, as per
RDF 1.1 Concepts and Abstract Syntax
[[RDF11-CONCEPTS]].
The following examples illustrate different ways in which the profile parameter may be used + to describe different acceptable responses.
+ ++ ++
Requests the server to return the requested resource as JSON-LD + in expanded document form.
+ ++ ++
Requests the server to return the requested resource as JSON-LD + in compacted document form. + As no explicit context resource is specified, the server compacts + using an application-specific default context.
+ ++ ++
Requests the server to return the requested resource as JSON-LD
+ in compacted document form
+ and specifies the location of a context to use for compaction.
+ Note that as whitespace is used to separate the two URIs, they
+ are enclosed in double quotes ("
).
+ ++
Requests the server to return the requested resource as JSON-LD
+ in framed document form
+ and specifies the location of a frame to use.
+ Note that as whitespace is used to separate the two URIs, they
+ are enclosed in double quotes ("
).
- When used as a media type paramter [[RFC2048]]
+ When used as a media type paramter [[RFC4288]]
in an HTTP Accept header [[RFC7231]],
the value of the profile
parameter MUST be enclosed in quotes ("
) if it contains
special characters such as whitespace, when multiple profiles are combined.
profile
parameter MUST be enclosed in quotes ("
) if it contains
- special characters such as whitespace, when multiple profiles are combined.
- In addition to the profile
values described above,
- the profile
parameter MAY include one additional URL, which is interpreted as
- the location of either a context or frame, depending on the other profile
- parameters included. When used without an defined profile URI, such a URL
- is interpreted as the location of a context.
JSON-LD processors MAY place restrictions on supported profiles, - MAY provide defaults for context and frame URLs, - and MAY restrict client-provided URLs for contexts and frames.
+ special characters such as whitespace, which is required when multiple profile URIs are combined. +Relevant contextual information, such as URLs to provide contexts or frames
+ associated with the http://www.w3.org/ns/json-ld#compacted
+ and http://www.w3.org/ns/json-ld#framed
profiles
+ are described in the published specification.
JSON-LD processors MAY place restrictions on supported profiles.
When processing the "profile" media type parameter, it is important to note that its value contains one or more URIs and not IRIs. In some cases it might therefore be necessary to convert between IRIs and URIs as specified in @@ -10511,7 +10508,7 @@
When processing JSON-LD documents, links to remote contexts are +
When processing JSON-LD documents, links to remote contexts and frames are typically followed automatically, resulting in the transfer of files without the explicit request of the user for each one. If remote contexts are served by third parties, it may allow them to gather @@ -10551,7 +10548,7 @@
When using the http://www.w3.org/ns/json-ld#compacted
profile
+ in an HTTP request Accept header on the application/ld+json media type,
+ the context to use for compacting MAY be specified
+ using the HTTP Link Header as defined in [[RFC8288]].
When satisfying an HTTP request where the profile parameter includes
+ http://www.w3.org/ns/json-ld#compacted
, processors MUST retrive
+ any JSON-LD document referenced by a Link Header with:
rel="http://www.w3.org/ns/json-ld#context"
, andtype="application/ld+json"
.The referenced document MUST have a top-level JSON object
+ with a @context
member.
When using the http://www.w3.org/ns/json-ld#framed
profile
+ in an HTTP request Accept header on the application/ld+json media type,
+ the context to use for compacting MAY be specified
+ using the HTTP Link Header as defined in [[RFC8288]].
When satisfying an HTTP request where the profile parameter includes
+ http://www.w3.org/ns/json-ld#framed
, processors MUST retrive
+ any JSON-LD document referenced by a Link Header with:
rel="http://www.w3.org/ns/json-ld#frame"
, andtype="application/ld+json"
.The referenced document MUST be a valid JSON-LD frame document as described in [[JSON-LD11-FRAMING]].
+ +A request MUST NOT
+ contain more than one HTTP Link Header [[RFC8288]] using the
+ http://www.w3.org/ns/json-ld#context
+ or http://www.w3.org/ns/json-ld#frame
link relations.
Can JSON-LD processors place restrictions on client-provided context or frame URLs?
+The following examples illustrate different ways in which the profile parameter may be used @@ -10607,15 +10646,30 @@
Requests the server to return the requested resource as JSON-LD
- in compacted document form
- and specifies the location of a context to use for compaction.
+ in both compacted document form
+ and flattened document form.
Note that as whitespace is used to separate the two URIs, they
are enclosed in double quotes ("
).
+ ++
Requests the server to return the requested resource as JSON-LD + in compacted document form. + As no explicit context resource is specified, the server compacts + using an application-specific default context.
+Examples
Requests the server to return the requested resource as JSON-LD
in framed document form
- and specifies the location of a frame to use.
- Note that as whitespace is used to separate the two URIs, they
- are enclosed in double quotes ("
).
http://www.w3.org/ns/json-ld#framed
Other specifications may publish additional profile parameter + URIs with their own defined sematics.
When used as a media type paramter [[RFC4288]]
in an HTTP Accept header [[RFC7231]],
the value of the profile
parameter MUST be enclosed in quotes ("
) if it contains
special characters such as whitespace, which is required when multiple profile URIs are combined.
Relevant contextual information, such as URLs to provide contexts or frames
- associated with the http://www.w3.org/ns/json-ld#compacted
- and http://www.w3.org/ns/json-ld#framed
profiles
- are described in the published specification.
JSON-LD processors MAY place restrictions on supported profiles.
When processing the "profile" media type parameter, it is important to note that its value contains one or more URIs and not IRIs. In some cases it might therefore be necessary to convert between IRIs and URIs as specified in @@ -10564,48 +10561,6 @@
When using the http://www.w3.org/ns/json-ld#compacted
profile
- in an HTTP request Accept header on the application/ld+json media type,
- the context to use for compacting MAY be specified
- using the HTTP Link Header as defined in [[RFC8288]].
When satisfying an HTTP request where the profile parameter includes
- http://www.w3.org/ns/json-ld#compacted
, processors MUST retrive
- any JSON-LD document referenced by a Link Header with:
rel="http://www.w3.org/ns/json-ld#context"
, andtype="application/ld+json"
.The referenced document MUST have a top-level JSON object
- with a @context
member.
When using the http://www.w3.org/ns/json-ld#framed
profile
- in an HTTP request Accept header on the application/ld+json media type,
- the context to use for compacting MAY be specified
- using the HTTP Link Header as defined in [[RFC8288]].
When satisfying an HTTP request where the profile parameter includes
- http://www.w3.org/ns/json-ld#framed
, processors MUST retrive
- any JSON-LD document referenced by a Link Header with:
rel="http://www.w3.org/ns/json-ld#frame"
, andtype="application/ld+json"
.The referenced document MUST be a valid JSON-LD frame document as described in [[JSON-LD11-FRAMING]].
- -A request MUST NOT
- contain more than one HTTP Link Header [[RFC8288]] using the
- http://www.w3.org/ns/json-ld#context
- or http://www.w3.org/ns/json-ld#frame
link relations.
Can JSON-LD processors place restrictions on client-provided context or frame URLs?
-The following examples illustrate different ways in which the profile parameter may be used @@ -10654,36 +10609,6 @@
"
).
-
- - --
Requests the server to return the requested resource as JSON-LD - in compacted document form. - As no explicit context resource is specified, the server compacts - using an application-specific default context.
- -- --
Requests the server to return the requested resource as JSON-LD - in framed document form - and specifies the location of a frame to use.
@value
member.
@vocab
key
- whose value MUST be an absolute IRI or null
.null
.