@@ -264,8 +264,10 @@ <h2>Set of Documents</h2>
264
264
265
265
< section id ='introduction '>
266
266
< h1 > Introduction</ h1 >
267
- < p > A JSON-LD document is a representation of a directed graph. A single
268
- directed graph can have many different serializations, each expressing
267
+ < p > JSON-LD is a lightweight syntax to serialize Linked Data [[LINKED-DATA]] in JSON [[RFC8259]].
268
+ Its design allows existing JSON to be interpreted as Linked Data with minimal changes.
269
+ As with other representations, of Linked Data which describe directed graphs,
270
+ A single directed graph can have many different serializations, each expressing
269
271
exactly the same information. Developers typically work with trees, represented as
270
272
< a > JSON objects</ a > . While mapping a graph to
271
273
a tree can be done, the layout of the end result must be specified in advance.
@@ -278,7 +280,7 @@ <h1>Introduction</h1>
278
280
to reference other subjects through the use of their identifiers, expressed
279
281
as strings.</ p >
280
282
281
- < p > However, given that JSON-LD represents a < a > graph </ a > of information,
283
+ < p > However, given that JSON-LD represents one or more < a > graphs </ a > of information,
282
284
there is more than one way to frame the statements about several related
283
285
subjects into a whole document. In fact, a graph of information can be
284
286
thought of as a long list of independent statements (aka < a > triples</ a > or
@@ -388,7 +390,7 @@ <h3>Framing</h3>
388
390
< p > For example, assume the following JSON-LD frame:</ p >
389
391
< pre id ="sample-library-frame "
390
392
class ="example " data-transform ="updateExample "
391
- data-content-type ="application/ld-frame +json "
393
+ data-content-type ="application/ld+json;profile=http://www.w3.org/ns/json-ld#framed "
392
394
data-frame-for ="Flattened library objects "
393
395
title ="Sample library frame ">
394
396
<!--
@@ -536,7 +538,7 @@ <h3>Default content</h3>
536
538
finding default values. Note the < em > description</ em > value for < em > Library</ em > in the following example.</ p >
537
539
< pre id ="sample-library-frame-with-default-value "
538
540
class ="example nohighlight " data-transform ="updateExample "
539
- data-content-type ="application/ld-frame +json "
541
+ data-content-type ="application/ld+json;profile=http://www.w3.org/ns/json-ld#framed "
540
542
data-frame-for ="Flattened library objects "
541
543
title ="Sample library frame with @default value ">
542
544
<!--
@@ -615,7 +617,7 @@ <h4>Object Embed Flag</h4>
615
617
based on the default < code > @last</ code > value of the < a > object embed flag</ a > :</ p >
616
618
617
619
< pre class ="example " data-transform ="updateExample "
618
- data-content-type ="application/ld-frame +json "
620
+ data-content-type ="application/ld+json;profile=http://www.w3.org/ns/json-ld#framed "
619
621
data-frame-for ="Flattened library objects "
620
622
title ="Sample library frame with implicit @embed set to @last ">
621
623
<!--
@@ -637,7 +639,7 @@ <h4>Object Embed Flag</h4>
637
639
638
640
< pre id ="sample-library-frame-with-explicit-embed-set-to-never "
639
641
class ="example nohighlight " data-transform ="updateExample "
640
- data-content-type ="application/ld-frame +json "
642
+ data-content-type ="application/ld+json;profile=http://www.w3.org/ns/json-ld#framed "
641
643
data-frame-for ="Flattened library objects "
642
644
title ="Sample library frame with explicit @embed set to @never ">
643
645
<!--
@@ -696,7 +698,7 @@ <h4>Explicit inclusion flag</h4>
696
698
697
699
< pre id ="sample-library-frame-with-explicit-set-to-true "
698
700
class ="example nohighlight " data-transform ="updateExample "
699
- data-content-type ="application/ld-frame +json "
701
+ data-content-type ="application/ld+json;profile=http://www.w3.org/ns/json-ld#framed "
700
702
data-frame-for ="Flattened library objects "
701
703
title ="Sample library frame with @explicit set to true ">
702
704
<!--
@@ -805,7 +807,7 @@ <h3>Reverse Framing</h3>
805
807
806
808
< pre id ="inverted-library-frame "
807
809
class ="example nohighlight " data-transform ="updateExample "
808
- data-content-type ="application/ld-frame +json "
810
+ data-content-type ="application/ld+json;profile=http://www.w3.org/ns/json-ld#framed "
809
811
data-frame-for ="Flattened library objects "
810
812
title ="Inverted library frame ">
811
813
<!--
@@ -893,7 +895,7 @@ <h3>Framing Named Graphs</h3>
893
895
894
896
< pre id ="frame-with-named-graphs "
895
897
class ="example nohighlight " data-transform ="updateExample "
896
- data-content-type ="application/ld-frame +json "
898
+ data-content-type ="application/ld+json;profile=http://www.w3.org/ns/json-ld#framed "
897
899
data-frame-for ="Flattened Input with named graphs "
898
900
title ="Frame with named graphs ">
899
901
<!--
@@ -1665,36 +1667,74 @@ <h3>JsonLdOptions</h3>
1665
1667
1666
1668
</ section >
1667
1669
1668
- < section class ="appendix informative ">
1670
+ < section class ="appendix normative ">
1669
1671
< h2 > IANA Considerations</ h2 >
1670
1672
1671
1673
< p > This section is included merely for standards community review and will be
1672
1674
submitted to the Internet Engineering Steering Group if this specification
1673
1675
becomes a W3C Recommendation.</ p >
1674
1676
1675
- < h3 > application/ld-frame+json</ h3 >
1677
+ < p > A JSON-LD Frame uses the same MIME media type described in [[JSON-LD11]]
1678
+ along with a required < code > profile</ code > parameter.</ p >
1679
+
1680
+ < h3 > application/ld+json</ h3 >
1676
1681
< dl >
1677
1682
< dt > Type name:</ dt >
1678
1683
< dd > application</ dd >
1679
1684
< dt > Subtype name:</ dt >
1680
- < dd > ld-frame+json</ dd >
1681
- < dt > Required parameters:</ dt >
1682
- < dd > None</ dd >
1685
+ < dd class ="changed "> ld+json</ dd >
1686
+ < dt class ="changed "> Required parameters:</ dt >
1687
+ < dd class ="changed ">
1688
+ < dl >
1689
+ < dt > < code > profile</ code > </ dt >
1690
+ < dd >
1691
+ < p > A single URI identifying the resource as a JSON-LD < a > Frame</ a > .
1692
+ A profile does not change the semantics of the resource representation
1693
+ when processed without profile knowledge, so that clients both with
1694
+ and without knowledge of a profiled resource can safely use the same
1695
+ representation.</ p >
1696
+ < dl >
1697
+ < dt > < code > http://www.w3.org/ns/json-ld#framed</ code > </ dt >
1698
+ < dd > To specify a JSON-LD < a > Frame</ a > .</ dd >
1699
+ </ dl >
1700
+ </ dd >
1701
+ </ dl >
1702
+ </ dd >
1683
1703
< dt > Optional parameters:</ dt >
1684
- < dd > None</ dd >
1704
+ < dd > None. </ dd >
1685
1705
< dt > Encoding considerations:</ dt >
1686
- < dd > The same as the < code > application/json </ code > MIME media type .</ dd >
1706
+ < dd > See < a data-cite =" RFC8259#section-11 " > RFC 8259, section 11 </ a > .</ dd >
1687
1707
< dt > Security considerations:</ dt >
1688
- < dd > Since a JSON-LD frame is intended to specify a deterministic layout
1689
- for a JSON-LD graph, the serialization SHOULD NOT be passed through a
1690
- code execution mechanism such as JavaScript's < code > eval()</ code >
1691
- function. It is RECOMMENDED that a conforming parser does not attempt to
1692
- directly evaluate the JSON-LD frame and instead purely parse the
1693
- input into a language-native data structure.</ dd >
1708
+ < dd > See < a data-cite ="RFC8259#section-12 "> RFC 8259, section 12</ a > [[RFC8259]]
1709
+ < p > Since JSON-LD is intended to be a pure data exchange format for
1710
+ directed graphs, the serialization SHOULD NOT be passed through a
1711
+ code execution mechanism such as JavaScript's < code > eval()</ code >
1712
+ function to be parsed. An (invalid) document may contain code that,
1713
+ when executed, could lead to unexpected side effects compromising
1714
+ the security of a system.</ p >
1715
+ < p > When processing JSON-LD documents, links to remote contexts are
1716
+ typically followed automatically, resulting in the transfer of files
1717
+ without the explicit request of the user for each one. If remote
1718
+ contexts are served by third parties, it may allow them to gather
1719
+ usage patterns or similar information leading to privacy concerns.
1720
+ Specific implementations, such as the API defined in the
1721
+ JSON-LD 1.1 Processing Algorithms and API specification [[JSON-LD11-API]],
1722
+ may provide fine-grained mechanisms to control this behavior.</ p >
1723
+ < p > JSON-LD contexts that are loaded from the Web over non-secure connections,
1724
+ such as HTTP, run the risk of being altered by an attacker such that
1725
+ they may modify the JSON-LD < a > active context</ a > in a way that
1726
+ could compromise security. It is advised that any application that
1727
+ depends on a remote context for mission critical purposes vet and
1728
+ cache the remote context before allowing the system to use it.</ p >
1729
+ < p > Given that JSON-LD allows the substitution of long IRIs with short terms,
1730
+ JSON-LD documents may expand considerably when processed and, in the worst case,
1731
+ the resulting data might consume all of the recipient's resources. Applications
1732
+ should treat any data with due skepticism.</ p >
1733
+ </ dd >
1694
1734
< dt > Interoperability considerations:</ dt >
1695
1735
< dd > Not Applicable</ dd >
1696
1736
< dt > Published specification:</ dt >
1697
- < dd > The < a href =" https://json-ld. org/spec/latest/ " > JSON-LD </ a > specification. </ dd >
1737
+ < dd > https://www.w3. org/TR/json-ld11-framing </ dd >
1698
1738
< dt > Applications that use this media type:</ dt >
1699
1739
< dd > Any programming environment that requires the exchange of
1700
1740
directed graphs. Implementations of JSON-LD have been created for
@@ -1706,13 +1746,13 @@ <h3>application/ld-frame+json</h3>
1706
1746
< dt > Magic number(s):</ dt >
1707
1747
< dd > Not Applicable</ dd >
1708
1748
< dt > File extension(s):</ dt >
1709
- < dd > .jsonldf </ dd >
1749
+ < dd > .jsonld </ dd >
1710
1750
< dt > Macintosh file type code(s):</ dt >
1711
1751
< dd > TEXT</ dd >
1712
1752
</ dl >
1713
1753
</ dd >
1714
1754
< dt > Person & email address to contact for further information:</ dt >
1715
- < dd > Manu Sporny <
[email protected] >
</ dd >
1755
+ < dd > Ivan Herman <
[email protected] >
</ dd >
1716
1756
< dt > Intended usage:</ dt >
1717
1757
< dd > Common</ dd >
1718
1758
< dt > Restrictions on usage:</ dt >
@@ -1723,8 +1763,10 @@ <h3>application/ld-frame+json</h3>
1723
1763
< dd > W3C</ dd >
1724
1764
</ dl >
1725
1765
1726
- < p > Fragment identifiers have no meaning with
1727
- < a href ="#application-ld-frame-json "> application/ld-frame+json</ a > resources.</ p >
1766
+ < p > Fragment identifiers used with < a href ="#application-ld-json "> application/ld+json</ a >
1767
+ are treated as in RDF syntaxes, as per
1768
+ < a data-cite ="RDF11-CONCEPTS#section-fragID "> RDF 1.1 Concepts and Abstract Syntax</ a >
1769
+ [[RDF11-CONCEPTS]].</ p >
1728
1770
1729
1771
</ section >
1730
1772
@@ -1792,10 +1834,12 @@ <h2>Changes since 1.0 Draft of 30 August 2012</h2>
1792
1834
< h2 > Changes since JSON-LD Community Group Final Report</ h2 >
1793
1835
< ul >
1794
1836
< li > The API now adds an < a data-link-for ="JsonLdOptions "> ordered</ a >
1795
- option, defaulting to < code > false</ code > This is used in algorithms to
1796
- control interation of < a > dictionary member</ a > keys. Previously, the
1797
- algorithms always required such an order. The instructions for
1798
- evaluating test results have been updated accordingly.</ li >
1837
+ option, defaulting to < code > false</ code > This is used in algorithms to
1838
+ control interation of < a > dictionary member</ a > keys. Previously, the
1839
+ algorithms always required such an order. The instructions for
1840
+ evaluating test results have been updated accordingly.</ li >
1841
+ < li > The IANA registration is changed from < code > application/ld-frame+json</ code > to
1842
+ < code > application/ld+json</ code > with a required < code > profile</ code > parameter.</ li >
1799
1843
</ ul >
1800
1844
</ section >
1801
1845
0 commit comments