Adding new W3C editor's drafts for JSON-LD Syntax and JSON-LD API specs.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-api/20121225/diff-20120930.html Sun Dec 23 13:52:00 2012 -0500
@@ -0,0 +1,31118 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML+RDFa 1.1//EN' 'http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" prefix='bibo: http://purl.org/ontology/bibo/' typeof="bibo:Document">
+<head>
+<title>JSON-LD Algorithms 1.0</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--
+ === NOTA BENE ===
+ For the three scripts below, if your spec resides on dev.w3 you can check them
+ out in the same tree and use relative links so that they'll work offline,
+ -->
+
+
+
+
+<style type="text/css">
+ .diff { font-weight:bold; color:#0a3; }
+</style>
+<style>/*****************************************************************
+ * ReSpec 3 CSS
+ * Robin Berjon - http://berjon.com/
+ *****************************************************************/
+
+/* --- INLINES --- */
+em.rfc2119 {
+ text-transform: lowercase;
+ font-variant: small-caps;
+ font-style: normal;
+ color: #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+ border: none;
+}
+
+dfn {
+ font-weight: bold;
+}
+
+a.internalDFN {
+ color: inherit;
+ border-bottom: 1px solid #99c;
+ text-decoration: none;
+}
+
+a.externalDFN {
+ color: inherit;
+ border-bottom: 1px dotted #ccc;
+ text-decoration: none;
+}
+
+a.bibref {
+ text-decoration: none;
+}
+
+cite .bibref {
+ font-style: normal;
+}
+
+code {
+ color: #ff4500;
+}
+
+
+/* --- --- */
+ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+/* --- TOC --- */
+.toc a, .tof a {
+ text-decoration: none;
+}
+
+a .secno, a .figno {
+ color: #000;
+}
+
+ul.tof, ol.tof {
+ list-style: none outside none;
+}
+
+.caption {
+ margin-top: 0.5em;
+ font-style: italic;
+}
+
+/* --- TABLE --- */
+table.simple {
+ border-spacing: 0;
+ border-collapse: collapse;
+ border-bottom: 3px solid #005a9c;
+}
+
+.simple th {
+ background: #005a9c;
+ color: #fff;
+ padding: 3px 5px;
+ text-align: left;
+}
+
+.simple th[scope="row"] {
+ background: inherit;
+ color: inherit;
+ border-top: 1px solid #ddd;
+}
+
+.simple td {
+ padding: 3px 10px;
+ border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+ background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+ margin-top: 0;
+}
+
+.section dd > p:last-child {
+ margin-bottom: 0;
+}
+
+.section dd {
+ margin-bottom: 1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+ margin-bottom: 0;
+}
+</style><style>/* --- EXAMPLES --- */
+div.example-title {
+ min-width: 7.5em;
+ color: #b9ab2d;
+}
+div.example-title span {
+ text-transform: uppercase;
+}
+aside.example, div.example, div.illegal-example {
+ padding: 0.5em;
+ margin: 1em 0;
+ position: relative;
+ clear: both;
+}
+div.illegal-example { color: red }
+div.illegal-example p { color: black }
+aside.example, div.example {
+ padding: .5em;
+ border-left-width: .5em;
+ border-left-style: solid;
+ border-color: #e0cb52;
+ background: #fcfaee;
+}
+
+aside.example div.example {
+ border-left-width: .1em;
+ border-color: #999;
+ background: #fff;
+}
+aside.example div.example div.example-title {
+ color: #999;
+}
+</style><style>/* --- ISSUES/NOTES --- */
+div.issue-title, div.note-title {
+ padding-right: 1em;
+ min-width: 7.5em;
+ color: #b9ab2d;
+}
+div.issue-title { color: #e05252; }
+div.note-title { color: #52e052; }
+div.issue-title span, div.note-title span {
+ text-transform: uppercase;
+}
+div.note, div.issue {
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+.note > p:first-child, .issue > p:first-child { margin-top: 0 }
+.issue, .note {
+ padding: .5em;
+ border-left-width: .5em;
+ border-left-style: solid;
+}
+div.issue, div.note {
+ padding: 0.5em;
+ margin: 1em 0;
+ position: relative;
+ clear: both;
+}
+span.note, span.issue { padding: .1em .5em .15em; }
+
+.issue {
+ border-color: #e05252;
+ background: #fbe9e9;
+}
+.note {
+ border-color: #52e052;
+ background: #e9fbe9;
+}
+
+
+</style><style>/* --- WEB IDL --- */
+pre.idl {
+ border-top: 1px solid #90b8de;
+ border-bottom: 1px solid #90b8de;
+ padding: 1em;
+ line-height: 120%;
+}
+
+pre.idl::before {
+ content: "WebIDL";
+ display: block;
+ width: 150px;
+ background: #90b8de;
+ color: #fff;
+ font-family: initial;
+ padding: 3px;
+ font-weight: bold;
+ margin: -1em 0 1em -1em;
+}
+
+.idlType {
+ color: #ff4500;
+ font-weight: bold;
+ text-decoration: none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID, .idlDictionaryID, .idlCallbackID, .idlEnumID {
+ font-weight: bold;
+ color: #005a9c;
+}
+
+.idlSuperclass {
+ font-style: italic;
+ color: #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType, .idlMemberType {
+ color: #005a9c;
+}
+.idlAttrName, .idlFieldName, .idlMemberName {
+ color: #ff4500;
+}
+.idlAttrName a, .idlFieldName a, .idlMemberName a {
+ color: #ff4500;
+ border-bottom: 1px dotted #ff4500;
+ text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType, .idlCallbackType {
+ color: #005a9c;
+}
+.idlMethName {
+ color: #ff4500;
+}
+.idlMethName a {
+ color: #ff4500;
+ border-bottom: 1px dotted #ff4500;
+ text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+ color: #005a9c;
+}
+.idlParamName {
+ font-style: italic;
+}
+
+.extAttr {
+ color: #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+ color: #005a9c;
+}
+.idlConstName {
+ color: #ff4500;
+}
+.idlConstName a {
+ color: #ff4500;
+ border-bottom: 1px dotted #ff4500;
+ text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+ font-weight: bold;
+ color: #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+ color: #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+ color: #c00;
+ font-weight: normal;
+}
+
+.excName a {
+ font-family: monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+ border-bottom: 1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+ width: 45px;
+ text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color: #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color: #c00; }
+
+.idlImplements a {
+ font-weight: bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields, dl.dictionary-members {
+ margin-left: 2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt, .dictionary-members dt {
+ font-weight: normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code, .dictionary-members dt code {
+ font-weight: bold;
+ color: #000;
+ font-family: monospace;
+}
+
+.attributes dt code, .fields dt code, .dictionary-members dt code {
+ background: #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code, .dictionary-members dt .idlMemberType code {
+ color: #005a9c;
+ background: transparent;
+ font-family: inherit;
+ font-weight: normal;
+ font-style: italic;
+}
+
+.methods dt code {
+ background: #d9e6f8;
+}
+
+.constants dt code {
+ background: #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd, .dictionary-members dd {
+ margin-bottom: 1em;
+}
+
+table.parameters, table.exceptions {
+ border-spacing: 0;
+ border-collapse: collapse;
+ margin: 0.5em 0;
+ width: 100%;
+}
+table.parameters { border-bottom: 1px solid #90b8de; }
+table.exceptions { border-bottom: 1px solid #deb890; }
+
+.parameters th, .exceptions th {
+ color: #fff;
+ padding: 3px 5px;
+ text-align: left;
+ font-family: initial;
+ font-weight: normal;
+ text-shadow: #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+ padding: 3px 10px;
+ border-top: 1px solid #ddd;
+ vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+ border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+ width: 100px;
+}
+
+.parameters td.prmType {
+ width: 120px;
+}
+
+table.exceptions table {
+ border-spacing: 0;
+ border-collapse: collapse;
+ width: 100%;
+}
+</style><link rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/W3C-ED" />
+<!--[if lt IE 9]><script src='http://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]-->
+<style type='text/css'>
+.diff-old-a {
+ font-size: smaller;
+ color: red;
+}
+
+.diff-new { background-color: yellow; }
+.diff-chg { background-color: lime; }
+.diff-new:before,
+.diff-new:after
+ { content: "\2191" }
+.diff-chg:before, .diff-chg:after
+ { content: "\2195" }
+.diff-old { text-decoration: line-through; background-color: #FBB; }
+.diff-old:before,
+.diff-old:after
+ { content: "\2193" }
+:focus { border: thin red solid}
+</style>
+</head>
+
+
+<body>
+<div class="head">
+<p>
+<a href="http://www.w3.org/">
+<img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C" />
+</a>
+</p>
+<h1 class="title" id="title">
+JSON-LD
+<del class="diff-old">API
+</del>
+<ins class="diff-chg">Algorithms
+</ins>
+1.0
+</h1>
+<h2 id="subtitle">
+<del class="diff-old">An
+Application
+Programming
+Interface
+</del>
+<ins class="diff-chg">Algorithms
+</ins>
+for
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">Processing
+</ins>
+JSON-LD
+<del class="diff-old">Syntax
+</del>
+<ins class="diff-chg">Documents
+</ins>
+</h2>
+<h2 id="w3c-editor-s-draft-25-december-2012">
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+Editor's
+Draft
+<del class="diff-old">30
+September
+</del>
+<ins class="diff-chg">25
+December
+</ins>
+2012
+</h2>
+<dl>
+<dt>
+This
+version:
+</dt>
+<dd>
+<a href="http://dvcs.w3.org/hg/json-ld/raw-file/default/spec/latest/json-ld-api/index.html">
+http://dvcs.w3.org/hg/json-ld/raw-file/default/spec/latest/json-ld-api/index.html
+</a>
+</dd>
+<dt>
+Latest
+published
+version:
+</dt>
+<dd>
+<a href="http://www.w3.org/TR/json-ld-api/">
+http://www.w3.org/TR/json-ld-api/
+</a>
+</dd>
+<dt>
+Latest
+editor's
+draft:
+</dt>
+<dd>
+<a href="http://dvcs.w3.org/hg/json-ld/raw-file/default/spec/latest/json-ld-api/index.html">
+http://dvcs.w3.org/hg/json-ld/raw-file/default/spec/latest/json-ld-api/index.html
+</a>
+</dd>
+<dt>
+Editors:
+</dt>
+<dd rel="bibo:editor" inlist="">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Manu Sporny" href="http://manu.sporny.org/">
+Manu
+Sporny
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</span>
+</dd>
+<dd rel="bibo:editor" inlist="">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Gregg Kellogg" href="http://greggkellogg.net/">
+Gregg
+Kellogg
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://kellogg-assoc.com/">
+Kellogg
+Associates
+</a>
+</span>
+</dd>
+<dd rel="bibo:editor" inlist="">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Markus Lanthaler" href="http://www.markus-lanthaler.com/">
+Markus
+Lanthaler
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://www.tugraz.at/">
+Graz
+University
+of
+Technology
+</a>
+</span>
+</dd>
+<dt>
+Authors:
+</dt>
+<dd rel="dcterms:contributor">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Dave Longley" href="http://digitalbazaar.com/">
+Dave
+Longley
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</span>
+</dd>
+<dd rel="dcterms:contributor">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Manu Sporny" href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</span>
+</dd>
+<dd rel="dcterms:contributor">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Gregg Kellogg" href="http://greggkellogg.net/">
+Gregg
+Kellogg
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://kellogg-assoc.com/">
+Kellogg
+Associates
+</a>
+</span>
+</dd>
+<dd rel="dcterms:contributor">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Markus Lanthaler" href="http://www.markus-lanthaler.com/">
+Markus
+Lanthaler
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://www.tugraz.at/">
+Graz
+University
+of
+Technology
+</a>
+</span>
+</dd>
+</dl>
+<p>
+This
+document
+is
+also
+available
+in
+this
+non-normative
+format:
+<a href="diff-20120930.html">
+diff
+to
+previous
+version
+</a>
+</p>
+<p class="copyright">
+<a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">
+Copyright
+</a>
+©
+2010-2012
+<a href="http://www.w3.org/">
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+</a>
+<sup>
+®
+</sup>
+(
+<a href="http://www.csail.mit.edu/">
+<abbr title="Massachusetts Institute of Technology">
+MIT
+</abbr>
+</a>,
+<a href="http://www.ercim.eu/">
+<abbr title="European Research Consortium for Informatics and Mathematics">
+ERCIM
+</abbr>
+</a>,
+<a href="http://www.keio.ac.jp/">
+Keio
+</a>
+),
+All
+Rights
+Reserved.
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+<a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">
+liability
+</a>,
+<a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">
+trademark
+</a>
+and
+<a href="http://www.w3.org/Consortium/Legal/copyright-documents">
+document
+use
+</a>
+rules
+apply.
+</p>
+<hr />
+</div>
+<section id="abstract" class="introductory" property="dcterms:abstract" datatype="" typeof="bibo:Chapter" resource="#abstract" rel="bibo:chapter">
+<h2>
+Abstract
+</h2>
+<p>
+JSON
+[
+<cite>
+<a class="bibref" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+]
+has
+proven
+to
+be
+a
+highly
+useful
+object
+serialization
+and
+messaging
+format.
+JSON-LD
+[
+<cite>
+<a class="bibref" href="#bib-JSON-LD">
+JSON-LD
+</a>
+</cite>
+]
+harmonizes
+the
+representation
+of
+Linked
+Data
+in
+JSON
+by
+outlining
+a
+common
+JSON
+representation
+format
+for
+expressing
+directed
+graphs;
+mixing
+both
+Linked
+Data
+and
+non-Linked
+Data
+in
+a
+single
+document.
+This
+document
+outlines
+an
+Application
+Programming
+Interface
+and
+a
+set
+of
+algorithms
+for
+programmatically
+transforming
+JSON-LD
+documents
+in
+order
+to
+make
+them
+easier
+to
+work
+with
+in
+programming
+environments
+like
+JavaScript,
+Python,
+and
+Ruby.
+</p>
+</section>
+<section id="sotd" class="introductory" typeof="bibo:Chapter" resource="#sotd" rel="bibo:chapter">
+<h2>
+Status
+of
+This
+Document
+</h2>
+<p>
+<em>
+This
+section
+describes
+the
+status
+of
+this
+document
+at
+the
+time
+of
+its
+publication.
+Other
+documents
+may
+supersede
+this
+document.
+A
+list
+of
+current
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+publications
+and
+the
+latest
+revision
+of
+this
+technical
+report
+can
+be
+found
+in
+the
+<a href="http://www.w3.org/TR/">
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+technical
+reports
+index
+</a>
+at
+http://www.w3.org/TR/.
+</em>
+</p>
+<p>
+This
+document
+has
+been
+under
+development
+for
+over
+18
+months
+in
+the
+JSON
+for
+Linking
+Data
+Community
+Group.
+The
+document
+has
+recently
+been
+transferred
+to
+the
+RDF
+Working
+Group
+for
+review,
+improvement,
+and
+publication
+along
+the
+Recommendation
+track.
+The
+specification
+has
+undergone
+significant
+development,
+review,
+and
+changes
+during
+the
+course
+of
+the
+last
+18
+months.
+</p>
+<p>
+There
+are
+<del class="diff-old">currently
+</del>
+<ins class="diff-chg">several
+independent
+</ins>
+<a href="http://json-ld.org/#impl">
+<del class="diff-old">five
+</del>
+interoperable
+implementations
+</a>
+of
+this
+specification.
+There
+is
+a
+<a href="https://github.com/json-ld/json-ld.org/tree/master/test-suite">
+fairly
+complete
+test
+suite
+</a>
+and
+a
+<a href="http://json-ld.org/playground/">
+live
+JSON-LD
+editor
+</a>
+that
+is
+capable
+of
+demonstrating
+the
+features
+described
+in
+this
+document.
+While
+development
+on
+implementations,
+the
+test
+suite
+and
+the
+live
+editor
+will
+continue,
+they
+are
+believed
+to
+be
+mature
+enough
+to
+be
+integrated
+into
+a
+non-production
+system
+at
+this
+point
+in
+time
+with
+the
+expectation
+that
+they
+could
+be
+used
+in
+a
+production
+system
+within
+the
+next
+year.
+</p>
+<div class="issue">
+<div class="issue-title">
+<span>
+Issue
+</span>
+</div>
+<p class="">
+It
+is
+important
+for
+readers
+to
+understand
+that
+the
+scope
+of
+this
+document
+is
+currently
+under
+debate
+and
+new
+features
+may
+be
+added
+to
+the
+specification.
+Existing
+features
+may
+be
+modified
+heavily
+or
+removed
+entirely
+from
+the
+specification
+upon
+further
+review
+and
+feedback
+from
+the
+broader
+community.
+This
+is
+a
+work
+in
+progress
+and
+publication
+as
+a
+Working
+Draft
+does
+not
+require
+that
+all
+Working
+Group
+members
+agree
+on
+the
+content
+of
+the
+document.
+</p>
+</div>
+<p>
+There
+are
+a
+number
+of
+ways
+that
+one
+may
+participate
+in
+the
+development
+of
+this
+specification:
+</p>
+<ul>
+<li>
+If
+you
+want
+to
+make
+sure
+that
+your
+feedback
+is
+formally
+addressed
+by
+the
+RDF
+Working
+Group,
+you
+should
+send
+it
+to
+public-rdf-comments:
+<a href="http://lists.w3.org/Archives/Public/public-rdf-comments/">
+public-rdf-comments@w3.org
+</a>
+</li>
+<li>
+Ad-hoc
+technical
+discussion
+primarily
+occurs
+on
+the
+public
+community
+mailing
+list:
+<a href="http://lists.w3.org/Archives/Public/public-linked-json/">
+public-linked-json@w3.org
+</a>
+</li>
+<li>
+<a href="http://json-ld.org/minutes/">
+Public
+JSON-LD
+Community
+Group
+teleconferences
+</a>
+are
+held
+on
+Tuesdays
+at
+1500UTC
+every
+week.
+Participation
+is
+open
+to
+the
+public.
+</li>
+<li>
+RDF
+Working
+Group
+teleconferences
+are
+held
+on
+Wednesdays
+at
+1500UTC
+every
+week.
+Participation
+is
+limited
+to
+RDF
+Working
+Group
+members.
+</li>
+<li>
+Specification
+bugs
+and
+issues
+should
+be
+reported
+in
+the
+<a href="https://github.com/json-ld/json-ld.org/issues">
+issue
+tracker
+</a>
+if
+you
+do
+not
+want
+to
+send
+an
+e-mail
+to
+the
+public-rdf-comments
+mailing
+list.
+</li>
+<li>
+<a href="https://github.com/json-ld/json-ld.org/tree/master/spec">
+Source
+code
+</a>
+for
+the
+specification
+can
+be
+found
+on
+Github.
+</li>
+<li>
+The
+<a href="http://webchat.freenode.net/?channels=json-ld">
+#json-ld
+</a>
+IRC
+channel
+is
+available
+for
+real-time
+discussion
+on
+irc.freenode.net.
+</li>
+</ul>
+<p>
+This
+document
+was
+published
+by
+the
+<a href="http://www.w3.org/2011/rdf-wg/">
+RDF
+Working
+Group
+</a>
+as
+an
+Editor's
+Draft.
+If
+you
+wish
+to
+make
+comments
+regarding
+this
+document,
+please
+send
+them
+to
+<a href="mailto:public-rdf-comments@w3.org">
+public-rdf-comments@w3.org
+</a>
+(
+<a href="mailto:public-rdf-comments-request@w3.org?subject=subscribe">
+subscribe
+</a>,
+<a href="http://lists.w3.org/Archives/Public/public-rdf-comments/">
+archives
+</a>
+).
+All
+feedback
+is
+welcome.
+</p>
+<p>
+Publication
+as
+an
+Editor's
+Draft
+does
+not
+imply
+endorsement
+by
+the
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+Membership.
+This
+is
+a
+draft
+document
+and
+may
+be
+updated,
+replaced
+or
+obsoleted
+by
+other
+documents
+at
+any
+time.
+It
+is
+inappropriate
+to
+cite
+this
+document
+as
+other
+than
+work
+in
+progress.
+</p>
+<p>
+This
+document
+was
+produced
+by
+a
+group
+operating
+under
+the
+<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">
+5
+February
+2004
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+Patent
+Policy
+</a>.
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+maintains
+a
+<a href="http://www.w3.org/2004/01/pp-impl/46168/status" rel="disclosure">
+public
+list
+of
+any
+patent
+disclosures
+</a>
+made
+in
+connection
+with
+the
+deliverables
+of
+the
+group;
+that
+page
+also
+includes
+instructions
+for
+disclosing
+a
+patent.
+An
+individual
+who
+has
+actual
+knowledge
+of
+a
+patent
+which
+the
+individual
+believes
+contains
+<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">
+Essential
+Claim(s)
+</a>
+must
+disclose
+the
+information
+in
+accordance
+with
+<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">
+section
+6
+of
+the
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+Patent
+Policy
+</a>.
+</p>
+</section>
+<section id="toc">
+<h2 class="introductory">
+Table
+of
+Contents
+</h2>
+<ul class="toc">
+<li class="tocline">
+<a href="#introduction" class="tocxref">
+<span class="secno">
+1.
+</span>
+Introduction
+</a>
+</li>
+<li class="tocline">
+<a href="#features" class="tocxref">
+<span class="secno">
+2.
+</span>
+Features
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#expansion" class="tocxref">
+<span class="secno">
+2.1
+</span>
+Expansion
+</a>
+</li>
+<li class="tocline">
+<a href="#compaction" class="tocxref">
+<span class="secno">
+2.2
+</span>
+Compaction
+</a>
+</li>
+<li class="tocline">
+<a href="#flattening" class="tocxref">
+<span class="secno">
+2.3
+</span>
+<del class="diff-old">RDF
+Conversion
+</del>
+<ins class="diff-chg">Flattening
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#rdf-conversion" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.
+</del>
+<ins class="diff-chg">2.4
+</ins>
+</span>
+<del class="diff-old">The
+Application
+Programming
+Interface
+</del>
+<ins class="diff-chg">RDF
+Conversion
+</ins>
+</a>
+</li>
+<del class="diff-old">3.1
+General
+Terminology
+</del>
+</ul>
+</li>
+<li class="tocline">
+<a href="#conformance" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.2
+</del>
+<ins class="diff-chg">3.
+</ins>
+</span>
+<del class="diff-old">JsonLdProcessor
+</del>
+<ins class="diff-chg">Conformance
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#general-terminology" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.2.1
+</del>
+<ins class="diff-chg">4.
+</ins>
+</span>
+<del class="diff-old">Methods
+</del>
+<ins class="diff-chg">General
+Terminology
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#algorithms" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.3
+</del>
+<ins class="diff-chg">5.
+</ins>
+</span>
+<del class="diff-old">Callbacks
+</del>
+<ins class="diff-chg">Algorithms
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#algorithm-terms" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.3.1
+</del>
+<ins class="diff-chg">5.1
+</ins>
+</span>
+<del class="diff-old">JsonLdProcessingError
+</del>
+<ins class="diff-chg">Algorithm
+Terms
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#expansion-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.3.2
+</del>
+<ins class="diff-chg">5.2
+</ins>
+</span>
+<del class="diff-old">JsonLdCallback
+</del>
+<ins class="diff-chg">Expansion
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#context-processing" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.3.3
+</del>
+<ins class="diff-chg">5.3
+</ins>
+</span>
+<del class="diff-old">QuadCallback
+</del>
+<ins class="diff-chg">Context
+Processing
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#iri-expansion" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.3.4
+</del>
+<ins class="diff-chg">5.4
+</ins>
+</span>
+<del class="diff-old">ConformanceCallback
+</del>
+<del class="diff-old">3.4
+Data
+Structures
+</del>
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr><ins class="diff-chg">
+Expansion
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#value-expansion" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.4.1
+</del>
+<ins class="diff-chg">5.5
+</ins>
+</span>
+<del class="diff-old">IRI
+</del>
+<ins class="diff-chg">Value
+Expansion
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#label-blank-nodes-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.4.2
+</del>
+<ins class="diff-chg">5.6
+</ins>
+</span>
+<del class="diff-old">JsonLdOptions
+</del>
+<ins class="diff-chg">Label
+Blank
+Nodes
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#generate-blank-node-identifier" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.4.3
+</del>
+<ins class="diff-chg">5.7
+</ins>
+</span>
+<del class="diff-old">Quad
+</del>
+<ins class="diff-chg">Generate
+Blank
+Node
+Identifier
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#compaction-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.4.4
+</del>
+<ins class="diff-chg">5.8
+</ins>
+</span>
+<del class="diff-old">Node
+</del>
+<ins class="diff-chg">Compaction
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#iri-compaction-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.4.5
+</del>
+<ins class="diff-chg">5.9
+</ins>
+</span>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<ins class="diff-chg">Compaction
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#inverse-context-creation" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.4.6
+</del>
+<ins class="diff-chg">5.10
+</ins>
+</span>
+<del class="diff-old">Blank
+Node
+</del>
+<ins class="diff-chg">Inverse
+Context
+Creation
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#inverse-context-query-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.4.7
+</del>
+<ins class="diff-chg">5.11
+</ins>
+</span>
+<del class="diff-old">Literal
+</del>
+<ins class="diff-chg">Inverse
+Context
+Query
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#value-compaction" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.
+</del>
+<ins class="diff-chg">5.12
+</ins>
+</span>
+<del class="diff-old">Algorithms
+</del>
+<ins class="diff-chg">Value
+Compaction
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#find-and-remove-property-generator-duplicates" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.1
+</del>
+<ins class="diff-chg">5.13
+</ins>
+</span>
+<del class="diff-old">Algorithm
+Terms
+</del>
+<ins class="diff-chg">Find
+and
+Remove
+Property
+Generator
+Duplicates
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#flattening-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.2
+</del>
+<ins class="diff-chg">5.14
+</ins>
+</span>
+<del class="diff-old">Context
+Processing
+</del>
+<ins class="diff-chg">Flattening
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#node-map-generation" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.3
+</del>
+<ins class="diff-chg">5.15
+</ins>
+</span>
+<del class="diff-old">IRI
+Expansion
+</del>
+<ins class="diff-chg">Node
+Map
+Generation
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#rdf-conversion-algorithms" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.4
+</del>
+<ins class="diff-chg">5.16
+</ins>
+</span>
+<del class="diff-old">IRI
+Compaction
+</del>
+<ins class="diff-chg">RDF
+Conversion
+Algorithms
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#convert-to-rdf-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.4.1
+</del>
+<ins class="diff-chg">5.16.1
+</ins>
+</span>
+<del class="diff-old">IRI
+Compaction
+</del>
+<ins class="diff-chg">Convert
+to
+RDF
+</ins>
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#list-conversion" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.4.2
+</del>
+<ins class="diff-chg">5.16.2
+</ins>
+</span>
+<del class="diff-old">Term
+Rank
+Algorithm
+</del>
+<ins class="diff-chg">List
+Conversion
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#convert-from-rdf-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.5
+</del>
+<ins class="diff-chg">5.16.3
+</ins>
+</span>
+<del class="diff-old">Value
+Expansion
+</del>
+<ins class="diff-chg">Convert
+from
+RDF
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#data-round-tripping" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.6
+</del>
+<ins class="diff-chg">5.16.4
+</ins>
+</span>
+<del class="diff-old">Value
+Compaction
+</del>
+<ins class="diff-chg">Data
+Round
+Tripping
+</ins>
+</a>
+</li>
+<del class="diff-old">4.7
+Expansion
+4.7.1
+Expansion
+Algorithm
+</del>
+</ul>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#the-application-programming-interface" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.8
+</del>
+<ins class="diff-chg">6.
+</ins>
+</span>
+<del class="diff-old">Compaction
+</del>
+<ins class="diff-chg">The
+Application
+Programming
+Interface
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#jsonldprocessor" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.8.1
+</del>
+<ins class="diff-chg">6.1
+</ins>
+</span>
+<del class="diff-old">Compaction
+Algorithm
+</del>
+<ins class="diff-chg">JsonLdProcessor
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#methods" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.9
+</del>
+<ins class="diff-chg">6.1.1
+</ins>
+</span>
+<del class="diff-old">Flattening
+</del>
+<ins class="diff-chg">Methods
+</ins>
+</a>
+</li>
+<del class="diff-old">4.9.1
+Flattening
+Algorithm
+</del>
+</ul>
+</li>
+<li class="tocline">
+<a href="#callbacks" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.9.2
+</del>
+<ins class="diff-chg">6.2
+</ins>
+</span>
+<del class="diff-old">Node
+Map
+Generation
+</del>
+<ins class="diff-chg">Callbacks
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#jsonldcallback" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.9.3
+</del>
+<ins class="diff-chg">6.2.1
+</ins>
+</span>
+<del class="diff-old">Generate
+Blank
+Node
+Identifier
+</del>
+<ins class="diff-chg">JsonLdCallback
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#data-structures" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.10
+</del>
+<ins class="diff-chg">6.3
+</ins>
+</span>
+<del class="diff-old">RDF
+Conversion
+</del>
+<ins class="diff-chg">Data
+Structures
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<del class="diff-old">4.10.1
+Overview
+4.10.2
+Parsing
+Examples
+</del>
+<a href="#jsonldoptions" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.10.3
+</del>
+<ins class="diff-chg">6.3.1
+</ins>
+</span>
+<del class="diff-old">Convert
+to
+RDF
+Algorithm
+</del>
+<ins class="diff-chg">JsonLdOptions
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#jsonldprocessingerror" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.10.4
+</del>
+<ins class="diff-chg">6.3.2
+</ins>
+</span>
+<del class="diff-old">List
+Conversion
+</del>
+<ins class="diff-chg">JsonLdProcessingError
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#jsonlderrorcode" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.10.5
+</del>
+<ins class="diff-chg">6.3.3
+</ins>
+</span>
+<del class="diff-old">Convert
+from
+RDF
+Algorithm
+</del>
+<ins class="diff-chg">JsonLdErrorCode
+</ins>
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<del class="diff-old">5.
+Data
+Round
+Tripping
+</del>
+<a href="#acknowledgements" class="tocxref">
+<span class="secno">
+A.
+</span>
+Acknowledgements
+</a>
+</li>
+<li class="tocline">
+<a href="#references" class="tocxref">
+<span class="secno">
+B.
+</span>
+References
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#normative-references" class="tocxref">
+<span class="secno">
+B.1
+</span>
+Normative
+references
+</a>
+</li>
+<li class="tocline">
+<a href="#informative-references" class="tocxref">
+<span class="secno">
+B.2
+</span>
+Informative
+references
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</section>
+<section class="informative" id="introduction">
+<h2>
+<span class="secno">
+1.
+</span>
+Introduction
+</h2>
+<p>
+<em>
+<ins class="diff-new">This
+section
+is
+non-normative.
+</ins></em></p>
+<p>
+This
+document
+is
+a
+detailed
+specification
+for
+an
+Application
+Programming
+Interface
+for
+the
+JSON-LD
+Syntax.
+The
+document
+is
+primarily
+intended
+for
+the
+following
+audiences:
+</p>
+<ul>
+<li>
+Web
+authors
+and
+developers
+that
+want
+a
+very
+detailed
+view
+of
+how
+a
+JSON-LD
+processor
+and
+the
+API
+operates.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+implement
+processors
+and
+APIs
+for
+JSON-LD.
+</li>
+</ul>
+<p>
+To
+understand
+the
+basics
+in
+this
+specification
+you
+must
+first
+be
+familiar
+with
+JSON,
+which
+is
+detailed
+in
+[
+<cite>
+<a class="bibref" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+].
+You
+must
+also
+understand
+the
+JSON-LD
+Syntax
+[
+<cite>
+<a class="bibref" href="#bib-JSON-LD">
+JSON-LD
+</a>
+</cite>
+],
+which
+is
+the
+base
+syntax
+used
+by
+all
+of
+the
+algorithms
+in
+this
+document.
+To
+understand
+the
+API
+and
+how
+it
+is
+intended
+to
+operate
+in
+a
+programming
+environment,
+it
+is
+useful
+to
+have
+working
+knowledge
+of
+the
+JavaScript
+programming
+language
+[
+<cite>
+<a class="bibref" href="#bib-ECMA-262">
+ECMA-262
+</a>
+</cite>
+]
+and
+WebIDL
+[
+<cite>
+<a class="bibref" href="#bib-WEBIDL">
+WEBIDL
+</a>
+</cite>
+].
+To
+understand
+how
+JSON-LD
+maps
+to
+RDF,
+it
+is
+helpful
+to
+be
+familiar
+with
+the
+basic
+RDF
+concepts
+[
+<cite>
+<a class="bibref" href="#bib-RDF-CONCEPTS">
+RDF-CONCEPTS
+</a>
+</cite>
+].
+</p>
+</section>
+<section class="informative" id="features">
+<h2>
+<span class="secno">
+2.
+</span>
+Features
+</h2>
+<p>
+<em>
+<ins class="diff-new">This
+section
+is
+non-normative.
+</ins></em></p>
+<p>
+The
+JSON-LD
+Syntax
+specification
+[
+<cite>
+<a class="bibref" href="#bib-JSON-LD">
+JSON-LD
+</a>
+</cite>
+]
+outlines
+a
+language
+that
+may
+be
+used
+to
+express
+Linked
+Data
+in
+JSON.
+Often,
+it
+is
+useful
+to
+be
+able
+to
+transform
+JSON-LD
+documents
+so
+that
+they
+may
+be
+easily
+processed
+in
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">various
+</ins>
+programming
+<del class="diff-old">environment
+like
+JavaScript,
+Python
+or
+Ruby.
+</del>
+<ins class="diff-chg">environments.
+</ins>
+</p>
+<p>
+There
+are
+four
+major
+types
+of
+transformation
+that
+are
+discussed
+in
+this
+<del class="diff-old">document;
+compaction,
+</del>
+<ins class="diff-chg">document:
+</ins>
+expansion,
+<ins class="diff-new">compaction,
+flattening,
+</ins>
+and
+RDF
+conversion.
+</p>
+<section class="informative" id="expansion">
+<h3>
+<span class="secno">
+2.1
+</span>
+Expansion
+</h3>
+<p>
+<em>
+<ins class="diff-new">This
+section
+is
+non-normative.
+</ins></em></p>
+<p>
+Software
+algorithms
+are
+easiest
+to
+write
+when
+the
+data
+that
+they
+are
+processing
+have
+a
+regular
+form.
+Since
+information
+can
+be
+represented
+by
+JSON-LD
+in
+a
+variety
+of
+different
+ways,
+transforming
+all
+of
+these
+methods
+into
+a
+uniform
+structure
+allows
+the
+developer
+to
+simplify
+their
+processing
+code.
+For
+example,
+note
+that
+the
+following
+input
+uses
+only
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+and
+is
+fairly
+compact:
+</p>
+<del class="diff-old"> var input1 = {
+ "@context": "http://json-ld.org/contexts/person.jsonld"
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/"
+</del>
+ <div class="example"><div class="example-title"><span>Example 1</span></div><pre class="example">{
+<ins class="diff-chg"> "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ },
+ "@id": "http://me.markus-lanthaler.com/",
+ "name": "Markus Lanthaler",
+ "homepage": "http://www.markus-lanthaler.com/"
+</ins>
+}
+</pre>
+</div>
+<p>
+The
+next
+input
+example
+uses
+one
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+to
+express
+a
+property,
+but
+leaves
+the
+rest
+of
+the
+information
+untouched.
+</p>
+<del class="diff-old"> var input2 = {
+ "@context": "http://json-ld.org/contexts/person.jsonld"
+ "": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/"
+</del>
+ <div class="example"><div class="example-title"><span>Example 2</span></div><pre class="example">{
+<ins class="diff-chg"> "@context": {
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ },
+ "@id": "http://me.markus-lanthaler.com/",
+ "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Markus Lanthaler",
+ "homepage": "http://www.markus-lanthaler.com/"
+</ins>
+}
+</pre>
+</div>
+<p>
+While
+both
+inputs
+are
+valid
+JSON-LD,
+writing
+a
+program
+to
+handle
+every
+permutation
+of
+possible
+inputs
+can
+be
+difficult,
+especially
+when
+the
+incoming
+context
+could
+change
+as
+well.
+To
+ensure
+that
+the
+data
+can
+be
+given
+a
+more
+uniform
+structure,
+JSON-LD
+introduces
+the
+notion
+of
+expansion.
+<dfn title="expansion" id="dfn-expansion">
+Expansion
+</dfn>
+performs
+two
+important
+operations.
+The
+first
+is
+to
+expand
+all
+values
+that
+<del class="diff-old">are
+</del>
+<ins class="diff-chg">represent
+</ins>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<del class="diff-old">IRI
+</del>
+<ins class="diff-chg">IRIs
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+to
+<del class="diff-old">their
+fully
+expanded
+form.
+</del>
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+<ins class="diff-chg">absolute
+IRIs
+</ins></a>.
+The
+second
+is
+to
+express
+all
+values
+in
+<a class="tref internalDFN" title="expanded_form" href="#dfn-expanded_form">
+expanded
+form
+<del class="diff-old">.
+To
+transform
+both
+inputs
+above
+to
+the
+same
+representation,
+</del>
+</a>.
+<ins class="diff-chg">Running
+</ins>
+the
+<del class="diff-old">developer
+could
+do
+</del>
+<a href="#expansion-algorithm">
+<ins class="diff-chg">Expansion
+algorithm
+</ins></a><ins class="diff-chg">
+against
+</ins>
+the
+<del class="diff-old">following:
+ function expansionCallback(output) {
+ console.log(output);
+}
+// the second parameter is 'null' because the developer does not wish to
+// inject another context value
+jsonld.expand(input1, null, expansionCallback);
+jsonld.expand(input2,
+null,
+expansionCallback);
+The
+output
+for
+both
+calls
+</del>
+<ins class="diff-chg">examples
+provided
+</ins>
+above
+<del class="diff-old">will
+be:
+</del>
+<ins class="diff-chg">results
+in
+the
+following
+output:
+</ins>
+</p>
+<del class="diff-old"> [{
+ "http://xmlns.com/foaf/0.1/name": [{
+ "@value": "Manu Sporny"
+ }],
+ "http://xmlns.com/foaf/0.1/homepage": [{
+ "@id": "http://manu.sporny.org/"
+ }]
+}]
+</del>
+ <div class="example"><div class="example-title"><span>Example 3</span></div><pre class="example">[
+<ins class="diff-chg"> {
+ "@id": "http://me.markus-lanthaler.com/",
+ "http://xmlns.com/foaf/0.1/name": [
+ { "@value": "Markus Lanthaler" }
+ ],
+ "http://xmlns.com/foaf/0.1/homepage": [
+ { "@id": "http://www.markus-lanthaler.com/" }
+ ]
+ }
+]
+</ins>
+</pre>
+</div>
+<p>
+Note
+that
+in
+the
+<del class="diff-old">example
+above;
+</del>
+<ins class="diff-chg">output
+above
+</ins>
+all
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+definitions
+have
+been
+removed,
+all
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">terms
+</ins>
+</a>
+and
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefixes
+</a>
+have
+been
+expanded
+to
+<del class="diff-old">full
+IRIs,
+</del>
+<ins class="diff-chg">absolute
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-chg">
+IRIs
+</ins></a>,
+and
+all
+<del class="diff-old">literal
+</del>
+<a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value">
+<ins class="diff-chg">JSON-LD
+values
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+are
+expressed
+in
+<a class="tref internalDFN" title="expanded_form" href="#dfn-expanded_form">
+expanded
+form
+</a>.
+While
+the
+output
+is
+more
+difficult
+for
+a
+human
+to
+read,
+it
+is
+easier
+for
+a
+software
+program
+to
+process
+because
+of
+its
+very
+regular
+structure.
+</p>
+</section>
+<section class="informative" id="compaction">
+<h3>
+<span class="secno">
+2.2
+</span>
+Compaction
+</h3>
+<p>
+<em>
+<ins class="diff-new">This
+section
+is
+non-normative.
+</ins></em></p>
+<p>
+While
+expansion
+expands
+a
+given
+input
+as
+much
+as
+possible,
+compaction
+performs
+the
+opposite
+<del class="diff-old">operation
+-
+expressing
+</del>
+<ins class="diff-chg">operation:
+it
+expresses
+</ins>
+a
+given
+input
+as
+succinctly
+as
+possible.
+<del class="diff-old">While
+</del>
+<ins class="diff-chg">In
+contrast
+to
+</ins>
+expansion
+<ins class="diff-new">which
+</ins>
+is
+meant
+to
+produce
+something
+that
+is
+easy
+to
+process
+by
+software
+programs,
+compaction
+is
+meant
+to
+produce
+something
+that
+is
+easy
+to
+read
+by
+software
+developers.
+Compaction
+uses
+a
+developer-supplied
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+to
+<del class="diff-old">compresses
+all
+</del>
+<ins class="diff-chg">compress
+</ins>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<del class="diff-old">IRI
+</del>
+<ins class="diff-chg">IRIs
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+to
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">terms
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+or
+<del class="diff-old">prefix
+</del>
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+<ins class="diff-chg">compact
+IRIs
+</ins>
+</a>
+<del class="diff-old">es,
+</del>
+and
+<del class="diff-old">compacts
+all
+literal
+</del>
+<a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value">
+<ins class="diff-chg">JSON-LD
+values
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+expressed
+in
+<a class="tref internalDFN" title="expanded_form" href="#dfn-expanded_form">
+expanded
+form
+</a>
+<ins class="diff-new">to
+simple
+values
+such
+</ins>
+as
+<del class="diff-old">much
+as
+possible.
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<ins class="diff-chg">strings
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="number" href="#dfn-number"><ins class="diff-chg">
+numbers
+</ins></a>.
+</p>
+<p>
+<del class="diff-old">The
+</del>
+<ins class="diff-chg">For
+example,
+assume
+the
+</ins>
+following
+<del class="diff-old">example
+expresses
+</del>
+<ins class="diff-chg">expanded
+JSON-LD
+</ins>
+input
+<del class="diff-old">that
+has
+already
+been
+fully
+expanded:
+</del>
+<ins class="diff-chg">document:
+</ins>
+</p>
+<del class="diff-old"> var expandedInput = [{
+ "http://xmlns.com/foaf/0.1/name": [{
+ "@value": "Manu Sporny"
+ }],
+ "http://xmlns.com/foaf/0.1/homepage": [{
+ "@id": "http://manu.sporny.org/"
+ }]
+}]
+</del>
+ <div class="example"><div class="example-title"><span>Example 4</span></div><pre class="example">[
+<ins class="diff-chg"> {
+ "@id": "http://me.markus-lanthaler.com/",
+ "http://xmlns.com/foaf/0.1/name": [
+ { "@value": "Markus Lanthaler" }
+ ],
+ "http://xmlns.com/foaf/0.1/homepage": [
+ { "@id": "http://www.markus-lanthaler.com/" }
+ ]
+ }
+]
+</ins>
+</pre>
+</div>
+<p>
+<del class="diff-old">A
+developer
+that
+wants
+to
+transform
+the
+data
+above
+into
+a
+more
+human-readable
+form,
+could
+do
+</del>
+<ins class="diff-chg">Additionally,
+assume
+</ins>
+the
+following
+<del class="diff-old">using
+the
+</del>
+<ins class="diff-chg">developer-supplied
+</ins>
+JSON-LD
+<del class="diff-old">API:
+</del>
+<a class="tref internalDFN" title="context" href="#dfn-context">
+<ins class="diff-chg">context
+</ins></a>:
+</p>
+<del class="diff-old"> function compactionCallback(output) {
+ console.log(output);
+</del>
+ <div class="example"><div class="example-title"><span>Example 5</span></div><pre class="example">{
+<ins class="diff-chg"> "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ }
+</ins>
+}
+<del class="diff-old">jsonld.compact(expandedInput,
+"http://json-ld.org/contexts/person.jsonld",
+compactionCallback);
+</del>
+</pre>
+</div>
+<p>
+<del class="diff-old">The
+following
+would
+be
+</del>
+<ins class="diff-chg">Running
+the
+</ins><a href="#compaction-algorithm"><ins class="diff-chg">
+Compaction
+Algorithm
+</ins></a><ins class="diff-chg">
+given
+</ins>
+the
+<ins class="diff-new">context
+supplied
+above
+against
+the
+JSON-LD
+input
+document
+provided
+above
+would
+</ins>
+result
+<del class="diff-old">of
+</del>
+<ins class="diff-chg">in
+</ins>
+the
+<del class="diff-old">call
+above:
+</del>
+<ins class="diff-chg">following
+output:
+</ins>
+</p>
+<del class="diff-old"> {
+ "@context": "http://json-ld.org/contexts/person.jsonld"
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/"
+</del>
+ <div class="example"><div class="example-title"><span>Example 6</span></div><pre class="example">{
+<ins class="diff-chg"> "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ },
+ "@id": "http://me.markus-lanthaler.com/",
+ "name": "Markus Lanthaler",
+ "homepage": "http://www.markus-lanthaler.com/"
+</ins>
+}
+</pre>
+</div>
+<p>
+Note
+that
+all
+<del class="diff-old">of
+the
+term
+</del>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<ins class="diff-chg">IRIs
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+have
+been
+<del class="diff-old">compressed
+and
+</del>
+<ins class="diff-chg">compacted
+to
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+terms
+</ins></a><ins class="diff-chg">
+as
+specified
+in
+</ins>
+the
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+<ins class="diff-new">which
+consequently
+</ins>
+has
+been
+injected
+into
+the
+output.
+While
+compacted
+output
+is
+most
+useful
+to
+humans,
+it
+can
+<ins class="diff-new">often
+</ins>
+also
+be
+<del class="diff-old">carefully
+</del>
+used
+to
+generate
+structures
+that
+are
+easy
+to
+<del class="diff-old">use
+for
+</del>
+<ins class="diff-chg">program
+against.
+Compaction
+enables
+</ins>
+developers
+to
+<del class="diff-old">program
+against
+as
+well.
+</del>
+<ins class="diff-chg">map
+any
+expanded
+document
+into
+an
+application-specific
+compacted
+document.
+While
+the
+context
+provided
+above
+mapped
+</ins><code><ins class="diff-chg">
+http://xmlns.com/foaf/0.1/name
+</ins></code><ins class="diff-chg">
+to
+</ins><code><ins class="diff-chg">
+name
+</ins></code>,<ins class="diff-chg">
+it
+could
+have
+also
+have
+been
+mapped
+to
+any
+other
+term
+provided
+by
+the
+developer.
+</ins>
+</p>
+</section>
+<section class="informative" id="flattening">
+<h3>
+<span class="secno">
+2.3
+</span>
+<ins class="diff-new">Flattening
+</ins></h3><p><em><ins class="diff-new">
+This
+section
+is
+non-normative.
+</ins></em></p><p><ins class="diff-new">
+While
+expansion
+ensures
+that
+a
+document
+is
+in
+a
+uniform
+structure,
+flattening
+goes
+a
+step
+further
+and
+ensures
+that
+also
+the
+shape
+of
+the
+data
+is
+deterministic.
+In
+expanded
+documents
+properties
+of
+a
+single
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-new">
+node
+</ins></a><ins class="diff-new">
+may
+still
+be
+spread
+across
+a
+number
+of
+different
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+objects
+</ins></a>.<ins class="diff-new">
+By
+flattening
+a
+document,
+all
+properties
+of
+a
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-new">
+node
+</ins></a><ins class="diff-new">
+are
+collected
+in
+a
+single
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+and
+all
+</ins><a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-new">
+blank
+nodes
+</ins></a><ins class="diff-new">
+are
+labeled
+with
+a
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-new">
+blank
+node
+identifier
+</ins></a>.<ins class="diff-new">
+Often
+this
+drastically
+simplifies
+the
+code
+to
+process
+JSON-LD
+data.
+</ins></p><p><ins class="diff-new">
+For
+example,
+assume
+the
+following
+JSON-LD
+input
+document:
+</ins></p> <div class="example"><div class="example-title"><span>Example 7</span></div><pre class="example">{<ins class="diff-new">
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "knows": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "@id": "http://me.markus-lanthaler.com/",
+ "name": "Markus Lanthaler",
+ "knows": [
+ {
+ "name": "Manu Sporny",
+ "knows": {
+ "@id": "http://greggkellogg.net/foaf#me"
+ }
+ },
+ {
+ "@id": "http://greggkellogg.net/foaf#me",
+ "name": "Gregg Kellogg"
+ }
+ ]
+}
+</ins></pre></div><p><ins class="diff-new">
+Running
+the
+</ins><a href="#flattening-algorithm"><ins class="diff-new">
+Flattening
+Algorithm
+</ins></a><ins class="diff-new">
+with
+a
+context
+set
+to
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-new">
+null
+</ins></a><ins class="diff-new">
+to
+prevent
+compaction
+returns
+the
+following
+document:
+</ins></p> <div class="example"><div class="example-title"><span>Example 8</span></div><pre class="example">[<ins class="diff-new">
+ {
+ "@id": "http://me.markus-lanthaler.com/",
+ "http://xmlns.com/foaf/0.1/name": [
+ { "@value": "Markus Lanthaler" }
+ ],
+ "http://xmlns.com/foaf/0.1/knows": [
+ { "@id": "_:t0" },
+ { "@id": "http://greggkellogg.net/foaf#me" }
+ ]
+ },
+ {
+ "@id": "_:t0",
+ "http://xmlns.com/foaf/0.1/name": [
+ { "@value": "Manu Sporny" }
+ ],
+ "http://xmlns.com/foaf/0.1/knows": [
+ { "@id": "http://greggkellogg.net/foaf#me" }
+ ]
+ },
+ {
+ "@id": "http://greggkellogg.net/foaf#me",
+ "http://xmlns.com/foaf/0.1/name": [
+ { "@value": "Gregg Kellogg" }
+ ]
+ }
+]
+</ins></pre></div><p><ins class="diff-new">
+Note
+how
+in
+the
+output
+above
+all
+properties
+of
+a
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-new">
+node
+</ins></a><ins class="diff-new">
+are
+collected
+in
+a
+single
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+and
+how
+the
+</ins><a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-new">
+blank
+node
+</ins></a><ins class="diff-new">
+representing
+"Manu
+Sporny"
+has
+been
+assigned
+the
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-new">
+blank
+node
+identifier
+</ins></a><code><ins class="diff-new">
+_:t0
+</ins></code>.</p><p><ins class="diff-new">
+To
+make
+it
+easier
+for
+humans
+to
+read
+such
+a
+flattened
+document
+can
+be
+compacted
+by
+passing
+a
+context.
+Using
+the
+same
+context
+as
+the
+input
+document,
+the
+flattened
+and
+compacted
+document
+looks
+as
+follows:
+</ins></p> <div class="example"><div class="example-title"><span>Example 9</span></div><pre class="example">{<ins class="diff-new">
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "knows": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "@graph": [
+ {
+ "@id": "http://me.markus-lanthaler.com/",
+ "name": "Markus Lanthaler",
+ "knows": [
+ { "@id": "_:t0" },
+ { "@id": "http://greggkellogg.net/foaf#me" }
+ ]
+ },
+ {
+ "@id": "_:t0",
+ "name": "Manu Sporny",
+ "knows": {
+ "@id": "http://greggkellogg.net/foaf#me"
+ }
+ },
+ {
+ "@id": "http://greggkellogg.net/foaf#me",
+ "name": "Gregg Kellogg"
+ }
+ ]
+}
+</ins></pre></div><p><ins class="diff-new">
+Please
+note
+that
+the
+flattened
+and
+compacted
+result
+will
+always
+explicitly
+designate
+the
+default
+by
+the
+</ins><code><ins class="diff-new">
+@graph
+</ins></code><ins class="diff-new">
+member
+in
+the
+top-level
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a>.<a href="#compaction"><ins class="diff-new">
+Compaction
+</ins></a><ins class="diff-new">
+optimizes
+that
+member
+away
+if
+its
+value
+contains
+just
+one
+item.
+</ins></p></section><section class="informative" id="rdf-conversion"><h3><span class="secno"><ins class="diff-new">
+2.4
+</ins></span>
+RDF
+Conversion
+</h3>
+<p>
+<em>
+<ins class="diff-new">This
+section
+is
+non-normative.
+</ins></em></p>
+<p>
+JSON-LD
+can
+be
+used
+to
+<del class="diff-old">losslessly
+express
+the
+RDF
+</del>
+<ins class="diff-chg">serialize
+</ins>
+data
+<del class="diff-old">model
+</del>
+<ins class="diff-chg">expressed
+in
+RDF
+</ins>
+as
+described
+in
+<del class="diff-old">the
+RDF
+Concepts
+document
+</del>
+[
+<cite>
+<a class="bibref" href="#bib-RDF-CONCEPTS">
+RDF-CONCEPTS
+</a>
+</cite>
+].
+This
+ensures
+that
+data
+can
+be
+round-tripped
+from
+<ins class="diff-new">and
+to
+</ins>
+any
+RDF
+<del class="diff-old">syntax,
+like
+N-Triples
+or
+TURTLE,
+</del>
+<ins class="diff-chg">syntax
+</ins>
+without
+any
+loss
+in
+the
+fidelity
+of
+the
+data.
+<del class="diff-old">Assume
+</del>
+</p>
+<p>
+<ins class="diff-chg">For
+example,
+assume
+</ins>
+the
+following
+RDF
+input
+<ins class="diff-new">serialized
+</ins>
+in
+<del class="diff-old">N-Triples
+format:
+</del>
+<ins class="diff-chg">Turtle
+[
+</ins><cite><a class="bibref" href="#bib-TURTLE-TR"><ins class="diff-chg">
+TURTLE-TR
+</ins></a></cite><ins class="diff-chg">
+]:
+</ins>
+</p>
+<del class="diff-old"> var data = "
+<http://manu.sporny.org/about/#manu> <http://xmlns.com/foaf/0.1/name> \"Manu Sporny\" .\n
+<http://manu.sporny.org/about/#manu>
+</del>
+ <div class="example"><div class="example-title"><span>Example 10</span></div><pre class="example"><http://me.markus-lanthaler.com/> <http://xmlns.com/foaf/0.1/name> "Markus Lanthaler" .
+<ins class="diff-chg"><http://me.markus-lanthaler.com/>
+</ins>
+<http://xmlns.com/foaf/0.1/homepage>
+<del class="diff-old"><http://manu.sporny.org/>
+.";
+</del>
+<ins class="diff-chg"><http://www.markus-lanthaler.com/>
+.
+</ins>
+</pre>
+</div>
+<p>
+<del class="diff-old">A
+developer
+can
+use
+</del>
+<ins class="diff-chg">Using
+</ins>
+the
+<del class="diff-old">JSON-LD
+API
+to
+</del>
+<a href="#convert-from-rdf-algorithm">
+<ins class="diff-chg">Convert
+from
+RDF
+Algorithm
+</ins></a><ins class="diff-chg">
+a
+developer
+could
+</ins>
+transform
+<del class="diff-old">the
+markup
+above
+</del>
+<ins class="diff-chg">this
+document
+</ins>
+into
+<del class="diff-old">a
+JSON-LD
+document:
+ function conversionCallback(result)
+{
+ console.log("JSON-LD Document: ", result);
+};
+jsonld.fromRDF(data,
+conversionCallback,
+{"format":
+"ntriples"});
+The
+following
+</del>
+expanded
+<del class="diff-old">output
+would
+be
+the
+result
+of
+the
+call
+above:
+</del>
+<ins class="diff-chg">JSON-LD:
+</ins>
+</p>
+<del class="diff-old"> [{
+ "@id": "http://manu.sporny.org/about/#manu",
+ "http://xmlns.com/foaf/0.1/name": [{
+ "@value": "Manu Sporny"
+ }],
+ "http://xmlns.com/foaf/0.1/homepage": [{
+ "@id": "http://manu.sporny.org/"
+ }]
+}]
+</del>
+ <div class="example"><div class="example-title"><span>Example 11</span></div><pre class="example">[
+<ins class="diff-chg"> {
+ "@id": "http://me.markus-lanthaler.com/",
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "Markus Lanthaler"
+ }
+ ],
+ "http://xmlns.com/foaf/0.1/homepage": [
+ {
+ "@id": "http://www.markus-lanthaler.com/"
+ }
+ ]
+ }
+]
+</ins>
+</pre>
+</div>
+<p>
+Note
+that
+the
+output
+<del class="diff-old">above,
+</del>
+<ins class="diff-chg">above
+</ins>
+could
+easily
+be
+compacted
+<del class="diff-old">to
+produce
+the
+following
+</del>
+using
+the
+technique
+outlined
+in
+the
+previous
+<del class="diff-old">section:
+ {
+ "@context": "http://json-ld.org/contexts/person.jsonld",
+ "@id": "http://manu.sporny.org/about/#manu",
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/"
+}
+Transforming
+</del>
+<ins class="diff-chg">section.
+It
+is
+also
+possible
+to
+transform
+</ins>
+the
+<del class="diff-old">node
+above
+</del>
+<ins class="diff-chg">JSON-LD
+document
+</ins>
+back
+to
+RDF
+<del class="diff-old">is
+as
+simple
+as
+calling
+</del>
+<ins class="diff-chg">using
+</ins>
+the
+<del class="diff-old">toRDF()
+method:
+</del>
+<a href="#convert-to-rdf-algorithm">
+<ins class="diff-chg">Convert
+to
+RDF
+Algorithm
+</ins></a>.
+</p>
+<del class="diff-old"> var jsonldDocument = ...; // assign the JSON-LD document here
+function rdfCallback(quads)
+{
+ console.log("RDF Data: ", quads);
+};
+jsonld.toRDF(jsonldDocument,
+rdfCallback);
+</del>
+</section>
+</section>
+<section id="conformance">
+<h2>
+<span class="secno">
+3.
+</span>
+<del class="diff-old">The
+Application
+Programming
+Interface
+</del>
+<ins class="diff-chg">Conformance
+</ins>
+</h2>
+<p>
+<del class="diff-old">This
+API
+provides
+a
+clean
+mechanism
+</del>
+<ins class="diff-chg">All
+examples
+and
+notes
+as
+well
+as
+sections
+marked
+as
+non-normative
+in
+this
+specification
+are
+non-normative.
+Everything
+else
+in
+this
+specification
+is
+normative.
+</ins></p><p><ins class="diff-chg">
+The
+keywords
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em>,<em class="rfc2119" title="must not"><ins class="diff-chg">
+must
+not
+</ins></em>,<em class="rfc2119" title="required"><ins class="diff-chg">
+required
+</ins></em>,<em class="rfc2119" title="should"><ins class="diff-chg">
+should
+</ins></em>,<em class="rfc2119" title="should not"><ins class="diff-chg">
+should
+not
+</ins></em>,<em class="rfc2119" title="recommended"><ins class="diff-chg">
+recommended
+</ins></em>,<em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em>,<ins class="diff-chg">
+and
+</ins><em class="rfc2119" title="optional"><ins class="diff-chg">
+optional
+</ins></em><ins class="diff-chg">
+in
+this
+specification
+are
+to
+be
+interpreted
+as
+described
+in
+[
+</ins><cite><a class="bibref" href="#bib-RFC2119"><ins class="diff-chg">
+RFC2119
+</ins></a></cite><ins class="diff-chg">
+].
+</ins></p><p><ins class="diff-chg">
+There
+are
+two
+classes
+of
+products
+</ins>
+that
+<del class="diff-old">enables
+developers
+</del>
+<ins class="diff-chg">can
+claim
+conformance
+</ins>
+to
+<del class="diff-old">convert
+</del>
+<ins class="diff-chg">this
+specification:
+</ins><a class="tref internalDFN" title="json-ld_implementation" href="#dfn-json-ld_implementation">
+JSON-LD
+<del class="diff-old">data
+into
+a
+</del>
+<ins class="diff-chg">Implementations
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="json-ld_processor" href="#dfn-json-ld_processor"><ins class="diff-chg">
+JSON-LD
+Processors
+</ins></a>.</p><p><ins class="diff-chg">
+A
+conforming
+</ins><dfn title="json-ld_implementation" id="dfn-json-ld_implementation"><ins class="diff-chg">
+JSON-LD
+Implementation
+</ins></dfn><ins class="diff-chg">
+is
+</ins>
+a
+<del class="diff-old">variety
+</del>
+<ins class="diff-chg">system
+capable
+</ins>
+of
+<del class="diff-old">output
+formats
+that
+are
+easier
+to
+work
+with
+</del>
+<ins class="diff-chg">transforming
+JSON-LD
+documents
+according
+the
+algorithms
+defined
+</ins>
+in
+<del class="diff-old">various
+programming
+languages.
+If
+a
+</del>
+<ins class="diff-chg">this
+specification.
+</ins></p><p><ins class="diff-chg">
+A
+conforming
+</ins><dfn title="json-ld_processor" id="dfn-json-ld_processor">
+JSON-LD
+<del class="diff-old">API
+</del>
+<ins class="diff-chg">Processor
+</ins></dfn>
+is
+<del class="diff-old">provided
+in
+</del>
+a
+<ins class="diff-new">conforming
+</ins><a class="tref internalDFN" title="json-ld_implementation" href="#dfn-json-ld_implementation"><ins class="diff-new">
+JSON-LD
+Implementation
+</ins></a><ins class="diff-new">
+that
+exposes
+the
+application
+</ins>
+programming
+<del class="diff-old">environment,
+</del>
+<ins class="diff-chg">interface
+(API)
+defined
+in
+this
+specification.
+</ins></p><p><ins class="diff-chg">
+The
+algorithms
+in
+this
+specification
+are
+generally
+written
+with
+more
+concern
+for
+clarity
+than
+over
+efficiency.
+Thus,
+JSON-LD
+Implementations
+and
+Processors
+may
+implement
+</ins>
+the
+<del class="diff-old">entirety
+of
+</del>
+<ins class="diff-chg">algorithms
+given
+in
+this
+specification
+in
+any
+way
+desired,
+so
+long
+as
+</ins>
+the
+<del class="diff-old">following
+API
+</del>
+<ins class="diff-chg">end
+result
+is
+indistinguishable
+from
+the
+result
+that
+would
+be
+obtained
+by
+the
+specification's
+algorithms.
+</ins></p><p><ins class="diff-chg">
+This
+specification
+does
+not
+define
+how
+JSON-LD
+Implementations
+or
+Processors
+handle
+non-conforming
+input
+documents.
+This
+implies
+that
+JSON-LD
+Implementations
+or
+Processors
+</ins><em class="rfc2119" title="must not">
+must
+<ins class="diff-new">not
+</ins>
+</em>
+<del class="diff-old">be
+implemented.
+</del>
+<ins class="diff-chg">attempt
+to
+correct
+malformed
+IRIs
+or
+language
+tags;
+however,
+they
+</ins><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em><ins class="diff-chg">
+issue
+validation
+warnings.
+</ins>
+</p>
+<del class="diff-old">3.1
+General
+Terminology
+</del>
+<div class="note">
+<div class="note-title">
+<span>
+<del class="diff-old">Issue
+</del>
+<ins class="diff-chg">Note
+</ins>
+</span>
+</div>
+<p class="">
+<del class="diff-old">The
+intent
+of
+the
+Working
+Group
+and
+the
+Editors
+</del>
+<ins class="diff-chg">Implementers
+can
+partially
+check
+their
+level
+</ins>
+of
+<del class="diff-old">this
+specification
+is
+</del>
+<ins class="diff-chg">conformance
+</ins>
+to
+<del class="diff-old">eventually
+align
+terminology
+used
+in
+</del>
+this
+<del class="diff-old">document
+with
+</del>
+<ins class="diff-chg">specification
+by
+successfully
+passing
+</ins>
+the
+<del class="diff-old">terminology
+used
+in
+</del>
+<ins class="diff-chg">test
+cases
+of
+</ins>
+the
+<del class="diff-old">RDF
+Concepts
+document
+to
+</del>
+<ins class="diff-chg">JSON-LD
+test
+suite
+[
+</ins><cite><a class="bibref" href="#bib-JSON-LD-TESTS"><ins class="diff-chg">
+JSON-LD-TESTS
+</ins></a></cite><ins class="diff-chg">
+].
+Note,
+however,
+that
+passing
+all
+</ins>
+the
+<del class="diff-old">extent
+to
+which
+it
+makes
+sense
+to
+do
+so.
+In
+general,
+if
+there
+is
+an
+analogue
+to
+terminology
+used
+in
+this
+document
+</del>
+<ins class="diff-chg">tests
+</ins>
+in
+the
+<del class="diff-old">RDF
+Concepts
+document,
+the
+preference
+is
+</del>
+<ins class="diff-chg">test
+suite
+does
+not
+imply
+complete
+conformance
+</ins>
+to
+<del class="diff-old">use
+</del>
+<ins class="diff-chg">this
+specification.
+It
+only
+implies
+that
+</ins>
+the
+<del class="diff-old">terminology
+in
+</del>
+<ins class="diff-chg">implementation
+conforms
+to
+aspects
+tested
+by
+</ins>
+the
+<del class="diff-old">RDF
+Concepts
+document.
+</del>
+<ins class="diff-chg">test
+suite.
+</ins>
+</p>
+</div>
+</section>
+<section id="general-terminology">
+<h2>
+<span class="secno">
+<ins class="diff-new">4.
+</ins></span><ins class="diff-new">
+General
+Terminology
+</ins></h2>
+<p>
+<del class="diff-old">The
+</del>
+<ins class="diff-chg">This
+document
+uses
+the
+</ins>
+following
+<del class="diff-old">is
+an
+explanation
+of
+</del>
+<ins class="diff-chg">terms
+as
+defined
+in
+JSON
+[
+</ins><cite><a class="bibref" href="#bib-RFC4627"><ins class="diff-chg">
+RFC4627
+</ins></a></cite><ins class="diff-chg">
+].
+Refer
+to
+</ins>
+the
+<del class="diff-old">general
+terminology
+used
+</del>
+<em>
+<ins class="diff-chg">JSON
+Grammar
+</ins></em><ins class="diff-chg">
+section
+</ins>
+in
+<del class="diff-old">this
+document:
+</del>
+<ins class="diff-chg">[
+</ins><cite><a class="bibref" href="#bib-RFC4627"><ins class="diff-chg">
+RFC4627
+</ins></a></cite><ins class="diff-chg">
+]
+for
+formal
+definitions.
+</ins>
+</p>
+<dl>
+<dt>
+<dfn title="json_object" id="dfn-json_object">
+JSON
+object
+</dfn>
+</dt>
+<dd>
+An
+object
+structure
+is
+represented
+as
+a
+pair
+of
+curly
+brackets
+surrounding
+zero
+or
+more
+<del class="diff-old">name-value
+</del>
+<ins class="diff-chg">key-value
+</ins>
+pairs.
+A
+<del class="diff-old">name
+</del>
+<ins class="diff-chg">key
+</ins>
+is
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>.
+A
+single
+colon
+comes
+after
+each
+<del class="diff-old">name,
+</del>
+<ins class="diff-chg">key,
+</ins>
+separating
+the
+<del class="diff-old">name
+</del>
+<ins class="diff-chg">key
+</ins>
+from
+the
+value.
+A
+single
+comma
+separates
+a
+value
+from
+a
+following
+<del class="diff-old">name.
+The
+names
+within
+an
+object
+should
+be
+unique.
+</del>
+<ins class="diff-chg">key.
+</ins>
+</dd>
+<dt>
+<dfn title="array" id="dfn-array">
+array
+</dfn>
+</dt>
+<dd>
+An
+array
+<ins class="diff-new">structure
+</ins>
+is
+represented
+as
+square
+brackets
+surrounding
+zero
+or
+more
+values
+<del class="diff-old">that
+</del>
+<ins class="diff-chg">(or
+elements).
+Elements
+</ins>
+are
+separated
+by
+commas.
+<ins class="diff-new">In
+JSON,
+an
+array
+is
+an
+</ins><em><ins class="diff-new">
+ordered
+</ins></em><ins class="diff-new">
+sequence
+of
+zero
+or
+more
+values.
+While
+JSON-LD
+uses
+the
+same
+array
+representation
+as
+JSON,
+the
+collection
+is
+</ins><em><ins class="diff-new">
+unordered
+</ins></em><ins class="diff-new">
+by
+default.
+While
+order
+is
+preserved
+in
+regular
+JSON
+arrays,
+it
+is
+not
+in
+regular
+JSON-LD
+arrays
+unless
+specific
+markup
+is
+provided
+(see
+</ins><a href="#sets-and-lists"></a><ins class="diff-new">
+).
+</ins>
+</dd>
+<dt>
+<dfn title="string" id="dfn-string">
+string
+</dfn>
+</dt>
+<dd>
+A
+string
+is
+a
+sequence
+of
+zero
+or
+more
+Unicode
+<del class="diff-old">(UTF-8)
+</del>
+characters,
+wrapped
+in
+double
+quotes,
+using
+backslash
+escapes
+(if
+necessary).
+A
+character
+is
+represented
+as
+a
+single
+character
+string.
+</dd>
+<dt>
+<dfn title="number" id="dfn-number">
+number
+</dfn>
+</dt>
+<dd>
+A
+number
+is
+similar
+to
+that
+used
+in
+most
+programming
+languages,
+except
+that
+the
+octal
+and
+hexadecimal
+formats
+are
+not
+used
+and
+that
+leading
+zeros
+are
+not
+allowed.
+</dd>
+<dt>
+<dfn title="true" id="dfn-true">
+true
+</dfn>
+and
+<dfn title="false" id="dfn-false">
+false
+</dfn>
+</dt>
+<dd>
+Values
+that
+are
+used
+to
+express
+one
+of
+two
+possible
+boolean
+states.
+</dd>
+<dt>
+<dfn title="null" id="dfn-null">
+null
+</dfn>
+</dt>
+<dd>
+The
+<del class="diff-old">use
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins></a><ins class="diff-chg">
+value.
+A
+key-value
+pair
+in
+the
+</ins><code><ins class="diff-chg">
+@context
+</ins></code><ins class="diff-chg">
+where
+the
+value,
+or
+the
+</ins><code><ins class="diff-chg">
+@id
+</ins></code>
+of
+the
+<ins class="diff-new">value,
+is
+</ins>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>
+<del class="diff-old">value
+within
+</del>
+<ins class="diff-chg">explicitly
+decouples
+a
+term's
+association
+with
+an
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>.<ins class="diff-chg">
+A
+key-value
+pair
+in
+the
+body
+of
+a
+</ins>
+JSON-LD
+<ins class="diff-new">document
+whose
+value
+</ins>
+is
+<del class="diff-old">used
+to
+ignore
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins></a><ins class="diff-chg">
+has
+the
+same
+meaning
+as
+if
+the
+key-value
+pair
+was
+not
+defined.
+If
+</ins><code><ins class="diff-chg">
+@value
+</ins></code>,<code><ins class="diff-chg">
+@list
+</ins></code>,
+or
+<del class="diff-old">reset
+values.
+</del>
+<code>
+<ins class="diff-chg">@set
+</ins></code><ins class="diff-chg">
+is
+set
+to
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a><ins class="diff-chg">
+in
+expanded
+form,
+then
+the
+entire
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+is
+ignored.
+</ins>
+</dd>
+</dl>
+<p>
+<ins class="diff-new">Furthermore,
+the
+following
+terminology
+is
+used
+throughout
+this
+document:
+</ins></p><dl>
+<dt>
+<dfn title="keyword" id="dfn-keyword">
+keyword
+</dfn>
+</dt>
+<dd>
+A
+JSON
+key
+that
+is
+specific
+to
+JSON-LD,
+specified
+in
+the
+JSON-LD
+Syntax
+specification
+[
+<cite>
+<a class="bibref" href="#bib-JSON-LD">
+JSON-LD
+</a>
+</cite>
+]
+in
+the
+section
+titled
+<cite>
+<a href="../json-ld-syntax/#syntax-tokens-and-keywords">
+Syntax
+Tokens
+and
+Keywords
+</a>
+</cite>.
+</dd>
+<dt>
+<dfn title="context" id="dfn-context">
+context
+</dfn>
+</dt>
+<dd>
+A
+a
+set
+of
+rules
+for
+interpreting
+a
+JSON-LD
+document
+as
+specified
+in
+<cite>
+<a href="../json-ld-syntax/#the-context">
+The
+Context
+</a>
+</cite>
+of
+the
+[
+<cite>
+<a class="bibref" href="#bib-JSON-LD">
+JSON-LD
+</a>
+</cite>
+]
+specification.
+</dd>
+<dt>
+<del class="diff-old">IRI
+An
+Internationalized
+Resource
+Identifier
+as
+described
+in
+[
+RFC3987
+].
+Linked
+Data
+A
+set
+of
+documents,
+each
+containing
+a
+representation
+of
+a
+linked
+data
+graph
+.
+linked
+data
+graph
+</del>
+<dfn title="json-ld_document" id="dfn-json-ld_document">
+<ins class="diff-chg">JSON-LD
+document
+</ins>
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">An
+unordered
+labeled
+directed
+graph,
+where
+nodes
+are
+IRIs
+or
+Blank
+Nodes
+,
+or
+other
+values.
+</del>
+A
+<del class="diff-old">linked
+data
+graph
+</del>
+<a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">
+<ins class="diff-chg">JSON-LD
+document
+</ins>
+</a>
+is
+a
+<del class="diff-old">generalized
+representation
+</del>
+<ins class="diff-chg">serialization
+</ins>
+of
+a
+<del class="diff-old">RDF
+graph
+</del>
+<ins class="diff-chg">collection
+of
+</ins><a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph"><ins class="diff-chg">
+JSON-LD
+graphs
+</ins>
+</a>
+<del class="diff-old">as
+defined
+in
+[
+RDF-CONCEPTS
+</del>
+<ins class="diff-chg">and
+comprises
+exactly
+one
+</ins><a class="tref internalDFN" title="default_graph" href="#dfn-default_graph"><ins class="diff-chg">
+default
+graph
+</ins>
+</a>
+<del class="diff-old">].
+</del>
+<ins class="diff-chg">and
+zero
+or
+more
+</ins><a class="tref internalDFN" title="named_graph" href="#dfn-named_graph"><ins class="diff-chg">
+named
+graphs
+</ins></a>.
+</dd>
+<dt>
+<dfn title="named_graph" id="dfn-named_graph">
+named
+graph
+</dfn>
+</dt>
+<dd>
+A
+<del class="diff-old">linked
+data
+</del>
+<ins class="diff-chg">named
+</ins>
+graph
+<del class="diff-old">that
+</del>
+is
+<del class="diff-old">identified
+by
+</del>
+<ins class="diff-chg">a
+pair
+consisting
+of
+</ins>
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">.
+</del>
+</a>
+<ins class="diff-chg">or
+</ins><a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-chg">
+blank
+node
+</ins></a><ins class="diff-chg">
+(the
+</ins>
+<dfn title="graph_name" id="dfn-graph_name">
+graph
+name
+</dfn>
+<del class="diff-old">The
+IRI
+identifying
+</del>
+<ins class="diff-chg">)
+and
+</ins>
+a
+<del class="diff-old">named
+</del>
+<a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">
+<ins class="diff-chg">JSON-LD
+</ins>
+graph
+</a>.
+</dd>
+<dt>
+<dfn title="default_graph" id="dfn-default_graph">
+default
+graph
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">When
+executing
+an
+algorithm,
+the
+graph
+where
+data
+should
+be
+placed
+if
+a
+named
+graph
+is
+not
+specified.
+node
+A
+piece
+of
+information
+that
+is
+represented
+in
+a
+linked
+data
+</del>
+<ins class="diff-chg">The
+default
+</ins>
+graph
+<del class="diff-old">.
+node
+definition
+A
+JSON
+object
+used
+to
+represent
+a
+node
+and
+one
+or
+more
+properties
+of
+that
+node.
+A
+JSON
+object
+</del>
+is
+<del class="diff-old">a
+node
+definition
+if
+it
+does
+not
+contain
+</del>
+the
+<del class="diff-old">keys
+@value
+,
+@list
+or
+@set
+and
+it
+has
+one
+or
+more
+keys
+other
+than
+@id
+.
+node
+reference
+A
+JSON
+object
+used
+to
+reference
+a
+node
+having
+</del>
+only
+<del class="diff-old">the
+@id
+key.
+blank
+node
+A
+node
+in
+the
+linked
+data
+</del>
+graph
+<del class="diff-old">that
+does
+not
+contain
+a
+de-referenceable
+identifier
+because
+it
+is
+either
+ephemeral
+in
+nature
+or
+does
+not
+contain
+information
+that
+needs
+to
+be
+linked
+to
+from
+outside
+of
+the
+linked
+data
+graph.
+A
+blank
+node
+is
+assigned
+an
+identifier
+starting
+with
+the
+prefix
+_:
+.
+property
+The
+IRI
+label
+of
+an
+edge
+</del>
+in
+a
+<del class="diff-old">linked
+data
+</del>
+<ins class="diff-chg">JSON-LD
+document
+which
+has
+no
+</ins><a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">
+graph
+<ins class="diff-new">name
+</ins>
+</a>.
+</dd>
+<dt>
+<del class="diff-old">subject
+A
+node
+in
+a
+linked
+data
+</del>
+<dfn title="json-ld_graph" id="dfn-json-ld_graph">
+<ins class="diff-chg">JSON-LD
+</ins>
+graph
+<del class="diff-old">with
+at
+least
+one
+outgoing
+edge,
+related
+to
+an
+object
+node
+through
+a
+property
+.
+object
+</del>
+</dfn>
+</dt>
+<dd>
+A
+<del class="diff-old">node
+in
+</del>
+<ins class="diff-chg">labeled
+directed
+graph,
+i.e.,
+</ins>
+a
+<del class="diff-old">linked
+data
+graph
+with
+at
+least
+one
+incoming
+edge.
+quad
+A
+piece
+</del>
+<ins class="diff-chg">set
+</ins>
+of
+<del class="diff-old">information
+that
+contains
+four
+items;
+a
+subject
+,
+a
+property
+,
+an
+object
+,
+and
+a
+graph
+name
+.
+literal
+An
+object
+expressed
+as
+a
+value
+such
+as
+a
+string,
+number
+or
+in
+expanded
+form.
+3.2
+JsonLdProcessor
+The
+JSON-LD
+processor
+interface
+is
+the
+high-level
+programming
+structure
+that
+developers
+use
+to
+access
+the
+JSON-LD
+transformation
+methods.
+Note
+The
+JSON-LD
+API
+signatures
+are
+the
+same
+across
+all
+programming
+languages.
+Due
+to
+the
+fact
+that
+asynchronous
+programming
+is
+uncommon
+in
+certain
+languages,
+developers
+may
+implement
+a
+processor
+with
+a
+synchronous
+interface
+instead.
+In
+that
+case,
+the
+callback
+parameter
+must
+not
+be
+included
+and
+the
+result
+must
+be
+returned
+as
+a
+return
+value
+instead.
+ ]
+interface {
+};
+3.2.1
+Methods
+compact
+Compacts
+</del>
+<a class="tref internalDFN" title="node" href="#dfn-node">
+<ins class="diff-chg">nodes
+</ins>
+</a>
+<del class="diff-old">the
+given
+input
+using
+the
+context
+according
+to
+the
+steps
+in
+the
+Compaction
+Algorithm
+.
+The
+input
+must
+be
+copied,
+compacted
+and
+returned
+if
+there
+are
+no
+errors.
+If
+the
+compaction
+fails,
+an
+appropriate
+error
+must
+be
+returned
+via
+the
+callback.
+INVALID_SYNTAX
+A
+general
+syntax
+error
+was
+detected
+in
+the
+@context
+.
+For
+example,
+if
+a
+@type
+key
+maps
+to
+anything
+other
+than
+@id
+or
+an
+absolute
+IRI
+</del>
+<ins class="diff-chg">connected
+by
+</ins><a class="tref internalDFN" title="edge" href="#dfn-edge"><ins class="diff-chg">
+edges
+</ins>
+</a>,
+<del class="diff-old">this
+error
+would
+be
+returned
+via
+the
+callback
+.
+LOAD_ERROR
+There
+was
+a
+problem
+encountered
+loading
+a
+remote
+context.
+LOSSY_COMPACTION
+The
+compaction
+would
+lead
+to
+a
+loss
+of
+information,
+such
+</del>
+as
+<del class="diff-old">a
+@language
+value.
+CONFLICTING_DATATYPES
+The
+target
+datatype
+</del>
+specified
+in
+the
+<del class="diff-old">coercion
+rule
+and
+the
+datatype
+for
+the
+typed
+literal
+do
+not
+match.
+LIST_OF_LISTS_DETECTED
+A
+list
+of
+lists
+was
+detected.
+The
+list
+of
+lists
+feature
+is
+not
+supported
+in
+this
+version
+of
+JSON-LD
+due
+to
+the
+algorithmic
+complexity
+associated
+with
+conversion
+to
+RDF.
+Parameter
+Type
+Nullable
+Optional
+Description
+input
+</del>
+<cite>
+<del class="diff-old">object
+or
+object[]
+or
+IRI
+</del>
+<a href="../json-ld-syntax/#data-model">
+<ins class="diff-chg">Data
+Model
+</ins>
+</a>
+<del class="diff-old">✘
+✘
+The
+JSON-LD
+object
+or
+array
+</del>
+</cite>
+<ins class="diff-chg">section
+</ins>
+of
+<del class="diff-old">JSON-LD
+objects
+to
+perform
+the
+compaction
+upon
+or
+an
+IRI
+referencing
+</del>
+the
+JSON-LD
+<del class="diff-old">document
+to
+compact.
+context
+object
+or
+IRI
+✘
+✘
+The
+context
+to
+use
+when
+compacting
+the
+input
+;
+either
+in
+the
+form
+of
+an
+JSON
+object
+or
+as
+IRI
+.
+callback
+JsonLdCallback
+✘
+✘
+A
+callback
+that
+is
+called
+when
+processing
+is
+complete
+on
+the
+given
+input
+.
+options
+JsonLdOptions
+✔
+✔
+A
+set
+of
+options
+that
+may
+affect
+the
+expansion
+algorithm
+such
+as,
+e.g.,
+the
+input
+document's
+base
+IRI
+.
+This
+also
+includes
+optimize
+,
+which
+if
+set
+will
+cause
+processor-specific
+optimization.
+Return
+type:
+</del>
+<ins class="diff-chg">syntax
+specification
+[
+</ins><cite>
+<del class="diff-old">void
+</del>
+<a class="bibref" href="#bib-JSON-LD">
+<ins class="diff-chg">JSON-LD
+</ins>
+</a>
+</cite>
+<ins class="diff-chg">].
+</ins>
+</dd>
+<dt>
+<del class="diff-old">expand
+</del>
+<dfn title="edge" id="dfn-edge">
+<ins class="diff-chg">edge
+</ins></dfn>
+</dt>
+<dd>
+<del class="diff-old">Expands
+</del>
+<ins class="diff-chg">Every
+</ins><a class="tref internalDFN" title="edge" href="#dfn-edge"><ins class="diff-chg">
+edge
+</ins>
+</a>
+<del class="diff-old">the
+given
+input
+according
+to
+the
+steps
+in
+the
+Expansion
+Algorithm
+.
+The
+input
+must
+be
+copied,
+expanded
+and
+returned
+if
+there
+are
+no
+errors.
+If
+the
+expansion
+fails,
+an
+appropriate
+error
+must
+be
+returned
+via
+the
+callback.
+INVALID_SYNTAX
+A
+general
+syntax
+error
+was
+detected
+in
+the
+@context
+.
+For
+example,
+if
+a
+@type
+key
+maps
+to
+anything
+other
+than
+@id
+or
+an
+absolute
+IRI
+,
+this
+error
+type
+will
+be
+set
+in
+the
+error
+sent
+to
+the
+callback
+.
+LOAD_ERROR
+There
+was
+a
+problem
+encountered
+loading
+</del>
+<ins class="diff-chg">has
+</ins>
+a
+<del class="diff-old">remote
+context.
+LIST_OF_LISTS_DETECTED
+A
+list
+of
+lists
+was
+detected.
+The
+list
+of
+lists
+feature
+is
+not
+supported
+in
+this
+version
+of
+JSON-LD
+due
+to
+the
+algorithmic
+complexity
+</del>
+<ins class="diff-chg">direction
+</ins>
+associated
+with
+<del class="diff-old">conversion
+to
+RDF.
+Parameter
+Type
+Nullable
+Optional
+Description
+input
+object
+or
+object[]
+or
+IRI
+✘
+✘
+The
+JSON-LD
+object
+or
+array
+of
+JSON-LD
+objects
+to
+perform
+the
+expansion
+upon
+or
+</del>
+<ins class="diff-chg">it
+and
+is
+labeled
+with
+</ins>
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+<del class="diff-old">referencing
+the
+JSON-LD
+document
+to
+expand.
+context
+object
+</del>
+or
+<del class="diff-old">IRI
+✔
+✘
+An
+optional
+external
+context
+to
+use
+additionally
+to
+the
+context
+embedded
+in
+input
+when
+expanding
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-chg">
+blank
+node
+identifier
+</ins></a>.<ins class="diff-chg">
+Within
+</ins>
+the
+<del class="diff-old">input
+.
+callback
+JsonLdCallback
+✘
+✘
+A
+callback
+that
+is
+</del>
+<ins class="diff-chg">JSON-LD
+syntax
+these
+edge
+labels
+are
+</ins>
+called
+<del class="diff-old">when
+processing
+is
+complete
+on
+the
+given
+input
+.
+options
+JsonLdOptions
+</del>
+<dfn title="property" id="dfn-property">
+<ins class="diff-chg">properties
+</ins></dfn>.<ins class="diff-chg">
+Whenever
+possible,
+an
+</ins><a class="tref internalDFN" title="edge" href="#dfn-edge"><ins class="diff-chg">
+edge
+</ins>
+</a>
+<del class="diff-old">✔
+✔
+A
+set
+of
+options
+that
+may
+</del>
+<em class="rfc2119" title="should">
+<ins class="diff-chg">should
+</ins>
+</em>
+<del class="diff-old">affect
+the
+expansion
+algorithm
+such
+as,
+e.g.,
+the
+input
+document's
+base
+</del>
+<ins class="diff-chg">be
+labeled
+with
+an
+</ins>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+<del class="diff-old">Return
+type:
+void
+</del>
+</dd>
+<dt>
+<del class="diff-old">fromRDF
+</del>
+<dfn title="node" id="dfn-node">
+<ins class="diff-chg">node
+</ins></dfn>
+</dt>
+<dd>
+<del class="diff-old">Creates
+a
+JSON-LD
+document
+given
+an
+set
+of
+Quads
+.
+Parameter
+Type
+Nullable
+Optional
+Description
+input
+Quad
+[]
+✘
+✘
+A
+set
+of
+linked
+data
+graph
+s
+represented
+as
+an
+array
+of
+Quads
+.
+callback
+JsonLdCallback
+</del>
+<ins class="diff-chg">Every
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-chg">
+node
+</ins>
+</a>
+<del class="diff-old">✘
+✘
+A
+callback
+that
+is
+called
+when
+processing
+</del>
+is
+<del class="diff-old">complete
+on
+the
+given
+input
+.
+options
+JsonLdOptions
+✔
+✔
+A
+set
+of
+options
+that
+will
+affect
+the
+algorithm.
+This
+includes
+notType
+,
+which
+if
+set
+to
+true
+causes
+the
+resulting
+document
+to
+use
+rdf:type
+as
+a
+property,
+instead
+of
+@type
+.
+Return
+type:
+void
+toRDF
+Processes
+the
+input
+according
+to
+the
+Convert
+to
+RDF
+Algorithm
+,
+calling
+the
+provided
+callback
+for
+each
+Quad
+generated.
+INVALID_SYNTAX
+A
+general
+syntax
+error
+was
+detected
+in
+the
+@context
+.
+For
+example,
+if
+a
+@type
+key
+maps
+to
+anything
+other
+than
+@id
+or
+</del>
+an
+<del class="diff-old">absolute
+</del>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+<del class="diff-old">this
+error
+will
+be
+returned.
+LOAD_ERROR
+There
+was
+</del>
+a
+<del class="diff-old">problem
+encountered
+loading
+</del>
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+<ins class="diff-chg">blank
+node
+</ins></a>,
+a
+<del class="diff-old">remote
+context.
+LIST_OF_LISTS_DETECTED
+A
+list
+of
+lists
+was
+detected.
+This
+is
+not
+supported
+in
+this
+version
+of
+JSON-LD.
+Parameter
+Type
+Nullable
+Optional
+Description
+input
+object
+or
+object[]
+or
+IRI
+✘
+✘
+The
+JSON-LD
+object
+or
+array
+of
+</del>
+<a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value">
+JSON-LD
+<del class="diff-old">objects
+to
+convert
+to
+RDF
+</del>
+<ins class="diff-chg">value
+</ins></a>,
+or
+a
+<del class="diff-old">IRI
+referencing
+the
+JSON-LD
+document
+to
+convert
+to
+RDF.
+callback
+QuadCallback
+✘
+✘
+A
+callback
+that
+is
+called
+when
+a
+Quad
+is
+created
+from
+processing
+the
+given
+input
+.
+options
+JsonLdOptions
+✔
+✔
+</del>
+<a class="tref internalDFN" title="list" href="#dfn-list">
+<ins class="diff-chg">list
+</ins></a>.</dd><dt>
+<del class="diff-old">A
+set
+of
+options
+that
+may
+affect
+the
+conversion
+to
+RDF
+such
+as,
+e.g.,
+the
+input
+document's
+base
+</del>
+<dfn title="iri" id="dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">.
+Return
+type:
+void
+3.3
+Callbacks
+Issue
+153
+Developers
+should
+note
+that
+the
+details
+of
+error
+handling
+and
+conformance
+handling
+are
+being
+actively
+debated.
+JSON-LD
+processors
+utilize
+a
+variety
+of
+callbacks
+in
+order
+to
+return
+information
+in
+an
+asynchronous
+manner
+to
+calling
+applications.
+This
+section
+details
+the
+parameters
+sent
+to
+those
+callbacks
+as
+well
+as
+the
+desired
+operation
+of
+the
+callbacks.
+3.3.1
+JsonLdProcessingError
+The
+JsonLdError
+type
+is
+used
+to
+encapsulate
+a
+variety
+of
+parameters
+that
+outline
+the
+cause
+of
+a
+particular
+JsonLdProcessor
+error.
+ {
+};
+Dictionary
+JsonLdProcessingError
+Members
+operation
+of
+type
+string
+a
+string
+representing
+the
+operation
+that
+was
+being
+performed
+when
+the
+conformance
+issue
+was
+raised.
+Valid
+values
+for
+the
+string
+include
+compact
+,
+expand
+,
+toRDF
+,
+and
+fromRDF
+.
+source
+of
+type
+array
+of
+object
+or
+object
+</del>
+</dfn>
+</dt>
+<dd>
+An
+<del class="diff-old">object
+reference
+to
+the
+original
+JSON-LD
+document
+being
+processed.
+sourceKey
+of
+type
+string
+The
+key
+value
+associated
+with
+the
+value
+that
+triggered
+the
+conformance
+issue.
+sourceValue
+of
+type
+object
+or
+object[]
+or
+string
+or
+number
+The
+value
+that
+triggered
+the
+conformance
+issue.
+type
+of
+type
+string
+a
+string
+representing
+the
+particular
+error
+type,
+such
+as
+LIST_OF_LISTS_DETECTED
+,
+as
+described
+in
+the
+various
+algorithms
+in
+this
+document.
+3.3.2
+JsonLdCallback
+The
+JsonLdCallback
+is
+used
+to
+return
+a
+processed
+JSON-LD
+representation
+as
+the
+result
+of
+processing
+an
+API
+method.
+ ]
+interface {
+};
+Methods
+processingComplete
+This
+callback
+is
+invoked
+when
+processing
+is
+complete.
+Parameter
+Type
+Nullable
+Optional
+Description
+error
+JsonLdProcessingError
+✘
+✘
+If
+the
+value
+is
+null
+,
+then
+no
+error
+occurred.
+If
+the
+value
+is
+non-
+null
+,
+a
+processing
+error
+occurred
+and
+the
+details
+will
+be
+contained
+within
+the
+error
+object.
+document
+object
+or
+object
+[]
+✘
+✘
+The
+processed
+JSON-LD
+document.
+Return
+type:
+void
+3.3.3
+QuadCallback
+The
+QuadCallback
+is
+called
+whenever
+the
+processor
+generates
+a
+quad
+during
+processing.
+ ]
+interface {
+};
+Methods
+quad
+This
+callback
+is
+invoked
+whenever
+a
+quad
+is
+generated
+by
+the
+processor.
+Parameter
+Type
+Nullable
+Optional
+Description
+error
+JsonLdProcessingError
+✘
+✘
+If
+the
+value
+is
+null
+,
+then
+no
+error
+occurred.
+If
+the
+value
+is
+non-
+null
+,
+a
+processing
+error
+occurred
+and
+the
+details
+will
+be
+contained
+within
+the
+error
+object.
+quad
+Quad
+✘
+✘
+If
+there
+is
+no
+error,
+the
+quad
+that
+was
+generated.
+Return
+type:
+void
+3.3.4
+ConformanceCallback
+The
+ConformanceCallback
+may
+be
+specified
+in
+the
+</del>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<del class="diff-old">JsonLdOptions
+</del>
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr>
+</a>
+<del class="diff-old">via
+the
+conformanceCallback
+parameter.
+If
+specified,
+the
+callback
+is
+called
+whenever
+a
+recoverable
+conformance
+issue
+is
+detected.
+The
+developer
+may
+then
+determine
+whether
+or
+not
+processing
+should
+continue
+based
+on
+the
+type
+of
+conformance
+issue.
+ ]
+interface {
+};
+Methods
+issue
+This
+callback
+</del>
+<ins class="diff-chg">(Internationalized
+Resource
+Identifier)
+</ins>
+is
+<del class="diff-old">invoked
+when
+</del>
+a
+<del class="diff-old">conformance
+issue
+is
+detected
+by
+the
+JSON-LD
+processor.
+Parameter
+Type
+Nullable
+Optional
+Description
+issue
+JsonLdProcessingError
+✘
+✘
+Details
+about
+the
+conformance
+issue.
+callback
+function
+✘
+✘
+A
+function
+that
+must
+be
+called
+when
+the
+program
+has
+determined
+how
+to
+respond
+to
+the
+conformance
+issue.
+A
+single
+parameter
+must
+be
+passed
+to
+the
+callback.
+The
+value
+of
+the
+parameter
+should
+be
+null
+if
+processing
+should
+continue
+by
+acting
+as
+if
+the
+key-value
+</del>
+<ins class="diff-chg">string
+</ins>
+that
+<del class="diff-old">triggered
+the
+issue
+never
+existed.
+The
+issue
+should
+be
+passed
+</del>
+<ins class="diff-chg">conforms
+</ins>
+to
+the
+<del class="diff-old">callback
+without
+modification
+if
+processing
+should
+stop.
+Return
+type:
+</del>
+<ins class="diff-chg">syntax
+defined
+in
+[
+</ins><cite>
+<del class="diff-old">void
+</del>
+<a class="bibref" href="#bib-RFC3987">
+<ins class="diff-chg">RFC3987
+</ins>
+</a>
+</cite>
+<ins class="diff-chg">].
+</ins>
+</dd>
+<dt>
+<del class="diff-old">3.4
+Data
+Structures
+This
+section
+describes
+datatype
+definitions
+used
+within
+the
+JSON-LD
+API.
+3.4.1
+</del>
+<dfn title="absolute_iri" id="dfn-absolute_iri">
+<ins class="diff-chg">absolute
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">The
+IRI
+datatype
+is
+a
+string
+representation
+of
+an
+</del>
+</dfn>
+</dt>
+<dd>
+<ins class="diff-new">An
+absolute
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">.
+typedef
+DOMString
+IRI
+;
+This
+datatype
+indicates
+that
+the
+string
+</del>
+is
+<del class="diff-old">interpreted
+as
+an
+Internationalized
+Resource
+Identifier
+</del>
+<ins class="diff-chg">defined
+in
+</ins>
+[
+<cite>
+<a class="bibref" href="#bib-RFC3987">
+RFC3987
+</a>
+</cite>
+]
+<del class="diff-old">identifying
+a
+document,
+which
+when
+parsed
+as
+JSON
+yields
+either
+a
+JSON
+object
+or
+array
+.
+3.4.2
+JsonLdOptions
+The
+JsonLdOptions
+type
+is
+used
+to
+pass
+various
+options
+to
+the
+JsonLdProcessor
+methods.
+ {
+};
+Dictionary
+JsonLdOptions
+Members
+base
+of
+type
+IRI
+,
+nullable
+The
+Base
+IRI
+to
+use
+when
+expanding
+the
+document.
+This
+overrides
+the
+value
+of
+input
+if
+it
+is
+</del>
+<ins class="diff-chg">containing
+</ins>
+a
+<del class="diff-old">IRI
+.
+If
+not
+specified
+and
+</del>
+<em>
+<del class="diff-old">input
+</del>
+<ins class="diff-chg">scheme
+</ins>
+</em>
+<del class="diff-old">is
+not
+an
+IRI
+,
+the
+base
+IRI
+defaults
+to
+the
+current
+document
+IRI
+if
+in
+a
+browser
+context,
+or
+the
+empty
+string
+if
+there
+is
+no
+document
+context.
+compactArrays
+of
+type
+boolean
+,
+defaulting
+to
+true
+If
+set
+to
+true
+,
+the
+JSON-LD
+processor
+replaces
+arrays
+with
+just
+one
+element
+with
+that
+element
+during
+compaction.
+If
+set
+to
+false
+,
+all
+arrays
+will
+remain
+arrays
+even
+if
+they
+have
+just
+one
+element.
+conformanceCallback
+of
+type
+function
+,
+defaulting
+to
+null
+The
+purpose
+of
+this
+option
+is
+to
+instruct
+the
+processor
+about
+whether
+or
+not
+it
+should
+continue
+processing.
+If
+the
+value
+is
+null
+,
+the
+processor
+should
+ignore
+any
+key-value
+pair
+associated
+</del>
+<ins class="diff-chg">along
+</ins>
+with
+<del class="diff-old">any
+recoverable
+conformance
+issue
+and
+continue
+processing.
+More
+details
+about
+this
+feature
+can
+be
+found
+in
+the
+ConformanceCallback
+section.
+flatten
+of
+type
+boolean
+,
+defaulting
+to
+false
+If
+set
+to
+</del>
+a
+<del class="diff-old">value
+that
+is
+not
+false
+,
+the
+JSON-LD
+processor
+must
+modify
+the
+output
+of
+the
+Compaction
+Algorithm
+or
+the
+Expansion
+Algorithm
+by
+coalescing
+all
+properties
+associated
+with
+each
+subject
+via
+the
+Flattening
+Algorithm
+.
+The
+value
+of
+flatten
+must
+</del>
+<em>
+<ins class="diff-chg">path
+</ins>
+</em>
+<del class="diff-old">be
+either
+an
+IRI
+value
+representing
+the
+name
+of
+the
+graph
+to
+flatten,
+or
+true
+.
+If
+the
+value
+is
+true
+,
+then
+the
+first
+graph
+encountered
+in
+the
+input
+document
+is
+selected
+and
+flattened.
+optimize
+of
+type
+boolean
+,
+defaulting
+to
+false
+If
+set
+to
+true
+,
+the
+JSON-LD
+processor
+is
+allowed
+to
+optimize
+the
+output
+of
+the
+Compaction
+Algorithm
+to
+produce
+even
+compacter
+representations.
+The
+algorithm
+for
+compaction
+optimization
+is
+beyond
+the
+scope
+of
+this
+specification
+</del>
+and
+<del class="diff-old">thus
+not
+defined.
+Consequently,
+different
+implementations
+may
+</del>
+<ins class="diff-chg">optional
+</ins><em><ins class="diff-chg">
+query
+</ins>
+</em>
+<del class="diff-old">implement
+different
+optimization
+algorithms.
+useNativeTypes
+of
+type
+boolean
+,
+defaulting
+to
+true
+If
+set
+to
+true
+,
+the
+JSON-LD
+processor
+will
+try
+to
+convert
+datatyped
+literals
+to
+JSON
+native
+types
+instead
+of
+using
+the
+expanded
+object
+form
+when
+converting
+from
+RDF
+.
+xsd:boolean
+values
+will
+be
+converted
+to
+true
+or
+false
+.
+xsd:integer
+</del>
+and
+<del class="diff-old">xsd:double
+values
+will
+be
+converted
+to
+JSON
+numbers
+.
+</del>
+<ins class="diff-chg">fragment
+segments.
+</ins>
+</dd>
+<dt>
+<del class="diff-old">useRdfType
+of
+type
+boolean
+,
+defaulting
+to
+false
+If
+set
+to
+true
+,
+the
+JSON-LD
+processor
+will
+use
+the
+expanded
+rdf:type
+</del>
+<dfn title="relative_iri" id="dfn-relative_iri">
+<ins class="diff-chg">relative
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">as
+the
+property
+instead
+of
+@type
+when
+converting
+from
+RDF
+.
+The
+following
+data
+structures
+are
+used
+for
+representing
+data
+about
+RDF
+quads.
+They
+are
+used
+for
+normalization,
+and
+RDF
+conversion
+.
+3.4.3
+Quad
+The
+Quad
+interface
+represents
+an
+RDF
+Quad.
+See
+[
+RDF-CONCEPTS
+]
+definition
+for
+RDF
+triple
+,
+which
+most
+closely
+aligns
+to
+Quad
+.
+ ]
+interface {
+};
+Attributes
+graph
+of
+type
+Node
+,
+readonly,
+nullable
+If
+present,
+the
+name
+associated
+with
+the
+Quad
+identifying
+it
+as
+a
+member
+of
+a
+named
+graph
+.
+If
+it
+is
+missing,
+the
+quad
+is
+a
+member
+of
+the
+default
+graph
+.
+Issue
+125
+This
+element
+is
+at
+risk,
+and
+may
+be
+removed.
+object
+of
+type
+Node
+,
+readonly
+The
+object
+associated
+with
+the
+Quad
+.
+</del>
+<del class="diff-old">property
+of
+type
+Node
+,
+readonly
+The
+property
+associated
+with
+the
+Quad
+.
+Within
+JSON-LD,
+an
+RDF
+predicate
+</del>
+</dfn>
+<del class="diff-old">is
+refered
+to
+as
+a
+property
+</del>
+<del class="diff-old">subject
+of
+type
+Node
+,
+readonly
+</del>
+</dt>
+<dd>
+<del class="diff-old">The
+subject
+associated
+with
+the
+Quad
+.
+3.4.4
+Node
+Node
+is
+the
+base
+class
+of
+</del>
+<ins class="diff-chg">A
+relative
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">,
+BlankNode
+,
+and
+Literal
+.
+It
+</del>
+is
+<del class="diff-old">the
+IDL
+representation
+of
+a
+linked
+data
+graph
+node
+.
+ ]
+interface {
+};
+3.4.5
+</del>
+<ins class="diff-chg">an
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">A
+node
+</del>
+that
+is
+<del class="diff-old">an
+</del>
+<ins class="diff-chg">relative
+some
+other
+</ins><a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri"><ins class="diff-chg">
+absolute
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">.
+ ]
+interface {
+};
+Attributes
+value
+of
+type
+DOMString
+</del>
+</a>
+<del class="diff-old">,
+readonly
+The
+IRI
+identifier
+</del>
+<ins class="diff-chg">;
+in
+the
+case
+</ins>
+of
+<ins class="diff-new">JSON-LD
+this
+is
+</ins>
+the
+<del class="diff-old">node
+as
+a
+[
+UNICODE
+]
+string.
+</del>
+<ins class="diff-chg">base
+location
+of
+the
+document.
+</ins>
+</dd>
+<dt>
+<dfn title="blank_node" id="dfn-blank_node">
+<ins class="diff-chg">blank
+node
+</ins></dfn>
+<del class="diff-old">3.4.6
+Blank
+Node
+</del>
+</dt>
+<dd>
+A
+<a class="tref internalDFN" title="node" href="#dfn-node">
+node
+</a>
+in
+<del class="diff-old">the
+linked
+data
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph"><ins class="diff-chg">
+JSON-LD
+</ins>
+graph
+</a>
+that
+does
+not
+contain
+a
+<del class="diff-old">de-reference-able
+</del>
+<ins class="diff-chg">de-referenceable
+</ins>
+identifier
+because
+it
+is
+either
+ephemeral
+in
+nature
+or
+does
+not
+contain
+information
+that
+needs
+to
+be
+linked
+to
+from
+outside
+of
+the
+<del class="diff-old">linked
+data
+graph
+.
+A
+</del>
+<ins class="diff-chg">JSON-LD
+graph.
+</ins></dd><dt><dfn title="blank_node_identifier" id="dfn-blank_node_identifier">
+blank
+node
+<del class="diff-old">is
+assigned
+an
+identifier
+starting
+with
+the
+prefix
+_:
+and
+an
+implementation
+dependent,
+auto-generated
+suffix
+that
+is
+unique
+to
+all
+information
+associated
+with
+the
+particular
+blank
+node.
+ ]
+interface {
+};
+Attributes
+</del>
+identifier
+<del class="diff-old">of
+type
+DOMString
+</del>
+</dfn>
+<del class="diff-old">,
+readonly
+</del>
+</dt>
+<dd>
+<del class="diff-old">The
+temporary
+identifier
+of
+the
+</del>
+<ins class="diff-chg">A
+</ins>
+blank
+node
+<del class="diff-old">.
+The
+</del>
+identifier
+<del class="diff-old">must
+not
+be
+relied
+upon
+in
+any
+way
+between
+two
+separate
+processing
+runs
+of
+the
+same
+document
+or
+with
+</del>
+<ins class="diff-chg">is
+</ins>
+a
+<del class="diff-old">different
+document.
+Note
+Developers
+and
+authors
+must
+not
+assume
+</del>
+<ins class="diff-chg">string
+</ins>
+that
+<del class="diff-old">the
+value
+of
+</del>
+<ins class="diff-chg">can
+be
+used
+as
+an
+identifier
+for
+</ins>
+a
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>
+<del class="diff-old">will
+remain
+the
+same
+between
+two
+processing
+runs.
+BlankNode
+values
+are
+only
+valid
+for
+the
+most
+recent
+processing
+run
+on
+</del>
+<ins class="diff-chg">within
+</ins>
+the
+<ins class="diff-new">scope
+of
+a
+JSON-LD
+</ins>
+document.
+<ins class="diff-chg">Blank
+node
+identifiers
+begin
+with
+</ins>
+<code>
+<del class="diff-old">BlankNode
+values
+will
+often
+be
+generated
+differently
+by
+different
+processors.
+Note
+Implementers
+must
+ensure
+that
+</del>
+<ins class="diff-chg">_:
+</ins></code>.</dd><dt>
+<del class="diff-old">BlankNode
+</del>
+<dfn title="json-ld_value" id="dfn-json-ld_value">
+<ins class="diff-chg">JSON-LD
+value
+</ins></dfn>
+</dt>
+<dd>
+<ins class="diff-new">A
+</ins><a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value"><ins class="diff-new">
+JSON-LD
+value
+</ins>
+</a>
+<del class="diff-old">values
+are
+unique
+within
+the
+current
+environment,
+two
+BlankNodes
+</del>
+<ins class="diff-chg">is
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a>,<ins class="diff-chg">
+a
+</ins><a class="tref internalDFN" title="number" href="#dfn-number"><ins class="diff-chg">
+number
+</ins></a>,<a class="tref internalDFN" title="true" href="#dfn-true"><ins class="diff-chg">
+true
+</ins>
+</a>
+<del class="diff-old">are
+considered
+equal
+if,
+and
+only
+if,
+their
+values
+are
+strictly
+equal.
+</del>
+<ins class="diff-chg">or
+</ins><a class="tref internalDFN" title="false" href="#dfn-false"><ins class="diff-chg">
+false
+</ins></a>,<ins class="diff-chg">
+a
+</ins><a class="tref internalDFN" title="typed_value" href="#dfn-typed_value"><ins class="diff-chg">
+typed
+value
+</ins></a>,<ins class="diff-chg">
+or
+a
+</ins><a class="tref internalDFN" title="language-tagged_string" href="#dfn-language-tagged_string"><ins class="diff-chg">
+language-tagged
+string
+</ins></a>.</dd><dt>
+<dfn title="typed_value" id="dfn-typed_value">
+<ins class="diff-chg">typed
+value
+</ins></dfn>
+<del class="diff-old">3.4.7
+Literal
+Literals
+represent
+values
+such
+as
+numbers,
+dates
+and
+strings
+in
+RDF
+data.
+</del>
+</dt>
+<dd>
+A
+<del class="diff-old">Literal
+</del>
+<a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">
+<ins class="diff-chg">typed
+value
+</ins>
+</a>
+<del class="diff-old">is
+comprised
+</del>
+<ins class="diff-chg">consists
+</ins>
+of
+<del class="diff-old">three
+attributes:
+</del>
+a
+<del class="diff-old">lexical
+form
+of
+the
+value
+an
+optional
+language
+tag
+</del>
+<ins class="diff-chg">value,
+which
+is
+</ins>
+a
+<del class="diff-old">datatype
+specified
+by
+</del>
+<ins class="diff-chg">string,
+and
+a
+type,
+which
+is
+</ins>
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+</dd>
+<dt>
+<del class="diff-old">Literals
+representing
+plain
+text
+in
+</del>
+<dfn title="language-tagged_string" id="dfn-language-tagged_string">
+<ins class="diff-chg">language-tagged
+string
+</ins></dfn></dt><dd><ins class="diff-chg">
+A
+</ins><a class="tref internalDFN" title="language-tagged_string" href="#dfn-language-tagged_string"><ins class="diff-chg">
+language-tagged
+string
+</ins></a><ins class="diff-chg">
+consists
+of
+</ins>
+a
+<del class="diff-old">natural
+language
+may
+have
+</del>
+<ins class="diff-chg">string
+and
+</ins>
+a
+<ins class="diff-chg">non-empty
+</ins>
+language
+tag
+<del class="diff-old">specified
+by
+a
+string
+token,
+</del>
+as
+<del class="diff-old">specified
+in
+</del>
+<ins class="diff-chg">defined
+by
+</ins>
+[
+<cite>
+<a class="bibref" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+<del class="diff-old">],
+normalized
+to
+lowercase
+(e.g.,
+'en'
+,
+'fr'
+,
+'en-gb'
+).
+They
+also
+have
+a
+datatype
+attribute
+such
+as
+xsd:string
+.
+If
+unspecified,
+the
+datatype
+defaults
+</del>
+<ins class="diff-chg">].
+The
+language
+tag
+must
+be
+well-formed
+according
+</ins>
+to
+<del class="diff-old">xsd:string
+.
+Literals
+representing
+values
+with
+a
+specific
+datatype,
+such
+as
+the
+integer
+72,
+may
+have
+a
+datatype
+attribute
+specified
+in
+the
+form
+of
+a
+IRI
+(e.g.,
+xsd:integer
+).
+See[
+RDF-CONCEPTS
+]
+definition
+for
+literal
+.
+ ]
+interface {
+};
+Attributes
+datatype
+of
+type
+IRI
+</del>
+<ins class="diff-chg">section
+</ins><a href="http://tools.ietf.org/html/bcp47#section-2.2.9"><ins class="diff-chg">
+2.2.9
+</ins>
+</a>
+<del class="diff-old">,
+readonly,
+nullable
+An
+optional
+datatype
+identified
+by
+a
+IRI
+.
+language
+</del>
+of
+<del class="diff-old">type
+DOMString
+,
+readonly,
+nullable
+An
+optional
+language
+tag
+as
+defined
+in
+</del>
+[
+<cite>
+<a class="bibref" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+],
+<ins class="diff-new">and
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+</ins>
+normalized
+to
+lowercase.
+</dd>
+<dt>
+<del class="diff-old">value
+of
+type
+DOMString
+</del>
+<dfn title="list" id="dfn-list">
+<ins class="diff-chg">list
+</ins></dfn>
+<del class="diff-old">,
+readonly
+</del>
+</dt>
+<dd>
+<del class="diff-old">The
+lexical
+form
+</del>
+<ins class="diff-chg">A
+</ins><a class="tref internalDFN" title="list" href="#dfn-list"><ins class="diff-chg">
+list
+</ins></a><ins class="diff-chg">
+is
+an
+ordered
+sequence
+</ins>
+of
+<del class="diff-old">the
+Literal's
+value.
+</del>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<ins class="diff-chg">IRIs
+</ins></a>,<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-chg">
+blank
+nodes
+</ins></a>,<ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value"><ins class="diff-chg">
+JSON-LD
+values
+</ins></a>.
+</dd>
+</dl>
+</section>
+<section id="algorithms">
+<h2>
+<span class="secno">
+<del class="diff-old">4.
+</del>
+<ins class="diff-chg">5.
+</ins>
+</span>
+Algorithms
+</h2>
+<p>
+All
+algorithms
+described
+in
+this
+section
+are
+intended
+to
+operate
+on
+language-native
+data
+structures.
+That
+is,
+the
+serialization
+to
+a
+text-based
+JSON
+document
+isn't
+required
+as
+input
+or
+output
+to
+any
+of
+these
+algorithms
+and
+language-native
+data
+structures
+<em class="rfc2119" title="must">
+must
+</em>
+be
+used
+where
+applicable.
+</p>
+<section id="algorithm-terms">
+<h3>
+<span class="secno">
+<del class="diff-old">4.1
+</del>
+<ins class="diff-chg">5.1
+</ins>
+</span>
+Algorithm
+Terms
+</h3>
+<dl>
+<dt>
+<dfn title="active_graph" id="dfn-active_graph">
+<ins class="diff-new">active
+graph
+</ins></dfn></dt><dd><ins class="diff-new">
+The
+name
+of
+the
+currently
+active
+graph
+that
+the
+processor
+should
+use
+when
+processing.
+</ins></dd><dt>
+<dfn title="active_subject" id="dfn-active_subject">
+active
+subject
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">The
+</ins>
+currently
+active
+subject
+that
+the
+processor
+should
+use
+when
+processing.
+</dd>
+<dt>
+<dfn title="active_property" id="dfn-active_property">
+active
+property
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">The
+</ins>
+currently
+active
+property
+that
+the
+processor
+should
+use
+when
+processing.
+The
+active
+property
+is
+represented
+in
+the
+original
+lexical
+form,
+which
+is
+used
+for
+finding
+<del class="diff-old">coercion
+</del>
+<ins class="diff-chg">type
+</ins>
+mappings
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+</dd>
+<dt>
+<dfn title="active_object" id="dfn-active_object">
+active
+object
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">The
+</ins>
+currently
+active
+object
+that
+the
+processor
+should
+use
+when
+processing.
+</dd>
+<dt>
+<dfn title="active_context" id="dfn-active_context">
+active
+context
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">A
+</ins>
+context
+that
+is
+used
+to
+resolve
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+while
+the
+processing
+algorithm
+is
+running.
+The
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+the
+context
+contained
+within
+the
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</dd>
+<dt>
+<del class="diff-old">compact
+IRI
+a
+compact
+IRI
+is
+has
+the
+form
+of
+prefix
+and
+suffix
+and
+is
+used
+as
+a
+way
+of
+expressing
+an
+IRI
+without
+needing
+to
+define
+separate
+term
+definitions
+for
+each
+IRI
+contained
+within
+a
+common
+vocabulary
+identified
+by
+prefix
+.
+</del>
+<dfn title="local_context" id="dfn-local_context">
+local
+context
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">A
+</ins>
+context
+that
+is
+specified
+within
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>,
+specified
+via
+the
+<code>
+@context
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>.
+</dd>
+<dt>
+<dfn title="processor_state" id="dfn-processor_state">
+processor
+state
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">The
+</ins>
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>,
+which
+includes
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>.
+The
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+is
+managed
+as
+a
+stack
+with
+elements
+from
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+copied
+into
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+when
+entering
+a
+new
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>.
+</dd>
+<dt>
+<dfn title="json-ld_input" id="dfn-json-ld_input">
+JSON-LD
+input
+</dfn>
+</dt>
+<dd>
+The
+JSON-LD
+data
+structure
+that
+is
+provided
+as
+input
+to
+the
+algorithm.
+</dd>
+<dt>
+<dfn title="json-ld_output" id="dfn-json-ld_output">
+JSON-LD
+output
+</dfn>
+</dt>
+<dd>
+The
+JSON-LD
+data
+structure
+that
+is
+produced
+as
+output
+by
+the
+algorithm.
+</dd>
+<dt>
+<dfn title="term" id="dfn-term">
+term
+</dfn>
+</dt>
+<dd>
+A
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+is
+a
+short
+word
+defined
+in
+a
+context
+that
+<em class="rfc2119" title="may">
+may
+</em>
+be
+expanded
+to
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+</dd>
+<dt>
+<del class="diff-old">prefix
+</del>
+<dfn title="compact_iri" id="dfn-compact_iri">
+<ins class="diff-chg">compact
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>
+</dfn>
+</dt>
+<dd>
+A
+<del class="diff-old">prefix
+is
+a
+term
+that
+expands
+to
+a
+vocabulary
+base
+</del>
+<ins class="diff-chg">compact
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+<del class="diff-old">.
+It
+</del>
+</abbr>
+is
+<del class="diff-old">typically
+used
+along
+with
+a
+</del>
+<ins class="diff-chg">has
+the
+form
+of
+</ins><dfn title="prefix" id="dfn-prefix"><ins class="diff-chg">
+prefix
+</ins></dfn>:
+<em>
+suffix
+</em>
+<del class="diff-old">to
+form
+</del>
+<ins class="diff-chg">and
+is
+used
+as
+</ins>
+a
+<del class="diff-old">compact
+</del>
+<ins class="diff-chg">way
+of
+expressing
+an
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<ins class="diff-chg">without
+needing
+</ins>
+to
+<del class="diff-old">create
+an
+</del>
+<ins class="diff-chg">define
+separate
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+definitions
+for
+each
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<ins class="diff-new">contained
+</ins>
+within
+a
+<del class="diff-old">vocabulary.
+</del>
+<ins class="diff-chg">common
+vocabulary
+identified
+by
+</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
+prefix
+</ins></a>.
+</dd>
+<dt>
+<del class="diff-old">language-tagged
+string
+</del>
+<dfn title="node_object" id="dfn-node_object">
+<ins class="diff-chg">node
+object
+</ins>
+</dfn>
+</dt>
+<dd>
+A
+<del class="diff-old">language-tagged
+string
+</del>
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+<ins class="diff-chg">node
+object
+</ins>
+</a>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">represents
+zero
+or
+more
+properties
+of
+</ins>
+a
+<del class="diff-old">literal
+</del>
+<a class="tref internalDFN" title="node" href="#dfn-node">
+<ins class="diff-chg">node
+</ins>
+</a>
+<del class="diff-old">without
+a
+datatype,
+including
+</del>
+<ins class="diff-chg">in
+the
+</ins><a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph"><ins class="diff-chg">
+JSON-LD
+graph
+</ins></a><ins class="diff-chg">
+serialized
+by
+the
+JSON-LD
+document.
+A
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+is
+</ins>
+a
+<del class="diff-old">language.
+See
+languaged-tagged
+string
+</del>
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+<ins class="diff-chg">node
+object
+</ins>
+</a>
+<del class="diff-old">in
+[
+RDF-CONCEPTS
+</del>
+<ins class="diff-chg">if
+it
+exists
+outside
+of
+the
+JSON-LD
+</ins><a class="tref internalDFN" title="context" href="#dfn-context"><ins class="diff-chg">
+context
+</ins>
+</a>
+<del class="diff-old">].
+</del>
+<ins class="diff-chg">and:
+</ins><ul><li><ins class="diff-chg">
+it
+does
+not
+contain
+the
+</ins><code><ins class="diff-chg">
+@value
+</ins></code>,<code><ins class="diff-chg">
+@list
+</ins></code>,<ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+@set
+</ins></code><ins class="diff-chg">
+keywords,
+or
+</ins></li><li><ins class="diff-chg">
+it
+is
+not
+the
+top-level
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+in
+the
+JSON-LD
+document
+containing
+the
+</ins><code><ins class="diff-chg">
+@graph
+</ins></code><ins class="diff-chg">
+keyword.
+</ins></li></ul>
+</dd>
+<dt>
+<del class="diff-old">typed
+literal
+</del>
+<dfn title="list_object" id="dfn-list_object">
+<ins class="diff-chg">list
+object
+</ins>
+</dfn>
+</dt>
+<dd>
+A
+<del class="diff-old">typed
+literal
+</del>
+<a class="tref internalDFN" title="list_object" href="#dfn-list_object">
+<ins class="diff-chg">list
+object
+</ins>
+</a>
+is
+a
+<del class="diff-old">literal
+</del>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins>
+</a>
+<del class="diff-old">with
+an
+associated
+</del>
+<ins class="diff-chg">that
+has
+a
+</ins><code><ins class="diff-chg">
+@list
+</ins></code><ins class="diff-chg">
+member.
+</ins></dd><dt>
+<del class="diff-old">IRI
+</del>
+<dfn title="scalar" id="dfn-scalar">
+<ins class="diff-chg">scalar
+</ins></dfn>
+<del class="diff-old">which
+indicates
+the
+literal's
+datatype.
+See
+</del>
+</dt>
+<dd>
+<ins class="diff-chg">A
+scalar
+is
+either
+a
+JSON
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a>,<a class="tref internalDFN" title="number" href="#dfn-number"><ins class="diff-chg">
+number
+</ins></a>,<a class="tref internalDFN" title="true" href="#dfn-true"><ins class="diff-chg">
+true
+</ins></a>,<ins class="diff-chg">
+or
+</ins><a class="tref internalDFN" title="false" href="#dfn-false"><ins class="diff-chg">
+false
+</ins></a>.</dd><dt>
+<del class="diff-old">literal
+</del>
+<dfn title="quad" id="dfn-quad">
+<ins class="diff-chg">quad
+</ins></dfn>
+<del class="diff-old">in
+</del>
+</dt>
+<dd>
+<ins class="diff-chg">An
+</ins><em><ins class="diff-chg">
+RDF
+triple
+</ins></em><ins class="diff-chg">
+as
+specified
+by
+</ins>
+[
+<cite>
+<a class="bibref" href="#bib-RDF-CONCEPTS">
+RDF-CONCEPTS
+</a>
+</cite>
+<del class="diff-old">].
+</del>
+<ins class="diff-chg">]
+augmented
+with
+a
+a
+fourth
+component,
+a
+</ins><a class="tref internalDFN" title="graph_name" href="#dfn-graph_name"><ins class="diff-chg">
+graph
+name
+</ins></a>.
+</dd>
+</dl>
+</section>
+<section id="expansion-algorithm">
+<h3>
+<span class="secno">
+<del class="diff-old">4.2
+</del>
+<ins class="diff-chg">5.2
+</ins>
+</span>
+<del class="diff-old">Context
+Processing
+</del>
+<ins class="diff-chg">Expansion
+Algorithm
+</ins>
+</h3>
+<p>
+<del class="diff-old">Processing
+of
+JSON-LD
+data
+structure
+is
+managed
+recursively.
+During
+processing,
+each
+rule
+is
+applied
+using
+information
+provided
+by
+the
+</del>
+<ins class="diff-chg">The
+algorithm
+takes
+three
+input
+variables:
+an
+</ins>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+<del class="diff-old">.
+Processing
+begins
+by
+pushing
+a
+new
+processor
+state
+onto
+</del>
+</a>,
+<ins class="diff-chg">an
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a>,<ins class="diff-chg">
+and
+an
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+to
+be
+expanded.
+To
+begin,
+</ins>
+the
+<del class="diff-old">processor
+state
+stack.
+If
+a
+local
+</del>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-chg">active
+</ins>
+context
+</a>
+is
+<del class="diff-old">encountered,
+information
+from
+</del>
+<ins class="diff-chg">set
+to
+</ins>
+the
+<del class="diff-old">local
+context
+</del>
+<ins class="diff-chg">result
+of
+performing,
+</ins><a href="#context-processing"><ins class="diff-chg">
+Context
+Processing
+</ins>
+</a>
+<del class="diff-old">is
+merged
+into
+</del>
+<ins class="diff-chg">on
+</ins>
+the
+<del class="diff-old">active
+context
+.
+The
+active
+context
+</del>
+<ins class="diff-chg">passed
+</ins><code class="idlMemberName"><a href="#widl-JsonLdOptions-expandContext"><ins class="diff-chg">
+expandContext
+</ins></a></code>,<ins class="diff-chg">
+or
+empty
+if
+</ins><code class="idlMemberName"><a href="#widl-JsonLdOptions-expandContext"><ins class="diff-chg">
+expandContext
+</ins>
+</a>
+</code>
+is
+<del class="diff-old">used
+for
+expanding
+properties
+and
+values
+of
+a
+JSON
+object
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins></a>,<a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins>
+</a>
+<del class="diff-old">(or
+elements
+of
+an
+array)
+using
+a
+term
+mapping
+.
+It
+</del>
+is
+<del class="diff-old">also
+used
+to
+maintain
+coercion
+mapping
+s
+from
+terms
+to
+datatypes,
+language
+mapping
+s
+from
+terms
+</del>
+<ins class="diff-chg">set
+</ins>
+to
+<del class="diff-old">language
+codes,
+and
+list
+mapping
+s
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins></a>,
+and
+<del class="diff-old">set
+mapping
+s
+for
+terms.
+Processors
+must
+</del>
+<em>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">use
+</del>
+<ins class="diff-chg">is
+set
+to
+</ins>
+the
+<del class="diff-old">lexical
+form
+of
+</del>
+<a class="tref internalDFN" title="json-ld_input" href="#dfn-json-ld_input">
+<ins class="diff-chg">JSON-LD
+input
+</ins></a>.<ins class="diff-chg">
+This
+algorithm
+expects
+</ins>
+the
+<del class="diff-old">property
+when
+creating
+</del>
+<a class="tref internalDFN" title="json-ld_input" href="#dfn-json-ld_input">
+<ins class="diff-chg">JSON-LD
+input
+</ins></a><ins class="diff-chg">
+to
+be
+</ins>
+a
+<del class="diff-old">mapping,
+</del>
+<ins class="diff-chg">well-formed
+JSON-LD
+document
+</ins>
+as
+<del class="diff-old">lookup
+is
+performed
+on
+lexical
+forms,
+not
+expanded
+IRI
+representations.
+A
+local
+context
+</del>
+<ins class="diff-chg">defined
+in
+[
+</ins><cite><a class="bibref" href="#bib-JSON-LD"><ins class="diff-chg">
+JSON-LD
+</ins>
+</a>
+</cite>
+<ins class="diff-new">].
+</ins></p><ol class="algorithm"><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+element
+</ins></em>
+is
+<del class="diff-old">identified
+within
+</del>
+a
+<del class="diff-old">JSON
+object
+</del>
+<a class="tref internalDFN" title="scalar" href="#dfn-scalar">
+<ins class="diff-chg">scalar
+</ins></a>,<ins class="diff-chg">
+expand
+it
+according
+to
+the
+</ins><a href="#value-expansion"><ins class="diff-chg">
+Value
+Expansion
+</ins>
+</a>
+<del class="diff-old">having
+a
+@context
+</del>
+<ins class="diff-chg">algorithm,
+passing
+copies
+of
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+</ins>
+property
+<del class="diff-old">with
+a
+string
+</del>
+</a>
+<ins class="diff-chg">and
+return.
+</ins></li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+is
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins>
+</a>,
+<ins class="diff-new">return.
+</ins></li><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+element
+</ins></em><ins class="diff-new">
+is
+an
+</ins>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+<del class="diff-old">or
+a
+JSON
+object
+value.
+When
+processing
+a
+local
+context
+</del>
+</a>,
+<del class="diff-old">special
+processing
+rules
+apply:
+</del>
+<ol class="algorithm">
+<li>
+<del class="diff-old">Create
+a
+new,
+</del>
+<ins class="diff-chg">initialize
+an
+</ins>
+empty
+<del class="diff-old">local
+context
+.
+</del>
+<ins class="diff-chg">array
+</ins><em><ins class="diff-chg">
+result
+</ins></em>.
+</li>
+<li>
+<del class="diff-old">Let
+</del>
+<ins class="diff-chg">Expand
+each
+</ins>
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">item
+</ins>
+</em>
+<del class="diff-old">be
+the
+value
+</del>
+<ins class="diff-chg">by
+recursively
+using
+this
+algorithm,
+passing
+copies
+</ins>
+of
+<del class="diff-old">@context
+If
+context
+equals
+null
+,
+clear
+</del>
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+<ins class="diff-new">and
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins>
+</a>.
+</li>
+<li>
+If
+<ins class="diff-new">the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property's
+</ins></a><a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping"><ins class="diff-new">
+container
+mapping
+</ins></a><ins class="diff-new">
+is
+set
+to
+</ins><code><ins class="diff-new">
+@list
+</ins></code><ins class="diff-new">
+and
+the
+expanded
+</ins>
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">item
+</ins>
+</em>
+is
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+<del class="diff-old">,
+process
+each
+element
+as
+</del>
+</a>
+<ins class="diff-chg">or
+a
+</ins><a class="tref internalDFN" title="list_object" href="#dfn-list_object"><ins class="diff-chg">
+list
+object
+</ins></a><ins class="diff-chg">
+trigger
+a
+</ins><code class="error"><ins class="diff-chg">
+LIST_OF_LISTS_DETECTED
+</ins></code><ins class="diff-chg">
+error.
+</ins></li><li><ins class="diff-chg">
+If
+the
+expanded
+</ins>
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">item
+</ins>
+</em>
+<del class="diff-old">in
+order
+by
+starting
+at
+Step
+2.1
+.
+</del>
+<ins class="diff-chg">is
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+drop
+it.
+</ins>
+</li>
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">Otherwise,
+if
+the
+expanded
+</ins>
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">item
+</ins>
+</em>
+is
+<del class="diff-old">a
+string
+</del>
+<ins class="diff-chg">an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins>
+</a>,
+<del class="diff-old">it
+must
+</del>
+<ins class="diff-chg">merge
+its
+entries
+with
+</ins><em><ins class="diff-chg">
+result's
+</ins>
+</em>
+<del class="diff-old">have
+a
+lexical
+form
+of
+IRI
+.
+</del>
+<ins class="diff-chg">entries.
+</ins></li>
+<li>
+<del class="diff-old">Expand
+</del>
+<ins class="diff-chg">Otherwise,
+append
+</ins>
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">item
+</ins>
+</em>
+<del class="diff-old">according
+</del>
+to
+<del class="diff-old">IRI
+Expansion
+.
+Dereference
+</del>
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">result
+</ins>
+</em>.
+</li>
+<li>
+<del class="diff-old">If
+the
+resulting
+document
+is
+a
+JSON
+document,
+extract
+the
+top-level
+@context
+element
+using
+the
+JSON
+Pointer
+"/@context"
+as
+described
+in
+[
+JSON-POINTER
+].
+Set
+</del>
+<ins class="diff-chg">Finally,
+set
+</ins>
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+to
+<del class="diff-old">the
+extracted
+content
+</del>
+<em>
+<ins class="diff-chg">result
+</ins></em>
+and
+<del class="diff-old">process
+it
+by
+starting
+at
+Step
+2.1
+.
+</del>
+<ins class="diff-chg">return.
+</ins>
+</li>
+</ol>
+</li>
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">Otherwise,
+</ins>
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">is
+a
+JSON
+object
+,
+perform
+the
+following
+steps:
+</del>
+<ins class="diff-chg">must
+be
+an
+object.
+</ins>
+<ol class="algorithm">
+<li>
+If
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+has
+a
+<code>
+<del class="diff-old">@language
+</del>
+<ins class="diff-chg">@context
+</ins>
+</code>
+<del class="diff-old">property,
+it
+must
+have
+a
+value
+of
+a
+simple
+string
+</del>
+<ins class="diff-chg">member,
+update
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins>
+</a>
+<del class="diff-old">with
+</del>
+<ins class="diff-chg">according
+to
+</ins>
+the
+<del class="diff-old">lexical
+form
+described
+</del>
+<ins class="diff-chg">steps
+outlined
+</ins>
+in
+<del class="diff-old">[
+BCP47
+</del>
+<a href="#context-processing">
+<ins class="diff-chg">Context
+Processing
+</ins>
+</a>
+<del class="diff-old">],
+or
+null
+.
+Add
+the
+language
+to
+</del>
+<ins class="diff-chg">and
+remove
+</ins>
+the
+<del class="diff-old">local
+context
+.
+</del>
+<code>
+<ins class="diff-chg">@context
+</ins></code><ins class="diff-chg">
+member.
+</ins>
+</li>
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">Initialize
+an
+empty
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>
+<em>
+<del class="diff-old">value
+has
+a
+@vocab
+key,
+it
+must
+</del>
+<ins class="diff-chg">result
+</ins>
+</em>
+<del class="diff-old">have
+a
+value
+of
+a
+simple
+string
+with
+the
+lexical
+form
+of
+an
+absolute
+IRI
+,
+or
+null
+.
+Add
+the
+vocabulary
+mapping
+to
+the
+local
+context
+.
+</del>
+<ins class="diff-chg">and
+</ins>
+</li>
+<del class="diff-old">Otherwise,
+for
+</del>
+<li>
+<ins class="diff-chg">then
+process
+</ins>
+each
+<em>
+property
+</em>
+<ins class="diff-new">and
+</ins><em><ins class="diff-new">
+value
+</ins></em>
+in
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">perform
+the
+following
+steps:
+</del>
+<ins class="diff-chg">ordered
+by
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+as
+follows:
+</ins>
+<ol class="algorithm">
+<li>
+If
+the
+<del class="diff-old">property's
+value
+is
+</del>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-chg">active
+context
+</ins></a><ins class="diff-chg">
+contains
+</ins>
+a
+<del class="diff-old">simple
+string
+</del>
+<a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">
+<ins class="diff-chg">property
+generator
+</ins></a><ins class="diff-chg">
+for
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+set
+</ins><em><ins class="diff-chg">
+expanded
+property
+</ins></em><ins class="diff-chg">
+to
+its
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-chg">
+IRIs
+</ins>
+</a>,
+<del class="diff-old">determine
+</del>
+<ins class="diff-chg">otherwise
+set
+it
+to
+</ins>
+the
+<del class="diff-old">IRI
+mapping
+value
+by
+performing
+</del>
+<ins class="diff-chg">result
+of
+expanding
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+according
+to
+the
+steps
+outlined
+in
+</ins>
+<a href="#iri-expansion">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+</a>
+<del class="diff-old">on
+</del>
+<ins class="diff-chg">(passing
+</ins><code><ins class="diff-chg">
+true
+</ins></code><ins class="diff-chg">
+for
+</ins>
+the
+<del class="diff-old">associated
+value.
+</del>
+<em>
+<ins class="diff-chg">vocabRelative
+</ins></em><ins class="diff-chg">
+flag).
+</ins></li><li>
+If
+<del class="diff-old">the
+result
+of
+the
+IRI
+mapping
+is
+an
+absolute
+IRI
+,
+merge
+the
+property
+into
+the
+local
+context
+term
+mapping
+,
+unless
+the
+</del>
+<em>
+<ins class="diff-chg">expanded
+</ins>
+property
+</em>
+is
+<del class="diff-old">a
+JSON-LD
+keyword
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins>
+</a>,
+<del class="diff-old">in
+which
+case
+return
+an
+error.
+Otherwise,
+if
+</del>
+<ins class="diff-chg">skip
+</ins>
+the
+<del class="diff-old">property's
+</del>
+<ins class="diff-chg">current
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+-
+</ins><em>
+value
+<del class="diff-old">is
+null
+remove
+mapping,
+coercion,
+container
+</del>
+</em>
+<ins class="diff-chg">pair
+</ins>
+and
+<del class="diff-old">language
+information
+associated
+with
+property
+from
+the
+local
+context
+.
+Otherwise,
+</del>
+<ins class="diff-chg">continue
+to
+</ins>
+the
+<ins class="diff-new">next
+</ins>
+<em>
+property
+</em>
+<del class="diff-old">'s
+</del>
+<ins class="diff-chg">-
+</ins>
+<em>
+value
+</em>
+<del class="diff-old">must
+be
+a
+JSON
+object
+.
+</del>
+<ins class="diff-chg">pair
+in
+</ins><em><ins class="diff-chg">
+element
+</ins></em>.</li>
+<li>
+If
+<del class="diff-old">the
+</del>
+<em>
+<ins class="diff-new">expanded
+</ins>
+property
+</em>
+is
+a
+<del class="diff-old">JSON-LD
+</del>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+<del class="diff-old">and
+the
+value
+has
+</del>
+</a>,
+<ins class="diff-chg">process
+it
+as
+follows:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+expanded
+property
+</ins></em><ins class="diff-chg">
+equals
+</ins>
+<code>
+@id
+</code>,
+<ins class="diff-new">set
+the
+</ins>
+<code>
+<del class="diff-old">@language
+or
+@type
+</del>
+<ins class="diff-chg">@id
+</ins>
+</code>
+<del class="diff-old">properties,
+return
+an
+error.
+Issue
+</del>
+<ins class="diff-chg">member
+of
+</ins><em><ins class="diff-chg">
+result
+</ins></em><ins class="diff-chg">
+to
+the
+result
+of
+expanding
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+according
+the
+</ins><a href="#iri-expansion">
+<del class="diff-old">Undecided
+if
+@type
+or
+</del>
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr><ins class="diff-chg">
+Expansion
+algorithm
+</ins></a><ins class="diff-chg">
+(passing
+</ins>
+<code>
+<del class="diff-old">@graph
+</del>
+<ins class="diff-chg">true
+</ins>
+</code>
+<del class="diff-old">can
+take
+</del>
+<ins class="diff-chg">for
+the
+</ins><em><ins class="diff-chg">
+documentRelative
+</ins></em><ins class="diff-chg">
+flag).
+If
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+is
+not
+</ins>
+a
+<del class="diff-old">@container
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<ins class="diff-chg">string
+</ins></a><ins class="diff-chg">
+trigger
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_ID_VALUE
+</ins>
+</code>
+<del class="diff-old">with
+@set
+.
+</del>
+<ins class="diff-chg">error.
+</ins>
+</li>
+<li>
+If
+<del class="diff-old">the
+</del>
+<em>
+<ins class="diff-new">expanded
+</ins>
+property
+</em>
+<del class="diff-old">has
+</del>
+<ins class="diff-chg">equals
+</ins><code><ins class="diff-chg">
+@type
+</ins></code>,<ins class="diff-chg">
+set
+</ins>
+the
+<del class="diff-old">form
+of
+term
+,
+its
+value
+must
+have
+an
+</del>
+<code>
+<del class="diff-old">@id
+</del>
+<ins class="diff-chg">@type
+</ins>
+</code>
+<del class="diff-old">property
+with
+a
+string
+value
+which
+must
+</del>
+<ins class="diff-chg">member
+of
+</ins><em><ins class="diff-chg">
+result
+</ins>
+</em>
+<del class="diff-old">have
+</del>
+<ins class="diff-chg">to
+</ins>
+the
+<del class="diff-old">form
+</del>
+<ins class="diff-chg">result
+</ins>
+of
+<del class="diff-old">a
+term
+,
+compact
+IRI
+,
+or
+absolute
+IRI
+.
+Determine
+</del>
+<ins class="diff-chg">expanding
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+according
+</ins>
+the
+<del class="diff-old">IRI
+mapping
+by
+performing
+</del>
+<a href="#iri-expansion">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+<ins class="diff-new">algorithm
+</ins>
+</a>
+<del class="diff-old">on
+the
+associated
+value.
+If
+</del>
+<ins class="diff-chg">(passing
+</ins><code><ins class="diff-chg">
+true
+</ins></code><ins class="diff-chg">
+for
+both
+</ins>
+the
+<del class="diff-old">result
+of
+</del>
+<em>
+<ins class="diff-chg">documentRelative
+</ins></em><ins class="diff-chg">
+and
+</ins>
+the
+<del class="diff-old">IRI
+mapping
+</del>
+<em>
+<ins class="diff-chg">vocabRelative
+</ins></em><ins class="diff-chg">
+flag).
+If
+</ins><em><ins class="diff-chg">
+value
+</ins></em>
+is
+<ins class="diff-new">neither
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-new">
+string
+</ins></a><ins class="diff-new">
+nor
+</ins>
+an
+<del class="diff-old">absolute
+IRI
+,
+merge
+the
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a><ins class="diff-chg">
+of
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+strings
+</ins></a><ins class="diff-chg">
+trigger
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_TYPE_VALUE
+</ins></code><ins class="diff-chg">
+error.
+Empty
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+arrays
+</ins></a><ins class="diff-chg">
+are
+ignored.
+</ins></li><li><ins class="diff-chg">
+If
+</ins>
+<em>
+<ins class="diff-new">expanded
+</ins>
+property
+</em>
+<del class="diff-old">into
+</del>
+<ins class="diff-chg">equals
+</ins><code><ins class="diff-chg">
+@value
+</ins></code>,<ins class="diff-chg">
+set
+</ins>
+the
+<del class="diff-old">local
+context
+</del>
+<code>
+<ins class="diff-chg">@value
+</ins></code><ins class="diff-chg">
+member
+of
+</ins><em><ins class="diff-chg">
+result
+</ins></em><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+value
+</ins></em>.<ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+is
+neither
+a
+</ins><a class="tref internalDFN" title="scalar" href="#dfn-scalar"><ins class="diff-chg">
+scalar
+</ins>
+</a>
+<del class="diff-old">term
+mapping
+.
+</del>
+<ins class="diff-chg">nor
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a><ins class="diff-chg">
+trigger
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_VALUE_OBJECT_VALUE
+</ins></code><ins class="diff-chg">
+error.
+</ins>
+</li>
+<li>
+If
+<del class="diff-old">the
+</del>
+<em>
+<ins class="diff-new">expanded
+</ins>
+property
+</em>
+<del class="diff-old">has
+</del>
+<ins class="diff-chg">equals
+</ins><code><ins class="diff-chg">
+@language
+</ins></code>,<ins class="diff-chg">
+set
+</ins>
+the
+<del class="diff-old">form
+of
+</del>
+<code>
+<ins class="diff-chg">@language
+</ins></code><ins class="diff-chg">
+member
+</ins>
+of
+<del class="diff-old">a
+compact
+IRI
+or
+absolute
+IRI
+,
+</del>
+<em>
+<ins class="diff-chg">result
+</ins></em><ins class="diff-chg">
+to
+</ins>
+the
+<ins class="diff-new">lowercased
+</ins><em><ins class="diff-new">
+value
+</ins></em>.<ins class="diff-new">
+If
+</ins>
+<em>
+value
+</em>
+<del class="diff-old">may
+have
+</del>
+<ins class="diff-chg">is
+not
+</ins>
+a
+<del class="diff-old">@id
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<ins class="diff-chg">string
+</ins></a>,<ins class="diff-chg">
+trigger
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_LANGUAGE_VALUE
+</ins>
+</code>
+<ins class="diff-new">error.
+</ins></li><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+expanded
+</ins>
+property
+<del class="diff-old">with
+a
+string
+value
+which
+must
+</del>
+</em>
+<del class="diff-old">have
+</del>
+<ins class="diff-chg">equals
+</ins><code><ins class="diff-chg">
+@annotation
+</ins></code>,<ins class="diff-chg">
+set
+</ins>
+the
+<del class="diff-old">form
+</del>
+<code>
+<ins class="diff-chg">@annotation
+</ins></code><ins class="diff-chg">
+member
+</ins>
+of
+<em>
+<ins class="diff-new">result
+</ins></em><ins class="diff-new">
+to
+</ins><em><ins class="diff-new">
+value
+</ins></em>.<ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+is
+not
+</ins>
+a
+<del class="diff-old">term
+,
+compact
+IRI
+,
+or
+absolute
+IRI
+.
+Determine
+the
+IRI
+mapping
+by
+performing
+IRI
+Expansion
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<ins class="diff-chg">string
+</ins>
+</a>
+<del class="diff-old">on
+the
+associated
+value.
+</del>
+<ins class="diff-chg">trigger
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_ANNOTATION_VALUE
+</ins></code><ins class="diff-chg">
+error.
+</ins></li><li>
+If
+<em>
+<ins class="diff-new">expanded
+property
+</ins></em><ins class="diff-new">
+equals
+</ins><code><ins class="diff-new">
+@set
+</ins></code><ins class="diff-new">
+or
+</ins><code><ins class="diff-new">
+@list
+</ins></code>,<ins class="diff-new">
+set
+</ins>
+the
+<del class="diff-old">result
+</del>
+<em>
+<ins class="diff-chg">expanded
+property
+</ins></em><ins class="diff-chg">
+member
+</ins>
+of
+<em>
+<ins class="diff-new">result
+</ins></em><ins class="diff-new">
+to
+</ins>
+the
+<del class="diff-old">IRI
+mapping
+is
+an
+absolute
+IRI
+,
+merge
+the
+</del>
+<ins class="diff-chg">result
+of
+expanding
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+<del class="diff-old">into
+</del>
+<ins class="diff-chg">by
+recursively
+using
+this
+algorithm,
+passing
+copies
+of
+</ins>
+the
+<del class="diff-old">local
+</del>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-chg">active
+</ins>
+context
+</a>
+<del class="diff-old">term
+mapping
+</del>
+<ins class="diff-chg">and
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins>
+</a>.
+</li>
+<li>
+If
+<del class="diff-old">the
+</del>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">expanded
+property
+</ins>
+</em>
+<del class="diff-old">has
+a
+</del>
+<ins class="diff-chg">equals
+</ins>
+<code>
+<del class="diff-old">@type
+</del>
+<ins class="diff-chg">@graph
+</ins></code>,<ins class="diff-chg">
+set
+the
+</ins><code><ins class="diff-chg">
+@graph
+</ins>
+</code>
+<del class="diff-old">property,
+its
+value
+must
+</del>
+<ins class="diff-chg">member
+of
+</ins><em><ins class="diff-chg">
+result
+</ins>
+</em>
+<del class="diff-old">have
+</del>
+<ins class="diff-chg">to
+</ins>
+the
+<del class="diff-old">form
+</del>
+<ins class="diff-chg">result
+of
+expanding
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+by
+recursively
+using
+this
+algorithm,
+passing
+copies
+</ins>
+of
+<del class="diff-old">a
+term
+,
+compact
+IRI
+,
+absolute
+IRI
+,
+or
+</del>
+the
+<del class="diff-old">keyword
+</del>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-chg">active
+context
+</ins>
+</a>
+<ins class="diff-new">and
+</ins>
+<code>
+<del class="diff-old">@id
+.
+Determine
+the
+IRI
+by
+performing
+IRI
+Expansion
+on
+</del>
+<ins class="diff-chg">@graph
+</ins></code><ins class="diff-chg">
+as
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a>.</li><li><ins class="diff-chg">
+Continue
+with
+</ins>
+the
+<del class="diff-old">associated
+value.
+</del>
+<ins class="diff-chg">next
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+-
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+pair
+from
+</ins><em><ins class="diff-chg">
+element
+</ins></em>.</li></ol></li><li>
+If
+<del class="diff-old">the
+result
+of
+the
+IRI
+mapping
+</del>
+<em>
+<ins class="diff-chg">expanded
+property
+</ins></em>
+is
+<ins class="diff-new">not
+</ins>
+an
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">or
+@id
+,
+merge
+into
+the
+local
+context
+coercion
+mapping
+using
+the
+lexical
+value
+of
+</del>
+</a>,i.e.,
+<ins class="diff-chg">it
+doesn't
+contain
+a
+colon,
+continue
+with
+</ins>
+the
+<ins class="diff-new">next
+member
+from
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>.
+</li>
+<li>
+<del class="diff-old">If
+the
+</del>
+<ins class="diff-chg">Otherwise,
+if
+</ins>
+<em>
+<del class="diff-old">value
+has
+a
+@container
+property,
+its
+value
+must
+</del>
+<ins class="diff-chg">property's
+</ins>
+</em>
+<del class="diff-old">be
+@list
+or
+@set
+.
+Merge
+the
+list
+</del>
+<a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping">
+<ins class="diff-chg">container
+</ins>
+mapping
+</a>
+<del class="diff-old">or
+</del>
+<ins class="diff-chg">is
+</ins>
+set
+<del class="diff-old">mapping
+into
+the
+local
+context
+</del>
+<ins class="diff-chg">to
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><ol class="algorithm"><li><ins class="diff-chg">
+Initialize
+a
+new
+empty
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins>
+</a>
+<del class="diff-old">using
+the
+lexical
+value
+of
+the
+</del>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">language
+map
+values
+</ins>
+</em>.
+</li>
+<li>
+<del class="diff-old">If
+the
+</del>
+<ins class="diff-chg">Process
+each
+</ins><em><ins class="diff-chg">
+key
+</ins></em><ins class="diff-chg">
+-
+</ins><em><ins class="diff-chg">
+val
+</ins></em><ins class="diff-chg">
+pair
+of
+</ins>
+<em>
+value
+</em>
+<del class="diff-old">has
+</del>
+<ins class="diff-chg">ordered
+by
+</ins><em><ins class="diff-chg">
+key
+</ins></em><ins class="diff-chg">
+as
+follows:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+val
+</ins></em><ins class="diff-chg">
+is
+not
+an
+array,
+transform
+it
+to
+one.
+</ins></li><li><ins class="diff-chg">
+For
+each
+item
+of
+</ins><em><ins class="diff-chg">
+val
+</ins></em>,<ins class="diff-chg">
+construct
+</ins>
+a
+<ins class="diff-new">new
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+consisting
+of
+two
+members:
+</ins>
+<code>
+<del class="diff-old">@language
+property
+but
+no
+@type
+</del>
+<ins class="diff-chg">@value
+</ins>
+</code>
+<del class="diff-old">property,
+the
+value
+of
+</del>
+<ins class="diff-chg">set
+to
+</ins>
+the
+<ins class="diff-new">currently
+processed
+item
+and
+</ins>
+<code>
+@language
+</code>
+<del class="diff-old">property
+must
+</del>
+<ins class="diff-chg">set
+to
+the
+lowercased
+</ins><em><ins class="diff-chg">
+key
+</ins></em>.<ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+val
+</ins>
+</em>
+<del class="diff-old">be
+</del>
+<ins class="diff-chg">is
+not
+</ins>
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+<del class="diff-old">or
+null
+.
+Merge
+</del>
+</a>,
+<ins class="diff-chg">trigger
+a
+</ins><code class="error"><ins class="diff-chg">
+LANGUAGE_MAP_INVALID_VALUE
+</ins></code><ins class="diff-chg">
+error.
+Otherwise
+append
+</ins>
+the
+<ins class="diff-chg">object
+to
+</ins><em>
+language
+<del class="diff-old">mapping
+into
+the
+local
+context
+using
+the
+lexical
+</del>
+<ins class="diff-chg">map
+values
+</ins></em>.</li></ol></li><li><ins class="diff-chg">
+Set
+</ins><em>
+value
+<del class="diff-old">of
+the
+</del>
+</em>
+<ins class="diff-chg">to
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">language
+map
+values
+</ins>
+</em>.
+</li>
+</ol>
+</li>
+<li>
+<del class="diff-old">Merge
+the
+local
+context
+</del>
+<ins class="diff-chg">Otherwise,
+if
+</ins><em><ins class="diff-chg">
+property's
+</ins></em><a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping"><ins class="diff-chg">
+container
+mapping
+</ins>
+</a>
+<del class="diff-old">into
+</del>
+<ins class="diff-chg">is
+set
+to
+</ins><code><ins class="diff-chg">
+@annotation
+</ins></code><ol class="algorithm"><li><ins class="diff-chg">
+Initialize
+a
+new
+empty
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a><em><ins class="diff-chg">
+annotation
+map
+values
+</ins></em>.</li><li><ins class="diff-chg">
+Process
+each
+</ins><em><ins class="diff-chg">
+key
+</ins></em><ins class="diff-chg">
+-
+</ins><em><ins class="diff-chg">
+val
+</ins></em><ins class="diff-chg">
+pair
+of
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+ordered
+by
+</ins><em><ins class="diff-chg">
+key
+</ins></em><ins class="diff-chg">
+as
+follows:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+val
+</ins></em><ins class="diff-chg">
+is
+not
+an
+array,
+transform
+it
+to
+one.
+</ins></li><li><ins class="diff-chg">
+Expand
+</ins><em><ins class="diff-chg">
+val
+</ins></em><ins class="diff-chg">
+by
+recursively
+using
+this
+algorithm,
+passing
+copies
+of
+</ins>
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+<ins class="diff-new">and
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins>
+</a>.
+</li>
+<li>
+<del class="diff-old">Repeat
+Step
+2.4.2
+until
+no
+entries
+are
+added
+</del>
+<ins class="diff-chg">Add
+to
+each
+item
+of
+</ins><em><ins class="diff-chg">
+val
+</ins></em><ins class="diff-chg">
+a
+member
+</ins><code><ins class="diff-chg">
+@annotation
+</ins></code><ins class="diff-chg">
+set
+</ins>
+to
+<em>
+<ins class="diff-new">key
+</ins></em><ins class="diff-new">
+if
+no
+such
+member
+exists
+yet
+and
+append
+</ins>
+the
+<del class="diff-old">local
+context
+.
+</del>
+<ins class="diff-chg">resulting
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+annotation
+map
+values
+</ins></em>.
+</li>
+</ol>
+</li>
+<li>
+<ins class="diff-chg">Set
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+annotation
+map
+values
+</ins></em>.
+</li>
+</ol>
+</li>
+<del class="diff-old">Note
+It
+can
+be
+difficult
+to
+distinguish
+between
+a
+compact
+IRI
+</del>
+<li>
+<ins class="diff-chg">Otherwise,
+expand
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+by
+recursively
+using
+this
+algorithm,
+passing
+copies
+of
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins>
+</a>
+and
+<del class="diff-old">an
+absolute
+IRI
+,
+</del>
+<em>
+<ins class="diff-chg">property
+</ins></em>
+as
+<del class="diff-old">a
+compact
+IRI
+may
+seem
+to
+be
+a
+valid
+IRI
+</del>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+<ins class="diff-chg">active
+property
+</ins></a>.</li><li><ins class="diff-chg">
+If
+the
+expanded
+</ins>
+<em>
+<del class="diff-old">scheme
+</del>
+<ins class="diff-chg">value
+</ins></em><ins class="diff-chg">
+equals
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+continue
+with
+the
+next
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+-
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+pair
+from
+</ins><em><ins class="diff-chg">
+element
+</ins>
+</em>.
+<del class="diff-old">When
+performing
+repeated
+IRI
+expansion,
+a
+term
+used
+as
+a
+prefix
+may
+not
+have
+a
+valid
+</del>
+</li>
+<li>
+<ins class="diff-chg">If
+</ins><em><ins class="diff-chg">
+property's
+</ins></em><a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping"><ins class="diff-chg">
+container
+</ins>
+mapping
+<del class="diff-old">due
+to
+dependencies
+in
+resolving
+term
+definitions.
+By
+continuing
+Step
+2.3.2
+</del>
+</a>
+<del class="diff-old">until
+no
+changes
+are
+made,
+mappings
+to
+IRIs
+created
+using
+an
+undefined
+term
+prefix
+will
+eventually
+expand
+</del>
+<ins class="diff-chg">is
+set
+</ins>
+to
+<del class="diff-old">an
+absolute
+IRI
+s.
+4.3
+IRI
+Expansion
+Keys
+</del>
+<code>
+<ins class="diff-chg">@list
+</ins></code>
+and
+<del class="diff-old">some
+values
+are
+evaluated
+to
+produce
+an
+IRI
+.
+This
+section
+defines
+an
+algorithm
+for
+transforming
+a
+</del>
+<em>
+value
+<del class="diff-old">representing
+an
+IRI
+into
+</del>
+</em>
+<ins class="diff-chg">is
+either
+not
+</ins>
+an
+<del class="diff-old">actual
+IRI
+.
+IRIs
+</del>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins>
+</a>
+<del class="diff-old">may
+be
+represented
+as
+an
+absolute
+IRI
+,
+a
+term
+,
+a
+compact
+IRI
+,
+</del>
+or
+<del class="diff-old">as
+</del>
+a
+<del class="diff-old">value
+relative
+to
+@vocab
+.
+An
+absolute
+IRI
+is
+defined
+in
+[
+RFC3987
+</del>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins>
+</a>
+<del class="diff-old">]
+containing
+a
+</del>
+<ins class="diff-chg">without
+an
+</ins><code><ins class="diff-chg">
+@list
+</ins></code><ins class="diff-chg">
+member,
+replace
+</ins>
+<em>
+<del class="diff-old">scheme
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+<del class="diff-old">along
+</del>
+with
+<ins class="diff-new">a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+with
+an
+</ins><code><ins class="diff-new">
+@list
+</ins></code><ins class="diff-new">
+member
+whose
+value
+is
+set
+to
+</ins>
+<em>
+<del class="diff-old">path
+and
+optional
+query
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+<del class="diff-old">and
+fragment
+segments.
+A
+relative
+IRI
+is
+</del>
+<ins class="diff-chg">(wrapped
+in
+</ins>
+an
+<del class="diff-old">IRI
+that
+is
+relative
+some
+other
+absolute
+IRI
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins>
+</a>
+<del class="diff-old">;
+in
+the
+case
+of
+JSON-LD
+this
+</del>
+<ins class="diff-chg">if
+it
+is
+not
+already
+one).
+</ins></li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+expanded
+property
+</ins></em>
+is
+<del class="diff-old">the
+base
+location
+of
+the
+document.
+The
+algorithm
+for
+generating
+</del>
+an
+<del class="diff-old">IRI
+is:
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a>,
+<ol class="algorithm">
+<li>
+<del class="diff-old">If
+the
+active
+context
+contains
+a
+term
+</del>
+<ins class="diff-chg">label
+all
+</ins><a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-chg">
+blank
+nodes
+</ins>
+</a>
+<del class="diff-old">mapping
+for
+the
+</del>
+<ins class="diff-chg">in
+</ins><em>
+value
+</em>
+<ins class="diff-new">with
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-new">
+blank
+node
+identifiers
+</ins></a><ins class="diff-new">
+by
+</ins>
+using
+<del class="diff-old">a
+case-sensitive
+comparison,
+use
+</del>
+the
+<del class="diff-old">mapped
+</del>
+<a href="#label-blank-nodes-algorithm">
+<ins class="diff-chg">Label
+Blank
+Nodes
+Algorithm
+</ins></a>.</li><li><ins class="diff-chg">
+Then,
+for
+each
+</ins><em><ins class="diff-chg">
+iri
+</ins></em><ins class="diff-chg">
+of
+</ins><em><ins class="diff-chg">
+expanded
+property
+</ins></em><ins class="diff-chg">
+merge
+a
+copy
+of
+</ins><em>
+value
+<del class="diff-old">as
+an
+IRI
+.
+</del>
+</em>
+<ins class="diff-chg">into
+the
+</ins><em><ins class="diff-chg">
+iri
+</ins></em><ins class="diff-chg">
+member
+of
+the
+</ins><em><ins class="diff-chg">
+result
+</ins></em><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>.</li></ol>
+</li>
+<li>
+Otherwise,
+<del class="diff-old">split
+the
+</del>
+<ins class="diff-chg">merge
+</ins><em>
+value
+</em>
+into
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">the
+</ins>
+<em>
+<del class="diff-old">prefix
+</del>
+<ins class="diff-chg">iri
+</ins></em><ins class="diff-chg">
+member
+of
+the
+</ins><em><ins class="diff-chg">
+result
+</ins></em><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>.</li></ol></li><li><ins class="diff-chg">
+Set
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+result
+</ins>
+</em>
+and
+<em>
+<del class="diff-old">suffix
+</del>
+<ins class="diff-chg">numProperties
+</ins>
+</em>
+<del class="diff-old">from
+</del>
+<ins class="diff-chg">to
+</ins>
+the
+<del class="diff-old">first
+occurrence
+</del>
+<ins class="diff-chg">number
+</ins>
+of
+<del class="diff-old">':'.
+</del>
+<ins class="diff-chg">members
+of
+</ins><em><ins class="diff-chg">
+result
+</ins></em>.
+</li>
+<li>
+If
+<del class="diff-old">the
+prefix
+is
+a
+'_'
+(underscore),
+the
+value
+represents
+a
+named
+blank
+node
+.
+</del>
+<em>
+<ins class="diff-chg">element
+</ins></em><ins class="diff-chg">
+has
+an
+</ins><code><ins class="diff-chg">
+@annotation
+</ins></code><ins class="diff-chg">
+member,
+decrease
+</ins><em><ins class="diff-chg">
+numProperties
+</ins></em><ins class="diff-chg">
+by
+1.
+</ins>
+</li>
+<li>
+If
+<del class="diff-old">the
+active
+context
+contains
+a
+term
+mapping
+for
+</del>
+<em>
+<del class="diff-old">prefix
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">using
+a
+case-sensitive
+comparison,
+and
+</del>
+<ins class="diff-chg">has
+an
+</ins><code><ins class="diff-chg">
+@value
+</ins></code><ins class="diff-chg">
+member,
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+decrease
+</ins>
+<em>
+<del class="diff-old">suffix
+</del>
+<ins class="diff-chg">numProperties
+</ins>
+</em>
+<del class="diff-old">does
+not
+does
+not
+begin
+with
+'//'
+(i.e.,
+it
+does
+not
+match
+a
+</del>
+<ins class="diff-chg">by
+1.
+</ins></li><li><ins class="diff-chg">
+If
+</ins>
+<em>
+<del class="diff-old">hier-part
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">including
+</del>
+<ins class="diff-chg">has
+an
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+member,
+decrease
+</ins>
+<em>
+<del class="diff-old">authority
+</del>
+<ins class="diff-chg">numProperties
+</ins>
+</em>
+<del class="diff-old">(as
+defined
+in
+[
+RFC3986
+]),
+generate
+an
+IRI
+</del>
+by
+<del class="diff-old">prepending
+the
+mapped
+prefix
+to
+the
+(possibly
+empty)
+suffix
+using
+textual
+concatenation.
+Note
+that
+an
+empty
+suffix
+</del>
+<ins class="diff-chg">1
+</ins>
+and
+<del class="diff-old">no
+suffix
+(meaning
+</del>
+<ins class="diff-chg">check
+that
+</ins>
+the
+value
+<del class="diff-old">contains
+no
+':'
+string
+at
+all)
+are
+treated
+equivalently.
+</del>
+<ins class="diff-chg">of
+the
+</ins><code><ins class="diff-chg">
+@value
+</ins></code><ins class="diff-chg">
+member
+is
+a
+string.
+If
+not,
+trigger
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_LANGUAGE_TAGGED_STRING
+</ins></code><ins class="diff-chg">
+error.
+</ins>
+</li>
+<li>
+Otherwise,
+if
+<del class="diff-old">the
+IRI
+being
+processed
+does
+not
+contain
+a
+colon
+</del>
+<em>
+<ins class="diff-chg">element
+</ins></em><ins class="diff-chg">
+has
+an
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+member,
+decrease
+</ins><em><ins class="diff-chg">
+numProperties
+</ins></em><ins class="diff-chg">
+by
+1
+</ins>
+and
+<del class="diff-old">is
+a
+property,
+i.e.,
+a
+key
+in
+a
+JSON
+object
+,
+or
+</del>
+<ins class="diff-chg">check
+that
+</ins>
+the
+value
+of
+<ins class="diff-new">the
+</ins>
+<code>
+@type
+</code>
+<del class="diff-old">and
+the
+active
+context
+has
+</del>
+<ins class="diff-chg">member
+is
+</ins>
+a
+<del class="diff-old">@vocab
+</del>
+<ins class="diff-chg">string.
+If
+not,
+trigger
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_TYPED_VALUE
+</ins>
+</code>
+<del class="diff-old">mapping,
+join
+</del>
+<ins class="diff-chg">error.
+</ins></li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+numProperties
+</ins></em><ins class="diff-chg">
+is
+greater
+than
+0,
+trigger
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_VALUE_OBJECT
+</ins></code><ins class="diff-chg">
+error.
+</ins></li><li><ins class="diff-chg">
+If
+</ins>
+the
+<del class="diff-old">mapped
+</del>
+value
+<del class="diff-old">to
+</del>
+<ins class="diff-chg">of
+</ins>
+the
+<del class="diff-old">suffix
+using
+textual
+concatenation.
+</del>
+<code>
+<ins class="diff-chg">@value
+</ins></code><ins class="diff-chg">
+member
+equals
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+set
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+to
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+if
+the
+IRI
+being
+processed
+does
+not
+contain
+a
+colon
+and
+</del>
+<ins class="diff-chg">Return.
+</ins></li></ol></li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+has
+an
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+member
+whose
+value
+</ins>
+is
+not
+<del class="diff-old">a
+property,
+i.e.,
+not
+a
+key
+in
+a
+JSON
+object
+treat
+</del>
+<ins class="diff-chg">an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a>,<ins class="diff-chg">
+transform
+</ins>
+it
+<del class="diff-old">as
+a
+relative
+IRI
+</del>
+<ins class="diff-chg">to
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a>.</li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+has
+an
+</ins><code><ins class="diff-chg">
+@list
+</ins></code><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+@set
+</ins></code><ins class="diff-chg">
+member
+</ins>
+and
+<del class="diff-old">resolve
+it
+against
+the
+base
+IRI
+as
+per
+[
+RFC3986
+]
+using
+only
+the
+basic
+algorithm
+in
+section
+5.2.
+Neither
+</del>
+<em>
+<del class="diff-old">Syntax-Based
+Normalization
+</del>
+<ins class="diff-chg">numProperties
+</ins>
+</em>
+<del class="diff-old">nor
+</del>
+<ins class="diff-chg">is
+greater
+than
+1,
+trigger
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_SET_OR_LIST_OBJECT
+</ins></code><ins class="diff-chg">
+error.
+</ins></li><li><ins class="diff-chg">
+Otherwise,
+if
+</ins>
+<em>
+<del class="diff-old">Scheme-Based
+Normalization
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">(described
+in
+sections
+6.2.2
+and
+6.2.3
+of
+[
+RFC3986
+])
+are
+performed.
+Characters
+additionally
+allowed
+in
+IRI
+references
+are
+treated
+in
+</del>
+<ins class="diff-chg">has
+an
+</ins><code><ins class="diff-chg">
+@set
+</ins></code><ins class="diff-chg">
+member,
+set
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+to
+</ins>
+the
+<del class="diff-old">same
+way
+that
+unreserved
+characters
+are
+treated
+in
+URI
+references,
+per
+section
+6.5
+</del>
+<ins class="diff-chg">value
+</ins>
+of
+<del class="diff-old">[
+RFC3987
+].
+</del>
+<ins class="diff-chg">that
+member.
+</ins>
+</li>
+<li>
+Otherwise,
+<del class="diff-old">use
+the
+value
+directly
+as
+</del>
+<ins class="diff-chg">if
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+has
+just
+</ins>
+an
+<del class="diff-old">IRI
+.
+</del>
+<code>
+<ins class="diff-chg">@language
+</ins></code><ins class="diff-chg">
+member,
+set
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+to
+null.
+</ins></li></ol>
+</li>
+</ol>
+<p>
+<ins class="diff-chg">If,
+after
+the
+algorithm
+outlined
+above
+is
+run,
+the
+resulting
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+is
+an
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+with
+just
+a
+</ins><code><ins class="diff-chg">
+@graph
+</ins></code><ins class="diff-chg">
+member,
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+is
+set
+to
+the
+value
+of
+</ins><code><ins class="diff-chg">
+@graph
+</ins></code><ins class="diff-chg">
+'s
+value.
+Finally,
+if
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+is
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>,<ins class="diff-chg">
+it
+is
+wrapped
+into
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a>.
+</p>
+</section>
+<section typeof="bibo:Chapter" resource="#context" rel="bibo:chapter" id="context-processing">
+<h3 id="context">
+<span class="secno">
+<del class="diff-old">4.4
+</del>
+<ins class="diff-chg">5.3
+</ins>
+</span>
+<del class="diff-old">IRI
+Compaction
+</del>
+<ins class="diff-chg">Context
+Processing
+</ins>
+</h3>
+<p>
+<del class="diff-old">Some
+keys
+</del>
+<ins class="diff-chg">Processing
+of
+JSON-LD
+data
+structure
+is
+managed
+recursively.
+During
+processing,
+each
+rule
+is
+applied
+using
+information
+provided
+by
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>.</p><p><ins class="diff-chg">
+The
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+contains
+the
+active
+</ins><dfn title="term_definition" id="dfn-term_definition"><ins class="diff-chg">
+term
+definitions
+</ins></dfn><ins class="diff-chg">
+which
+specify
+how
+properties
+</ins>
+and
+values
+<del class="diff-old">are
+expressed
+using
+IRI
+</del>
+<ins class="diff-chg">have
+to
+be
+interpreted
+as
+well
+as
+the
+current
+</ins><dfn title="vocabulary_mapping" id="dfn-vocabulary_mapping"><ins class="diff-chg">
+vocabulary
+mapping
+</ins></dfn><ins class="diff-chg">
+and
+the
+</ins><dfn title="default_language" id="dfn-default_language"><ins class="diff-chg">
+default
+language
+</ins></dfn>.<ins class="diff-chg">
+Each
+</ins><a class="tref internalDFN" title="term_definition" href="#dfn-term_definition"><ins class="diff-chg">
+term
+definition
+</ins>
+</a>
+<del class="diff-old">s.
+This
+section
+defines
+an
+algorithm
+for
+transforming
+</del>
+<ins class="diff-chg">consists
+of
+</ins>
+an
+<dfn title="iri_mapping" id="dfn-iri_mapping">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">(
+iri
+)
+to
+</del>
+<ins class="diff-chg">mapping
+</ins></dfn><ins class="diff-chg">
+and
+optionally
+</ins>
+a
+<del class="diff-old">term
+</del>
+<dfn title="type_mapping" id="dfn-type_mapping">
+<ins class="diff-chg">type
+mapping
+</ins></dfn><ins class="diff-chg">
+from
+terms
+to
+datatypes
+</ins>
+or
+<del class="diff-old">compact
+</del>
+<dfn title="language_mapping" id="dfn-language_mapping">
+<ins class="diff-chg">language
+mapping
+</ins></dfn><ins class="diff-chg">
+from
+terms
+to
+language
+codes,
+and
+a
+</ins><dfn title="container_mapping" id="dfn-container_mapping"><ins class="diff-chg">
+container
+mapping
+</ins></dfn>.<ins class="diff-chg">
+If
+an
+</ins><a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<ins class="diff-new">mapping
+</ins></a><ins class="diff-new">
+maps
+a
+term
+to
+multiple
+</ins><tref="iri"><ins class="diff-new">
+IRIs
+it
+is
+said
+to
+be
+a
+</ins><dfn title="property_generator" id="dfn-property_generator"><ins class="diff-new">
+property
+generator
+</ins></dfn>.</tref="iri">
+</p>
+<p>
+<ins class="diff-new">If
+a
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-new">
+local
+context
+</ins>
+</a>
+<del class="diff-old">using
+</del>
+<ins class="diff-chg">is
+encountered,
+information
+from
+</ins>
+the
+<del class="diff-old">term
+</del>
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+<ins class="diff-chg">local
+context
+</ins>
+</a>
+<del class="diff-old">s
+specified
+in
+</del>
+<ins class="diff-chg">is
+merged
+into
+</ins>
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+<ins class="diff-new">A
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-new">
+local
+context
+</ins>
+</a>
+<del class="diff-old">using
+</del>
+<ins class="diff-chg">is
+identified
+within
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+having
+a
+</ins><code><ins class="diff-chg">
+@context
+</ins></code><ins class="diff-chg">
+member
+with
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a>,<a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a><ins class="diff-chg">
+or
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+value.
+</ins></p><p><ins class="diff-chg">
+This
+algorithm
+specifies
+how
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+is
+updated
+with
+a
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a>.<ins class="diff-chg">
+The
+algorithm
+takes
+three
+input
+variables:
+</ins>
+an
+<del class="diff-old">optional
+</del>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-chg">active
+context
+</ins></a>,<ins class="diff-chg">
+a
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a>,<ins class="diff-chg">
+and
+an
+array
+of
+already
+included
+remote
+contexts
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">remoteContexts
+</ins>
+</em>.
+<ins class="diff-new">To
+begin,
+</ins><em><ins class="diff-new">
+remoteContexts
+</ins></em><ins class="diff-new">
+is
+initialized
+to
+an
+empty
+array.
+</ins>
+</p>
+<del class="diff-old">4.4.1
+</del>
+<p>
+<ins class="diff-chg">All
+calls
+of
+the
+</ins><a href="#iri-expansion">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">Compaction
+Algorithm
+The
+</del>
+<ins class="diff-chg">Expansion
+</ins>
+algorithm
+<del class="diff-old">for
+generating
+a
+compact
+IRI
+</del>
+</a>
+<del class="diff-old">is:
+</del>
+<ins class="diff-chg">pass
+the
+value
+specified
+in
+the
+algorithm
+along
+with
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>,<ins class="diff-chg">
+the
+currently
+being
+processed
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a>,<ins class="diff-chg">
+and
+</ins><code><ins class="diff-chg">
+true
+</ins></code><ins class="diff-chg">
+for
+the
+</ins><em><ins class="diff-chg">
+vocabRelative
+</ins></em><ins class="diff-chg">
+flag.
+</ins>
+</p>
+<ol class="algorithm">
+<li>
+<del class="diff-old">Create
+</del>
+<ins class="diff-chg">If
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+is
+not
+</ins>
+an
+<del class="diff-old">empty
+list
+of
+terms
+</del>
+<ins class="diff-chg">array,
+transform
+it
+to
+one.
+</ins></li><li><ins class="diff-chg">
+Process
+each
+item
+</ins>
+<em>
+<del class="diff-old">terms
+</del>
+<ins class="diff-chg">context
+</ins>
+</em>
+<del class="diff-old">that
+will
+be
+populated
+with
+term
+</del>
+<ins class="diff-chg">of
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins>
+</a>
+<del class="diff-old">s
+that
+are
+ranked
+according
+to
+how
+closely
+they
+match
+value
+.
+Initialize
+</del>
+<ins class="diff-chg">as
+follows:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins>
+<em>
+<del class="diff-old">highest
+rank
+</del>
+<ins class="diff-chg">context
+</ins>
+</em>
+<del class="diff-old">to
+0
+,
+</del>
+<ins class="diff-chg">equals
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+reset
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>
+and
+<del class="diff-old">set
+</del>
+<ins class="diff-chg">continue
+with
+the
+next
+item.
+</ins></li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+context
+</ins></em><ins class="diff-chg">
+is
+</ins>
+a
+<del class="diff-old">flag
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<ins class="diff-chg">string
+</ins></a>:<ol class="algorithm"><li><ins class="diff-chg">
+Expand
+</ins>
+<em>
+<del class="diff-old">list
+container
+</del>
+<ins class="diff-chg">context
+</ins>
+</em>
+<ins class="diff-new">according
+</ins>
+to
+<del class="diff-old">false
+.
+</del>
+<a href="#iri-expansion">
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr><ins class="diff-chg">
+Expansion
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">For
+each
+</del>
+<ins class="diff-chg">If
+</ins>
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">context
+</ins>
+</em>
+<ins class="diff-new">is
+</ins>
+in
+the
+<del class="diff-old">active
+</del>
+<em>
+<ins class="diff-chg">remoteContexts
+</ins></em><ins class="diff-chg">
+array,
+raise
+an
+</ins><code class="error"><ins class="diff-chg">
+RECURSIVE_CONTEXT_INCLUSION
+</ins></code><ins class="diff-chg">
+error.
+Otherwise,
+add
+</ins><em>
+context
+<del class="diff-old">:
+</del>
+</em>
+<ins class="diff-chg">to
+</ins><em><ins class="diff-chg">
+remoteContexts
+</ins></em>.</li><li><ins class="diff-chg">
+Dereference
+</ins><em><ins class="diff-chg">
+context
+</ins></em>.</li>
+<li>
+If
+the
+<ins class="diff-new">resulting
+document
+is
+a
+JSON
+document
+consisting
+of
+a
+top-level
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+that
+has
+a
+</ins><code><ins class="diff-new">
+@context
+</ins></code><ins class="diff-new">
+member
+recursively
+invoke
+this
+algorithm
+passing
+a
+copy
+of
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a>,<ins class="diff-new">
+the
+value
+of
+the
+</ins><code><ins class="diff-new">
+@context
+</ins></code><ins class="diff-new">
+member
+as
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-new">
+local
+context
+</ins></a>,<ins class="diff-new">
+and
+a
+copy
+of
+the
+</ins>
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">remoteContexts
+</ins>
+</em>
+<del class="diff-old">'s
+</del>
+<ins class="diff-chg">array.
+</ins><a class="tref internalDFN" title="relative_iri" href="#dfn-relative_iri"><ins class="diff-chg">
+Relative
+IRIs
+</ins></a><ins class="diff-chg">
+are
+expanded
+using
+the
+remote
+context's
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+<del class="diff-old">is
+not
+a
+complete
+match
+against
+iri
+,
+continue
+to
+</del>
+</abbr>.
+<ins class="diff-chg">Otherwise
+raise
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_REMOTE_CONTEXT
+</ins></code><ins class="diff-chg">
+error.
+</ins></li><li><ins class="diff-chg">
+Continue
+with
+</ins>
+the
+next
+<ins class="diff-new">item
+from
+</ins>
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">context
+</ins>
+</em>.
+</li>
+</ol>
+</li>
+<li>
+If
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">context
+</ins>
+</em>
+is
+<ins class="diff-new">not
+</ins>
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+<del class="diff-old">containing
+only
+</del>
+</a>,
+<ins class="diff-chg">raise
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_LOCAL_CONTEXT
+</ins></code><ins class="diff-chg">
+error.
+</ins></li><li><ins class="diff-chg">
+Otherwise,
+if
+</ins><em><ins class="diff-chg">
+context
+</ins></em><ins class="diff-chg">
+is
+an
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>,<ins class="diff-chg">
+perform
+</ins>
+the
+<del class="diff-old">property
+@list
+:
+</del>
+<ins class="diff-chg">following
+steps:
+</ins>
+<ol class="algorithm">
+<li>
+If
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">context
+</ins>
+</em>
+has
+a
+<code>
+<del class="diff-old">@container
+</del>
+<ins class="diff-chg">@vocab
+</ins></code><ins class="diff-chg">
+member:
+if
+its
+value
+is
+neither
+an
+</ins><a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri"><ins class="diff-chg">
+absolute
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a>,<ins class="diff-chg">
+i.e.,
+it
+does
+not
+contain
+a
+colon
+(
+</ins><code>:</code><ins class="diff-chg">
+),
+nor
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+trigger
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_VOCAB_MAPPING
+</ins>
+</code>
+<ins class="diff-new">error;
+otherwise
+</ins>
+set
+<ins class="diff-new">the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context's
+</ins></a><a class="tref internalDFN" title="vocabulary_mapping" href="#dfn-vocabulary_mapping"><ins class="diff-new">
+vocabulary
+mapping
+</ins></a>
+to
+<del class="diff-old">@set
+,
+continue
+to
+</del>
+<ins class="diff-chg">its
+value
+and
+remove
+</ins>
+the
+<del class="diff-old">next
+</del>
+<code>
+<ins class="diff-chg">@vocab
+</ins></code><ins class="diff-chg">
+member
+from
+</ins>
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">context
+</ins>
+</em>.
+</li>
+<li>
+If
+<em>
+<del class="diff-old">list
+container
+</del>
+<ins class="diff-chg">context
+</ins>
+</em>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">has
+a
+</ins>
+<code>
+<del class="diff-old">true
+</del>
+<ins class="diff-chg">@language
+</ins>
+</code>
+<del class="diff-old">and
+term
+does
+not
+have
+</del>
+<ins class="diff-chg">member:
+if
+its
+value
+is
+neither
+</ins>
+a
+<del class="diff-old">container
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<ins class="diff-chg">string
+</ins></a><ins class="diff-chg">
+nor
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+trigger
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_DEFAULT_LANGUAGE
+</ins>
+</code>
+<ins class="diff-new">error;
+otherwise
+</ins>
+set
+<ins class="diff-new">the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context's
+</ins></a><a class="tref internalDFN" title="default_language" href="#dfn-default_language"><ins class="diff-new">
+default
+language
+</ins></a>
+to
+<ins class="diff-new">its
+value
+and
+remove
+the
+</ins>
+<code>
+<del class="diff-old">@list
+</del>
+<ins class="diff-chg">@language
+</ins>
+</code>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">member
+from
+</ins><em><ins class="diff-chg">
+context
+</ins></em>.</li><li><ins class="diff-chg">
+For
+each
+other
+</ins><em><ins class="diff-chg">
+key
+</ins></em><ins class="diff-chg">
+-
+</ins>
+<em>
+value
+</em>
+<del class="diff-old">is
+null
+,
+continue
+to
+</del>
+<ins class="diff-chg">pair
+in
+</ins><em><ins class="diff-chg">
+context
+</ins></em><ins class="diff-chg">
+perform
+the
+following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+Remove
+</ins>
+the
+<del class="diff-old">next
+</del>
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">key
+</ins></em><ins class="diff-chg">
+-
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+pair
+from
+</ins><em><ins class="diff-chg">
+context
+</ins>
+</em>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+if
+</del>
+<ins class="diff-chg">If
+</ins>
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">key
+</ins>
+</em>
+<del class="diff-old">has
+</del>
+<ins class="diff-chg">is
+</ins>
+a
+<del class="diff-old">container
+set
+to
+@list
+,
+</del>
+<ins class="diff-chg">JSON-LD
+</ins><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-chg">
+keyword
+</ins></a>,
+continue
+<del class="diff-old">to
+</del>
+<ins class="diff-chg">with
+</ins>
+the
+next
+<em>
+<del class="diff-old">term
+.
+</del>
+<ins class="diff-chg">key
+</ins></em><ins class="diff-chg">
+-
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+pair.
+</ins>
+</li>
+<li>
+<del class="diff-old">Set
+</del>
+<ins class="diff-chg">If
+</ins>
+<em>
+<del class="diff-old">rank
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+<del class="diff-old">to
+</del>
+<ins class="diff-chg">equals
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+replace
+</ins>
+the
+<a class="tref internalDFN" title="term_definition" href="#dfn-term_definition">
+term
+<del class="diff-old">rank
+</del>
+<ins class="diff-chg">definition
+</ins>
+</a>
+<del class="diff-old">of
+</del>
+<ins class="diff-chg">for
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">key
+</ins>
+</em>
+<del class="diff-old">by
+passing
+passing
+term
+,
+value
+,
+and
+</del>
+<ins class="diff-chg">in
+the
+</ins>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+<ins class="diff-new">with
+an
+</ins><a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+mapping
+</ins></a><ins class="diff-new">
+set
+</ins>
+to
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-new">null
+</ins></a><ins class="diff-new">
+and
+continue
+with
+</ins>
+the
+<del class="diff-old">Term
+Rank
+Algorithm
+.
+</del>
+<ins class="diff-chg">next
+</ins><em><ins class="diff-chg">
+key
+</ins></em><ins class="diff-chg">
+-
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+pair.
+</ins>
+</li>
+<li>
+If
+<em>
+<del class="diff-old">rank
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+is
+<del class="diff-old">greater
+than
+0
+:
+If
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a>,<ins class="diff-chg">
+expand
+it
+according
+to
+the
+</ins><a href="#iri-expansion"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+Expansion
+algorithm
+</ins></a><ins class="diff-chg">
+and
+replace
+the
+</ins><a class="tref internalDFN" title="term_definition" href="#dfn-term_definition">
+term
+<ins class="diff-new">definition
+</ins></a><ins class="diff-new">
+for
+</ins><em><ins class="diff-new">
+key
+</ins>
+</em>
+<del class="diff-old">has
+a
+container
+</del>
+<ins class="diff-chg">in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+with
+an
+</ins><a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+mapping
+</ins></a>
+set
+to
+<del class="diff-old">@set
+,
+then
+add
+1
+to
+</del>
+<ins class="diff-chg">the
+expanded
+</ins>
+<em>
+<del class="diff-old">rank
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>.
+<ins class="diff-new">Continue
+with
+the
+next
+</ins><em><ins class="diff-new">
+key
+</ins></em><ins class="diff-new">
+-
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+pair.
+</ins>
+</li>
+<li>
+If
+<em>
+value
+</em>
+is
+<ins class="diff-new">not
+</ins>
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+<del class="diff-old">containing
+only
+the
+property
+@list
+</del>
+</a>,
+<ins class="diff-chg">trigger
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_TERM_DEFINITION
+</ins>
+</code>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">error
+</ins></li><li><ins class="diff-chg">
+If
+</ins><a class="tref internalDFN" title="term_definition" href="#dfn-term_definition"><ins class="diff-chg">
+term
+definition
+</ins></a><ins class="diff-chg">
+for
+</ins>
+<em>
+<del class="diff-old">list
+container
+</del>
+<ins class="diff-chg">key
+</ins>
+</em>
+<del class="diff-old">is
+false
+and
+</del>
+<ins class="diff-chg">exists
+in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>,<ins class="diff-chg">
+remove
+it.
+</ins></li><li><ins class="diff-chg">
+Initialize
+a
+new,
+empty
+</ins><a class="tref internalDFN" title="term_definition" href="#dfn-term_definition">
+term
+<ins class="diff-new">definition
+</ins></a><em><ins class="diff-new">
+definition
+</ins></em>.</li><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+value
+</ins>
+</em>
+has
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">an
+</ins>
+<code>
+<del class="diff-old">container
+</del>
+<ins class="diff-chg">@id
+</ins>
+</code>
+<del class="diff-old">set
+to
+@list
+,
+then
+set
+list
+container
+to
+true
+,
+clear
+</del>
+<ins class="diff-chg">member
+with
+a
+value
+</ins>
+<em>
+<del class="diff-old">terms
+,
+set
+</del>
+<ins class="diff-chg">val
+</ins></em>:<ol class="algorithm"><li><ins class="diff-chg">
+if
+</ins>
+<em>
+<del class="diff-old">highest
+rank
+</del>
+<ins class="diff-chg">val
+</ins>
+</em>
+<del class="diff-old">to
+rank
+,
+and
+add
+</del>
+<ins class="diff-chg">is
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+set
+</ins>
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">definition
+</ins>
+</em>
+to
+<em>
+<del class="diff-old">terms
+</del>
+<ins class="diff-chg">val
+</ins>
+</em>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+</del>
+if
+<em>
+<del class="diff-old">rank
+</del>
+<ins class="diff-chg">val
+</ins>
+</em>
+is
+<del class="diff-old">greater
+than
+or
+equal
+to
+</del>
+<ins class="diff-chg">an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a>,<ins class="diff-chg">
+process
+each
+</ins>
+<em>
+<del class="diff-old">highest
+rank
+:
+</del>
+<ins class="diff-chg">item
+</ins></em><ins class="diff-chg">
+in
+the
+array:
+</ins>
+<ol class="algorithm">
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">if
+</ins>
+<em>
+<del class="diff-old">rank
+</del>
+<ins class="diff-chg">item
+</ins>
+</em>
+is
+<del class="diff-old">greater
+than
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a><ins class="diff-chg">
+expand
+it
+according
+the
+</ins><a href="#iri-expansion"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+Expansion
+algorithm
+</ins></a>.</li><li><ins class="diff-chg">
+otherwise,
+raise
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_PROPERTY_GENERATOR
+</ins></code><ins class="diff-chg">
+error.
+</ins></li></ol></li><li><ins class="diff-chg">
+if
+</ins>
+<em>
+<del class="diff-old">highest
+rank
+,
+clear
+</del>
+<ins class="diff-chg">val
+</ins></em><ins class="diff-chg">
+is
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a>,<ins class="diff-chg">
+lexicographically
+sort
+</ins>
+<em>
+<del class="diff-old">terms
+</del>
+<ins class="diff-chg">val
+</ins>
+</em>
+and
+set
+<em>
+<del class="diff-old">highest
+rank
+</del>
+<ins class="diff-chg">definition
+</ins>
+</em>
+to
+<em>
+<del class="diff-old">rank
+</del>
+<ins class="diff-chg">val
+</ins>
+</em>.
+</li>
+<li>
+<del class="diff-old">Add
+</del>
+<ins class="diff-chg">Otherwise,
+if
+</ins>
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">val
+</ins></em><ins class="diff-chg">
+is
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a>,<ins class="diff-chg">
+expand
+it
+according
+the
+</ins><a href="#iri-expansion"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+Expansion
+algorithm
+</ins></a><ins class="diff-chg">
+and
+set
+</ins><em><ins class="diff-chg">
+definition
+</ins>
+</em>
+to
+<em>
+<del class="diff-old">terms
+</del>
+<ins class="diff-chg">val
+</ins>
+</em>.
+</li>
+</ol>
+</li>
+<li>
+If
+<ins class="diff-new">the
+</ins><a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+mapping
+</ins></a><ins class="diff-new">
+of
+</ins>
+<em>
+<del class="diff-old">terms
+</del>
+<ins class="diff-chg">definition
+</ins>
+</em>
+is
+<del class="diff-old">empty,
+and
+the
+active
+context
+</del>
+<ins class="diff-chg">set
+to
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins>
+</a>
+<del class="diff-old">has
+a
+@vocab
+which
+is
+</del>
+<ins class="diff-chg">or
+</ins>
+a
+<del class="diff-old">prefix
+of
+</del>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+<ins class="diff-chg">keyword
+</ins></a>,<ins class="diff-chg">
+store
+the
+</ins>
+<em>
+<del class="diff-old">iri
+</del>
+<ins class="diff-chg">definition
+</ins>
+</em>
+<del class="diff-old">where
+</del>
+<ins class="diff-chg">as
+</ins>
+the
+<del class="diff-old">resulting
+relative
+IRI
+is
+not
+a
+</del>
+<a class="tref internalDFN" title="term_definition" href="#dfn-term_definition">
+term
+<ins class="diff-new">definition
+</ins>
+</a>
+<ins class="diff-new">for
+</ins><em><ins class="diff-new">
+key
+</ins></em>
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+<del class="diff-old">.
+The
+resulting
+relative
+IRI
+</del>
+</a>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">and
+continue
+with
+</ins>
+the
+<del class="diff-old">unmatched
+part
+of
+</del>
+<ins class="diff-chg">next
+</ins>
+<em>
+<del class="diff-old">iri
+</del>
+<ins class="diff-chg">key
+</ins></em><ins class="diff-chg">
+-
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+pair
+from
+</ins><em><ins class="diff-chg">
+context
+</ins>
+</em>.
+</li>
+<li>
+<del class="diff-old">If
+terms
+is
+empty,
+add
+a
+compact
+</del>
+<ins class="diff-chg">Otherwise,
+set
+the
+</ins><a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<ins class="diff-chg">mapping
+</ins>
+</a>
+<del class="diff-old">representation
+</del>
+of
+<em>
+<del class="diff-old">iri
+</del>
+<ins class="diff-chg">definition
+</ins>
+</em>
+<del class="diff-old">for
+each
+term
+in
+the
+active
+context
+which
+maps
+</del>
+to
+<del class="diff-old">an
+</del>
+<ins class="diff-chg">the
+result
+of
+expanding
+</ins><em><ins class="diff-chg">
+key
+</ins></em><ins class="diff-chg">
+according
+the
+</ins><a href="#iri-expansion">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">which
+is
+</del>
+<ins class="diff-chg">Expansion
+algorithm
+</ins></a>.</li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+has
+an
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+member
+with
+</ins>
+a
+<del class="diff-old">prefix
+for
+</del>
+<ins class="diff-chg">value
+</ins>
+<em>
+<del class="diff-old">iri
+</del>
+<ins class="diff-chg">val
+</ins></em><ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+val
+</ins>
+</em>
+<del class="diff-old">where
+the
+resulting
+compact
+IRI
+</del>
+is
+not
+a
+<del class="diff-old">term
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<ins class="diff-chg">string
+</ins>
+</a>
+<del class="diff-old">in
+the
+active
+context
+.
+The
+resulting
+compact
+</del>
+<ins class="diff-chg">or
+does
+not
+expand
+to
+an
+</ins><a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri"><ins class="diff-chg">
+absolute
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+<del class="diff-old">is
+the
+term
+associated
+with
+</del>
+<ins class="diff-chg">using
+</ins>
+the
+<del class="diff-old">partially
+matched
+</del>
+<a href="#iri-expansion">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">in
+</del>
+<ins class="diff-chg">Expansion
+algorithm
+</ins></a>,<ins class="diff-chg">
+raise
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_TYPE_MAPPING
+</ins></code><ins class="diff-chg">
+error.
+Otherwise
+set
+</ins>
+the
+<del class="diff-old">active
+context
+</del>
+<a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping">
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr><ins class="diff-chg">
+mapping
+</ins>
+</a>
+<del class="diff-old">concatenated
+with
+a
+colon
+(:)
+character
+and
+the
+unmatched
+part
+</del>
+of
+<em>
+<del class="diff-old">iri
+</del>
+<ins class="diff-chg">definition
+</ins></em><ins class="diff-chg">
+to
+the
+expanded
+</ins><em><ins class="diff-chg">
+val
+</ins>
+</em>.
+</li>
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">Otherwise,
+if
+</ins>
+<em>
+<del class="diff-old">terms
+is
+empty,
+the
+IRI
+being
+processed
+is
+a
+property
+or
+the
+</del>
+value
+<del class="diff-old">of
+@type
+and
+</del>
+</em>
+<ins class="diff-chg">has
+an
+</ins>
+<code>
+<del class="diff-old">@vocab
+</del>
+<ins class="diff-chg">@language
+</ins>
+</code>
+<ins class="diff-new">member
+with
+a
+value
+</ins><em><ins class="diff-new">
+val
+</ins></em><ins class="diff-new">
+that
+</ins>
+is
+<del class="diff-old">not
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a><ins class="diff-chg">
+or
+</ins><a class="tref internalDFN" title="null" href="#dfn-null">
+null
+<del class="diff-old">and
+matches
+</del>
+</a>,
+<ins class="diff-chg">set
+</ins>
+the
+<del class="diff-old">beginning
+</del>
+<a class="tref internalDFN" title="language_mapping" href="#dfn-language_mapping">
+<ins class="diff-chg">language
+mapping
+</ins></a>
+of
+<em>
+<del class="diff-old">iri
+,
+return
+</del>
+<ins class="diff-chg">definition
+</ins></em><ins class="diff-chg">
+to
+</ins>
+the
+<del class="diff-old">unmatched
+portion
+of
+</del>
+<ins class="diff-chg">lowercased
+</ins>
+<em>
+<del class="diff-old">iri
+</del>
+<ins class="diff-chg">val
+</ins>
+</em>.
+<del class="diff-old">Otherwise
+return
+</del>
+<ins class="diff-chg">If
+</ins>
+<em>
+<del class="diff-old">iri
+.
+</del>
+<ins class="diff-chg">val
+</ins></em><ins class="diff-chg">
+is
+neither
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a><ins class="diff-chg">
+nor
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+raise
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_LANGUAGE_MAPPING
+</ins></code><ins class="diff-chg">
+error.
+</ins>
+</li>
+<li>
+<del class="diff-old">Otherwise,
+return
+the
+shortest
+and
+lexicographically
+least
+</del>
+<ins class="diff-chg">f
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+has
+an
+</ins><code><ins class="diff-chg">
+@container
+</ins></code><ins class="diff-chg">
+member
+with
+a
+</ins>
+value
+<del class="diff-old">in
+</del>
+<em>
+<del class="diff-old">terms
+</del>
+<ins class="diff-chg">val
+</ins></em><ins class="diff-chg">
+that
+equals
+</ins><code><ins class="diff-chg">
+@list
+</ins></code>,<code><ins class="diff-chg">
+@set
+</ins></code>,<ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+@annotation
+</ins></code>,<ins class="diff-chg">
+set
+the
+</ins><a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping"><ins class="diff-chg">
+container
+mapping
+</ins></a><ins class="diff-chg">
+of
+</ins><em><ins class="diff-chg">
+definition
+</ins></em><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+val
+</ins>
+</em>.
+<ins class="diff-new">If
+</ins><em><ins class="diff-new">
+val
+</ins></em><ins class="diff-new">
+is
+not
+one
+of
+those
+values,
+raise
+an
+</ins><code class="error"><ins class="diff-new">
+INVALID_CONTAINER_MAPPING
+</ins></code><ins class="diff-new">
+error.
+</ins></li></ol></li></ol></li></ol>
+</li>
+</ol>
+</section>
+<section id="iri-expansion">
+<h3>
+<span class="secno">
+<del class="diff-old">4.4.2
+</del>
+<ins class="diff-chg">5.4
+</ins>
+</span>
+<del class="diff-old">Term
+Rank
+Algorithm
+</del>
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr><ins class="diff-chg">
+Expansion
+</ins></h3>
+<p>
+<del class="diff-old">When
+selecting
+among
+multiple
+possible
+terms
+for
+a
+given
+property,
+it
+may
+be
+that
+multiple
+terms
+</del>
+<ins class="diff-chg">In
+JSON-LD
+documents
+keys
+and
+some
+values
+</ins>
+are
+<del class="diff-old">defined
+with
+the
+same
+</del>
+<ins class="diff-chg">evaluated
+to
+produce
+an
+</ins>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">,
+but
+differ
+in
+@type
+,
+@container
+or
+@language
+.
+The
+purpose
+</del>
+</a>.
+<ins class="diff-chg">This
+section
+defines
+an
+algorithm
+for
+transforming
+strings
+representing
+an
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+into
+an
+</ins><a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri"><ins class="diff-chg">
+absolute
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a>.<ins class="diff-chg">
+If
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+expansion
+occurs
+during
+context
+processing,
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+that
+is
+being
+processed
+is
+passed
+to
+this
+algorithm.
+After
+application
+</ins>
+of
+this
+<ins class="diff-new">algorithm,
+values
+processed
+by
+this
+</ins>
+algorithm
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">are
+said
+</ins>
+to
+<del class="diff-old">take
+a
+term
+</del>
+<ins class="diff-chg">be
+in
+</ins><dfn title="expanded_iri_form" id="dfn-expanded_iri_form"><ins class="diff-chg">
+expanded
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+form
+</ins></dfn>,<ins class="diff-chg">
+although
+this
+may
+also
+include
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-chg">
+blank
+node
+identifiers
+</ins>
+</a>
+and
+<del class="diff-old">a
+value
+and
+give
+it
+a
+term
+rank
+.
+The
+selection
+can
+then
+be
+based,
+partly,
+on
+the
+term
+having
+the
+highest
+term
+rank
+</del>
+<ins class="diff-chg">JSON-LD
+</ins><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-chg">
+keywords
+</ins>
+</a>.
+</p>
+<p>
+<del class="diff-old">Given
+</del>
+<ins class="diff-chg">The
+algorithm
+takes
+two
+mandatory
+and
+four
+optional
+input
+variables:
+</ins>
+a
+<del class="diff-old">term
+term
+,
+</del>
+<em>
+value
+<del class="diff-old">,
+and
+</del>
+</em>
+<ins class="diff-chg">to
+be
+expanded,
+an
+</ins>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+<ins class="diff-new">two
+flags
+</ins><em><ins class="diff-new">
+documentRelative
+</ins></em><ins class="diff-new">
+and
+</ins><em><ins class="diff-new">
+vocabRelative
+</ins></em><ins class="diff-new">
+specifying
+whether
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+should
+be
+interpreted
+as
+</ins><a class="tref internalDFN" title="relative_iri" href="#dfn-relative_iri"><ins class="diff-new">
+relative
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr>
+</a>
+<del class="diff-old">determine
+</del>
+<ins class="diff-chg">against
+</ins>
+the
+<del class="diff-old">term
+rank
+</del>
+<ins class="diff-chg">document's
+base
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+or
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context's
+</ins>
+</a>
+<del class="diff-old">using
+</del>
+<a class="tref internalDFN" title="vocabulary_mapping" href="#dfn-vocabulary_mapping">
+<ins class="diff-chg">vocabulary
+mapping
+</ins></a>,<ins class="diff-chg">
+along
+with
+an
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+passed
+when
+this
+algorithm
+is
+used
+in
+</ins><a href="#context-processing"><ins class="diff-chg">
+Context
+Processing
+</ins></a>,<ins class="diff-chg">
+and
+finally
+an
+array
+</ins><em><ins class="diff-chg">
+path
+</ins></em><ins class="diff-chg">
+which
+is
+used
+to
+detect
+cyclic
+</ins><a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+mappings
+</ins></a>.<ins class="diff-chg">
+If
+not
+passed,
+</ins>
+the
+<del class="diff-old">following
+steps:
+</del>
+<ins class="diff-chg">two
+flags
+are
+set
+to
+</ins><code><ins class="diff-chg">
+false
+</ins></code><ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+path
+</ins></em><ins class="diff-chg">
+is
+initialized
+to
+an
+empty
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a><ins class="diff-chg">
+by
+default.
+</ins></p><p><ins class="diff-chg">
+The
+algorithm
+for
+generating
+an
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+is:
+</ins>
+</p>
+<ol class="algorithm">
+<li>
+If
+<em>
+value
+</em>
+is
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+<del class="diff-old">,
+term
+rank
+</del>
+</a>
+<del class="diff-old">is
+3
+.
+Otherwise,
+if
+</del>
+<ins class="diff-chg">or
+a
+JSON-LD
+</ins><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-chg">
+keyword
+</ins></a>,<ins class="diff-chg">
+return
+</ins>
+<em>
+value
+</em>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">as
+is.
+</ins></li><li><ins class="diff-chg">
+If
+</ins>
+a
+<del class="diff-old">JSON
+object
+</del>
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+<ins class="diff-chg">local
+context
+</ins>
+</a>
+<del class="diff-old">containing
+only
+the
+property
+@list
+:
+</del>
+<ins class="diff-chg">has
+been
+passed
+</ins>
+<ol class="algorithm">
+<li>
+<del class="diff-old">If
+the
+@list
+property
+</del>
+<ins class="diff-chg">and
+</ins><em><ins class="diff-chg">
+value
+</ins></em>
+is
+<del class="diff-old">an
+empty
+array,
+if
+</del>
+<ins class="diff-chg">in
+the
+</ins>
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">path
+</ins>
+</em>
+<del class="diff-old">has
+@container
+</del>
+<ins class="diff-chg">array,
+raise
+a
+</ins><code class="error"><ins class="diff-chg">
+CYCLIC_IRI_MAPPING
+</ins>
+</code>
+<del class="diff-old">set
+</del>
+<ins class="diff-chg">error.
+Otherwise
+append
+</ins><em><ins class="diff-chg">
+value
+</ins></em>
+to
+<del class="diff-old">@list
+,
+term
+rank
+is
+1
+,
+otherwise
+0
+.
+</del>
+<em>
+<ins class="diff-chg">path
+</ins></em>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+</del>
+<ins class="diff-chg">If
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+contains
+an
+</ins><a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+mapping
+</ins></a><ins class="diff-chg">
+for
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+that
+is
+not
+a
+</ins><a class="tref internalDFN" title="property_generator" href="#dfn-property_generator"><ins class="diff-chg">
+property
+generator
+</ins></a>
+return
+the
+<del class="diff-old">sum
+</del>
+<ins class="diff-chg">result
+</ins>
+of
+<ins class="diff-new">recursively
+calling
+this
+algorithm
+passing
+</ins>
+the
+<del class="diff-old">term
+rank
+</del>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr>
+</a>
+<del class="diff-old">s
+</del>
+<ins class="diff-chg">of
+the
+</ins><a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+mapping
+</ins></a><ins class="diff-chg">
+as
+new
+</ins><em><ins class="diff-chg">
+value
+</ins></em>,<ins class="diff-chg">
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a>,<em><ins class="diff-chg">
+path
+</ins></em>,<ins class="diff-chg">
+and
+</ins><code><ins class="diff-chg">
+true
+</ins></code>
+for
+<del class="diff-old">every
+entry
+in
+</del>
+the
+<del class="diff-old">list.
+</del>
+<em>
+<ins class="diff-chg">vocabRelative
+</ins></em><ins class="diff-chg">
+flag.
+If
+the
+result
+is
+a
+</ins><a class="tref internalDFN" title="property_generator" href="#dfn-property_generator"><ins class="diff-chg">
+property
+generator
+</ins></a>,<ins class="diff-chg">
+raise
+an
+</ins><code class="error"><ins class="diff-chg">
+PROPERTY_GENERATOR_IN_TERM_DEFINITION
+</ins></code><ins class="diff-chg">
+error.
+</ins>
+</li>
+</ol>
+</li>
+<li>
+<del class="diff-old">Otherwise,
+</del>
+<ins class="diff-chg">If
+an
+</ins><a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+mapping
+</ins></a><ins class="diff-chg">
+exists
+for
+</ins>
+<em>
+value
+</em>
+<del class="diff-old">must
+be
+a
+node
+definition
+,
+node
+reference
+,
+or
+a
+JSON
+object
+</del>
+<ins class="diff-chg">in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins>
+</a>
+<del class="diff-old">having
+</del>
+<ins class="diff-chg">that
+is
+not
+</ins>
+a
+<del class="diff-old">@value
+.
+</del>
+<a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">
+<ins class="diff-chg">property
+generator
+</ins></a><ins class="diff-chg">
+return
+the
+value
+of
+the
+</ins><a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+mapping
+</ins></a>.</li>
+<li>
+If
+<em>
+value
+</em>
+<del class="diff-old">has
+</del>
+<ins class="diff-chg">contains
+</ins>
+a
+<del class="diff-old">@value
+</del>
+<ins class="diff-chg">colon
+(
+</ins><code>:
+</code>
+<del class="diff-old">property:
+</del>
+<ins class="diff-chg">),
+perform
+the
+following
+steps:
+</ins>
+<ol class="algorithm">
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">Split
+</ins>
+<em>
+value
+</em>
+<del class="diff-old">has
+a
+@type
+property
+matching
+</del>
+<ins class="diff-chg">into
+</ins>
+a
+<del class="diff-old">@type
+coercion
+for
+</del>
+<em>
+<del class="diff-old">term
+,
+term
+rank
+is
+3
+,
+otherwise
+if
+</del>
+<ins class="diff-chg">prefix
+</ins></em><ins class="diff-chg">
+and
+</ins>
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">suffix
+</ins>
+</em>
+<del class="diff-old">has
+no
+@type
+</del>
+<ins class="diff-chg">at
+the
+first
+occurrence
+of
+a
+colon
+(
+</ins><code>:
+</code>
+<del class="diff-old">coercion
+and
+no
+@language
+,
+term
+rank
+is
+1
+,
+otherwise
+0
+.
+</del>
+<ins class="diff-chg">).
+</ins>
+</li>
+<li>
+<del class="diff-old">Otherwise,
+if
+@value
+is
+not
+a
+string
+,
+if
+</del>
+<ins class="diff-chg">If
+</ins>
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">suffix
+</ins>
+</em>
+<del class="diff-old">has
+no
+</del>
+<ins class="diff-chg">begins
+with
+</ins>
+<code>
+<del class="diff-old">@type
+</del>
+<ins class="diff-chg">//
+</ins>
+</code>
+or
+<em>
+<ins class="diff-new">prefix
+</ins></em><ins class="diff-new">
+equals
+</ins>
+<code>
+<del class="diff-old">@language
+it
+is
+2
+</del>
+<ins class="diff-chg">_
+</ins>
+</code>,
+<del class="diff-old">otherwise
+1
+.
+Otherwise,
+if
+</del>
+<ins class="diff-chg">return
+</ins>
+<em>
+value
+</em>
+<ins class="diff-new">as
+is.
+</ins></li><li><ins class="diff-new">
+If
+a
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-new">
+local
+context
+</ins></a>
+has
+<del class="diff-old">no
+@language
+property,
+if
+</del>
+<ins class="diff-chg">been
+passed,
+expand
+</ins>
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">prefix
+</ins>
+</em>
+<del class="diff-old">has
+@language
+null
+,
+or
+</del>
+<ins class="diff-chg">by
+recursively
+invoking
+this
+algorithm
+passing
+</ins>
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">prefix
+</ins>
+</em>
+<del class="diff-old">has
+no
+@type
+or
+@language
+and
+</del>
+<ins class="diff-chg">as
+</ins><em><ins class="diff-chg">
+value
+</ins></em>,
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+<del class="diff-old">has
+no
+</del>
+<ins class="diff-chg">and
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a>,<em><ins class="diff-chg">
+path
+</ins></em>,<ins class="diff-chg">
+and
+</ins>
+<code>
+<del class="diff-old">@language
+,
+term
+rank
+</del>
+<ins class="diff-chg">true
+</ins></code><ins class="diff-chg">
+for
+the
+</ins><em><ins class="diff-chg">
+vocabRelative
+</ins></em><ins class="diff-chg">
+flag.
+If
+the
+expanded
+</ins><em><ins class="diff-chg">
+prefix
+</ins></em><ins class="diff-chg">
+contains
+a
+colon
+(
+</ins><code>:</code><ins class="diff-chg">
+)
+generate
+and
+return
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>
+</a>
+<del class="diff-old">is
+3
+,
+otherwise
+0
+.
+</del>
+<ins class="diff-chg">by
+prepending
+the
+expanded
+</ins><em><ins class="diff-chg">
+prefix
+</ins></em><ins class="diff-chg">
+to
+the
+(possibly
+empty)
+</ins><em><ins class="diff-chg">
+suffix
+</ins></em><ins class="diff-chg">
+using
+textual
+concatenation.
+</ins>
+</li>
+<li>
+Otherwise,
+if
+<ins class="diff-new">the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a><ins class="diff-new">
+contains
+an
+</ins><a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+mapping
+</ins></a><ins class="diff-new">
+for
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">prefix
+</ins>
+</em>
+<del class="diff-old">has
+</del>
+<ins class="diff-chg">that
+is
+not
+</ins>
+a
+<del class="diff-old">@language
+</del>
+<a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">
+property
+<del class="diff-old">matching
+a
+@language
+definition
+for
+</del>
+<ins class="diff-chg">generator
+</ins></a>,<ins class="diff-chg">
+generate
+and
+return
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a><ins class="diff-chg">
+by
+prepending
+the
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a><ins class="diff-chg">
+mapped
+to
+</ins>
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">prefix
+</ins>
+</em>
+<del class="diff-old">(or
+</del>
+<ins class="diff-chg">to
+the
+(possibly
+empty)
+</ins>
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">suffix
+</ins>
+</em>
+<del class="diff-old">has
+no
+@type
+or
+</del>
+<ins class="diff-chg">using
+textual
+concatenation.
+</ins></li></ol></li><li><ins class="diff-chg">
+Otherwise,
+if
+the
+</ins><em><ins class="diff-chg">
+vocabRelative
+</ins></em><ins class="diff-chg">
+flag
+is
+set
+to
+</ins>
+<code>
+<del class="diff-old">@language
+</del>
+<ins class="diff-chg">true
+</ins>
+</code>
+<del class="diff-old">definition
+</del>
+and
+<del class="diff-old">@language
+in
+</del>
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+<del class="diff-old">matches
+</del>
+<ins class="diff-chg">contains
+a
+</ins><a class="tref internalDFN" title="vocabulary_mapping" href="#dfn-vocabulary_mapping"><ins class="diff-chg">
+vocabulary
+mapping
+</ins></a>,<ins class="diff-chg">
+generate
+and
+return
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a><ins class="diff-chg">
+by
+prepending
+</ins>
+the
+<del class="diff-old">value
+@language
+),
+term
+rank
+</del>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr>
+</a>
+<del class="diff-old">is
+3
+,
+otherwise
+if
+</del>
+<ins class="diff-chg">of
+the
+</ins><a class="tref internalDFN" title="vocabulary_mapping" href="#dfn-vocabulary_mapping"><ins class="diff-chg">
+vocabulary
+mapping
+</ins></a><ins class="diff-chg">
+to
+the
+</ins>
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+<del class="diff-old">has
+no
+@type
+coercion
+and
+no
+@language
+,
+term
+rank
+is
+1
+,
+otherwise
+0
+.
+</del>
+<ins class="diff-chg">using
+textual
+concatenation.
+</ins>
+</li>
+<li>
+Otherwise,
+if
+<ins class="diff-new">the
+</ins>
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">documentRelative
+</ins>
+</em>
+<del class="diff-old">has
+@type
+coerced
+</del>
+<ins class="diff-chg">flag
+is
+set
+</ins>
+to
+<code>
+<del class="diff-old">@id
+</del>
+<ins class="diff-chg">true
+</ins>
+</code>,
+<del class="diff-old">term
+rank
+</del>
+<ins class="diff-chg">resolve
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+against
+the
+base
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+as
+per
+[
+</ins><cite><a class="bibref" href="#bib-RFC3986"><ins class="diff-chg">
+RFC3986
+</ins></a></cite><ins class="diff-chg">
+]
+and
+return
+the
+resulting
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a>.<ins class="diff-chg">
+Only
+the
+basic
+algorithm
+in
+section
+5.2
+of
+[
+</ins><cite><a class="bibref" href="#bib-RFC3986"><ins class="diff-chg">
+RFC3986
+</ins>
+</a>
+</cite>
+<ins class="diff-new">]
+</ins>
+is
+<del class="diff-old">3
+,
+otherwise
+if
+</del>
+<ins class="diff-chg">used;
+neither
+</ins>
+<em>
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">Syntax-Based
+Normalization
+</ins>
+</em>
+<del class="diff-old">has
+no
+@type
+coercion
+</del>
+<ins class="diff-chg">nor
+</ins><em><ins class="diff-chg">
+Scheme-Based
+Normalization
+</ins></em><ins class="diff-chg">
+(as
+described
+in
+sections
+6.2.2
+</ins>
+and
+<del class="diff-old">no
+@language
+,
+term
+rank
+</del>
+<ins class="diff-chg">6.2.3
+of
+[
+</ins><cite><a class="bibref" href="#bib-RFC3986"><ins class="diff-chg">
+RFC3986
+</ins>
+</a>
+<del class="diff-old">is
+1
+,
+otherwise
+0
+.
+</del>
+</cite>
+<ins class="diff-chg">])
+are
+performed.
+Characters
+additionally
+allowed
+in
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+references
+are
+treated
+in
+the
+same
+way
+that
+unreserved
+characters
+are
+treated
+in
+URI
+references,
+per
+section
+6.5
+of
+[
+</ins><cite><a class="bibref" href="#bib-RFC3987"><ins class="diff-chg">
+RFC3987
+</ins></a></cite><ins class="diff-chg">
+]
+</ins>
+</li>
+<li>
+<del class="diff-old">Return
+term
+rank
+.
+</del>
+<ins class="diff-chg">Otherwise
+return
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+as
+is.
+</ins>
+</li>
+</ol>
+<p>
+<ins class="diff-chg">If
+the
+result
+of
+the
+algorithm
+above
+is
+a
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-chg">
+blank
+node
+identifier
+</ins></a>,<ins class="diff-chg">
+i.e.,
+a
+string
+that
+begins
+with
+</ins><code><ins class="diff-chg">
+_:
+</ins></code>,<ins class="diff-chg">
+and
+no
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+has
+been
+passed,
+</ins><a href="#generate-blank-node-identifier"><ins class="diff-chg">
+generated
+a
+new
+blank
+node
+identifier
+</ins></a><ins class="diff-chg">
+before
+returning
+the
+final
+result.
+</ins></p>
+</section>
+<section id="value-expansion">
+<h3>
+<span class="secno">
+<del class="diff-old">4.5
+</del>
+<ins class="diff-chg">5.5
+</ins>
+</span>
+Value
+Expansion
+</h3>
+<p>
+Some
+values
+in
+JSON-LD
+can
+be
+expressed
+in
+a
+<del class="diff-old">compact
+form.
+</del>
+<a class="tref internalDFN" title="compacted_form" href="#dfn-compacted_form">
+<ins class="diff-chg">compacted
+form
+</ins></a>.
+These
+values
+are
+required
+to
+be
+expanded
+at
+times
+when
+processing
+JSON-LD
+documents.
+<ins class="diff-new">A
+value
+is
+said
+to
+be
+in
+</ins><dfn title="expanded_form" id="dfn-expanded_form"><ins class="diff-new">
+expanded
+form
+</ins></dfn><ins class="diff-new">
+after
+the
+application
+of
+this
+algorithm.
+</ins>
+</p>
+<p>
+The
+algorithm
+for
+expanding
+a
+<em>
+value
+</em>
+takes
+an
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+It
+is
+implemented
+as
+follows:
+</p>
+<ol class="algorithm">
+<li>
+If
+<em>
+value
+</em>
+is
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>,
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">return
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>.</li><li><ins class="diff-chg">
+Initialize
+an
+empty
+object
+</ins>
+<em>
+<del class="diff-old">value
+is
+already
+expanded.
+</del>
+<ins class="diff-chg">result
+</ins></em>.
+</li>
+<li>
+If
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+is
+<code>
+@graph
+</code>
+or
+the
+<del class="diff-old">target
+of
+an
+</del>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+<ins class="diff-chg">active
+property's
+</ins></a><a class="tref internalDFN" title="type_mapping" href="#dfn-type_mapping"><ins class="diff-chg">
+type
+mapping
+</ins></a><ins class="diff-chg">
+is
+set
+to
+</ins>
+<code>
+@id
+<del class="diff-old">coercion,
+expand
+the
+value
+into
+an
+object
+with
+</del>
+</code>,
+<ins class="diff-chg">add
+</ins>
+a
+key-value
+pair
+<ins class="diff-new">to
+</ins><em><ins class="diff-new">
+result
+</ins></em>
+where
+the
+key
+is
+<code>
+@id
+</code>
+and
+the
+value
+is
+the
+<del class="diff-old">expanded
+IRI
+</del>
+<ins class="diff-chg">result
+of
+expanding
+</ins><em><ins class="diff-chg">
+value
+</ins></em>
+according
+to
+the
+<a href="#iri-expansion">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+<ins class="diff-new">algorithm
+</ins>
+</a>
+<del class="diff-old">rules.
+Otherwise,
+if
+active
+property
+is
+not
+a
+keyword
+,
+then
+expand
+</del>
+<ins class="diff-chg">passing
+</ins><code><ins class="diff-chg">
+true
+</ins></code><ins class="diff-chg">
+for
+the
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">documentRelative
+</ins>
+</em>
+<del class="diff-old">into
+an
+object:
+</del>
+<ins class="diff-chg">flag.
+Then
+return
+</ins><em><ins class="diff-chg">
+result
+</ins></em>.</li>
+<li>
+<del class="diff-old">Set
+the
+first
+</del>
+<ins class="diff-chg">Add
+a
+</ins>
+key-value
+pair
+to
+<em>
+<ins class="diff-new">result
+</ins></em><ins class="diff-new">
+where
+the
+key
+is
+</ins>
+<code>
+@value
+</code>
+and
+the
+<del class="diff-old">unexpanded
+</del>
+<ins class="diff-chg">value
+is
+</ins>
+<em>
+value
+</em>.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+<del class="diff-old">is
+the
+target
+of
+typed
+literal
+coercion,
+set
+the
+second
+</del>
+<ins class="diff-chg">has
+a
+</ins><a class="tref internalDFN" title="type_mapping" href="#dfn-type_mapping"><ins class="diff-chg">
+type
+mapping
+</ins></a>,<ins class="diff-chg">
+add
+a
+</ins>
+key-value
+pair
+to
+<em>
+<ins class="diff-new">result
+</ins></em><ins class="diff-new">
+where
+the
+key
+is
+</ins>
+<code>
+@type
+</code>
+and
+the
+<del class="diff-old">associated
+coercion
+datatype
+expanded
+according
+to
+</del>
+<ins class="diff-chg">value
+is
+</ins>
+the
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">Expansion
+</del>
+</a>
+<del class="diff-old">rules.
+</del>
+<ins class="diff-chg">associated
+with
+the
+</ins><a class="tref internalDFN" title="type_mapping" href="#dfn-type_mapping"><ins class="diff-chg">
+type
+mapping
+</ins></a><ins class="diff-chg">
+or
+a
+newly
+</ins><a href="#generate-blank-node-identifier"><ins class="diff-chg">
+generated
+blank
+node
+identifier
+</ins></a><ins class="diff-chg">
+if
+the
+</ins><a class="tref internalDFN" title="type_mapping" href="#dfn-type_mapping"><ins class="diff-chg">
+type
+mapping
+</ins></a><ins class="diff-chg">
+is
+set
+to
+a
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-chg">
+blank
+node
+identifier
+</ins></a>.
+</li>
+<li>
+Otherwise,
+if
+<em>
+<ins class="diff-new">value
+</ins></em><ins class="diff-new">
+is
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-new">
+string
+</ins></a><ins class="diff-new">
+and
+</ins>
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+<del class="diff-old">is
+the
+target
+of
+</del>
+<ins class="diff-chg">has
+a
+</ins><a class="tref internalDFN" title="language_mapping" href="#dfn-language_mapping">
+language
+<del class="diff-old">tagging,
+</del>
+<ins class="diff-chg">mapping
+</ins></a><ins class="diff-chg">
+or
+an
+</ins><a class="tref internalDFN" title="default_language" href="#dfn-default_language"><ins class="diff-chg">
+default
+language
+</ins></a><ins class="diff-chg">
+is
+</ins>
+set
+<ins class="diff-new">in
+</ins>
+the
+<del class="diff-old">second
+</del>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-chg">active
+context
+</ins></a>,<ins class="diff-chg">
+add
+a
+</ins>
+key-value
+pair
+to
+<em>
+<ins class="diff-new">result
+</ins></em><ins class="diff-new">
+where
+the
+key
+is
+</ins>
+<code>
+@language
+</code>
+and
+<ins class="diff-new">the
+</ins>
+value
+<del class="diff-old">of
+</del>
+<ins class="diff-chg">is
+</ins>
+the
+language
+<del class="diff-old">tagging
+from
+</del>
+<ins class="diff-chg">tag
+associated
+with
+</ins>
+the
+<a class="tref internalDFN" title="language_mapping" href="#dfn-language_mapping">
+<ins class="diff-chg">language
+mapping
+</ins></a><ins class="diff-chg">
+or
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">property
+</ins></a><ins class="diff-chg">
+or
+the
+</ins><a class="tref internalDFN" title="default_language" href="#dfn-default_language"><ins class="diff-chg">
+default
+language
+</ins>
+</a>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+</del>
+<ins class="diff-chg">Return
+</ins>
+<em>
+<del class="diff-old">value
+is
+already
+expanded.
+</del>
+<ins class="diff-chg">result
+</ins></em>.
+</li>
+</ol>
+</section>
+<section id="label-blank-nodes-algorithm">
+<h3>
+<span class="secno">
+<del class="diff-old">4.6
+</del>
+<ins class="diff-chg">5.6
+</ins>
+</span>
+<del class="diff-old">Value
+Compaction
+</del>
+<ins class="diff-chg">Label
+Blank
+Nodes
+Algorithm
+</ins>
+</h3>
+<p>
+<del class="diff-old">Some
+values,
+such
+as
+IRIs
+and
+typed
+literals
+,
+may
+be
+expressed
+in
+an
+expanded
+form
+(
+expanded
+value
+)
+in
+JSON-LD.
+These
+values
+are
+required
+to
+be
+compacted
+at
+times
+when
+processing
+JSON-LD
+documents.
+</del>
+The
+algorithm
+<del class="diff-old">for
+compacting
+</del>
+<ins class="diff-chg">takes
+a
+single
+input
+variable:
+</ins>
+an
+<del class="diff-old">expanded
+value
+</del>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">takes
+an
+active
+property
+and
+active
+context
+</del>
+<ins class="diff-chg">to
+be
+labeled
+with
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-chg">
+blank
+node
+identifiers
+</ins>
+</a>.
+<del class="diff-old">It
+is
+implemented
+as
+follows:
+</del>
+</p>
+<ol class="algorithm">
+<li>
+If
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">only
+has
+one
+property
+and
+the
+active
+context
+has
+no
+default
+language,
+then
+the
+compacted
+value
+</del>
+is
+<del class="diff-old">the
+value
+of
+@value
+.
+</del>
+<ins class="diff-chg">an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a>,<ins class="diff-chg">
+recursively
+apply
+this
+algorithm
+to
+all
+its
+items.
+</ins>
+</li>
+<li>
+Otherwise,
+if
+<del class="diff-old">active
+property
+is
+@graph
+,
+the
+compacted
+value
+</del>
+<em>
+<ins class="diff-chg">element
+</ins></em>
+is
+<del class="diff-old">the
+value
+associated
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>
+with
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">a
+</ins>
+<code>
+<del class="diff-old">@id
+</del>
+<ins class="diff-chg">@list
+</ins>
+</code>
+<del class="diff-old">key,
+processed
+according
+</del>
+<ins class="diff-chg">member,
+recursively
+apply
+this
+algorithm
+</ins>
+to
+<ins class="diff-new">all
+items
+of
+</ins>
+the
+<del class="diff-old">IRI
+Compaction
+steps.
+</del>
+<code>
+<ins class="diff-chg">@list
+</ins></code><ins class="diff-chg">
+member's
+value.
+</ins>
+</li>
+<li>
+Otherwise,
+if
+<del class="diff-old">the
+active
+context
+contains
+</del>
+<em>
+<ins class="diff-chg">element
+</ins></em><ins class="diff-chg">
+is
+</ins>
+a
+<del class="diff-old">coercion
+target
+for
+the
+</del>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a><ol class="algorithm"><li><ins class="diff-chg">
+For
+each
+</ins><em>
+key
+<del class="diff-old">that
+matches
+the
+expression
+of
+the
+value,
+compact
+the
+</del>
+</em>
+<ins class="diff-chg">-
+</ins><em>
+value
+<del class="diff-old">using
+the
+following
+steps:
+</del>
+</em>
+<ins class="diff-chg">pair
+ordered
+by
+</ins><em><ins class="diff-chg">
+key
+</ins></em><ins class="diff-chg">
+recursively
+apply
+this
+algorithm
+to
+</ins><em><ins class="diff-chg">
+value
+</ins></em>.</li>
+<li>
+If
+<del class="diff-old">the
+coercion
+target
+</del>
+<em>
+<ins class="diff-chg">element
+</ins></em>
+is
+<ins class="diff-new">a
+</ins><a class="tref internalDFN" title="node_object" href="#dfn-node_object"><ins class="diff-new">
+node
+object
+</ins></a><ins class="diff-new">
+without
+</ins>
+an
+<code>
+@id
+<del class="diff-old">,
+the
+compacted
+value
+is
+the
+value
+associated
+with
+the
+</del>
+</code>
+<ins class="diff-chg">member,
+create
+a
+new
+</ins>
+<code>
+@id
+</code>
+<del class="diff-old">key,
+processed
+</del>
+<ins class="diff-chg">member
+and
+assign
+it
+a
+new
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-chg">
+blank
+node
+identifier
+</ins></a>
+according
+<del class="diff-old">to
+</del>
+the
+<del class="diff-old">IRI
+Compaction
+</del>
+<a href="#generate-blank-node-identifier">
+<ins class="diff-chg">Generate
+Blank
+Node
+Identifier
+</ins>
+</a>
+<del class="diff-old">steps.
+</del>
+<ins class="diff-chg">algorithm.
+</ins>
+</li>
+<del class="diff-old">If
+the
+coercion
+target
+</del>
+</ol>
+</li>
+</ol>
+</section>
+<section id="generate-blank-node-identifier">
+<h3>
+<span class="secno">
+<ins class="diff-chg">5.7
+</ins></span><ins class="diff-chg">
+Generate
+Blank
+Node
+Identifier
+</ins></h3><p><ins class="diff-chg">
+This
+algorithm
+</ins>
+is
+<ins class="diff-new">used
+to
+generate
+new
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-new">
+blank
+node
+identifiers
+</ins></a><ins class="diff-new">
+or
+to
+relabel
+existing
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-new">
+blank
+node
+identifiers
+</ins></a><ins class="diff-new">
+with
+</ins>
+a
+<del class="diff-old">typed
+literal
+,
+</del>
+<ins class="diff-chg">new
+one
+to
+avoid
+collision
+by
+</ins>
+the
+<del class="diff-old">compacted
+value
+</del>
+<ins class="diff-chg">introduction
+of
+new
+ones.
+It
+needs
+to
+keep
+an
+</ins><em><ins class="diff-chg">
+identifier
+map
+</ins></em>,<ins class="diff-chg">
+a
+</ins><em><ins class="diff-chg">
+counter
+</ins></em>,<ins class="diff-chg">
+and
+a
+</ins><em><ins class="diff-chg">
+prefix
+</ins></em><ins class="diff-chg">
+between
+its
+executions
+to
+be
+able
+to
+generate
+new
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-chg">
+blank
+node
+identifiers
+</ins></a>.<ins class="diff-chg">
+The
+</ins><em><ins class="diff-chg">
+counter
+</ins></em>
+is
+<del class="diff-old">the
+value
+associated
+with
+the
+</del>
+<ins class="diff-chg">initialized
+to
+</ins>
+<code>
+<del class="diff-old">@value
+</del>
+<ins class="diff-chg">0
+</ins>
+</code>
+<del class="diff-old">key.
+Otherwise,
+if
+</del>
+<ins class="diff-chg">and
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">prefix
+</ins>
+</em>
+<del class="diff-old">contains
+an
+</del>
+<ins class="diff-chg">is
+set
+to
+</ins>
+<code>
+<del class="diff-old">@id
+</del>
+<ins class="diff-chg">_:t
+</ins>
+</code>
+<del class="diff-old">key,
+the
+compacted
+value
+is
+</del>
+<ins class="diff-chg">by
+default.
+</ins></p><p><ins class="diff-chg">
+The
+algorithm
+takes
+a
+single
+input
+variable
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">identifier
+</ins>
+</em>
+<del class="diff-old">with
+the
+value
+of
+@id
+processed
+according
+to
+the
+IRI
+Compaction
+steps.
+</del>
+<ins class="diff-chg">which
+might
+be
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>.</p><ol class="algorithm">
+<li>
+<del class="diff-old">Otherwise,
+if
+</del>
+<ins class="diff-chg">If
+</ins>
+the
+<del class="diff-old">active
+context
+</del>
+<em>
+<ins class="diff-chg">identifier
+</ins></em><ins class="diff-chg">
+is
+not
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins>
+</a>
+<del class="diff-old">contains
+a
+@language
+,
+which
+matches
+the
+@language
+of
+the
+value,
+or
+the
+value
+has
+only
+a
+@value
+key,
+the
+compacted
+value
+</del>
+<ins class="diff-chg">and
+</ins>
+is
+<ins class="diff-new">in
+</ins>
+the
+<del class="diff-old">value
+associated
+with
+</del>
+<em>
+<ins class="diff-chg">identifier
+map
+</ins></em>,<ins class="diff-chg">
+return
+</ins>
+the
+<del class="diff-old">@value
+key.
+</del>
+<ins class="diff-chg">mapped
+identifier.
+</ins>
+</li>
+<li>
+Otherwise,
+<del class="diff-old">if
+the
+value
+contains
+</del>
+<ins class="diff-chg">generate
+</ins>
+a
+<del class="diff-old">@type
+key,
+the
+compacted
+value
+is
+</del>
+<ins class="diff-chg">new
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">blankNodeIdentifier
+</ins>
+</em>
+<del class="diff-old">with
+the
+</del>
+<ins class="diff-chg">by
+concatenating
+</ins><em><ins class="diff-chg">
+prefix
+</ins></em><ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+counter
+</ins></em>.</li><li><ins class="diff-chg">
+Increment
+</ins><em><ins class="diff-chg">
+counter
+</ins></em><ins class="diff-chg">
+by
+</ins>
+<code>
+<del class="diff-old">@type
+value
+processed
+according
+to
+the
+IRI
+Compaction
+steps.
+</del>
+<ins class="diff-chg">1
+</ins></code>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+the
+value
+</del>
+<ins class="diff-chg">If
+</ins><em><ins class="diff-chg">
+identifier
+</ins></em>
+is
+not
+<del class="diff-old">modified.
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins></a>,<ins class="diff-chg">
+create
+a
+new
+entry
+in
+</ins><em><ins class="diff-chg">
+identifier
+map
+</ins></em><ins class="diff-chg">
+set
+to
+</ins><em><ins class="diff-chg">
+blankNodeIdentifer
+</ins></em>.</li><li><ins class="diff-chg">
+Return
+</ins><em><ins class="diff-chg">
+blankNodeIdentifier
+</ins></em>.
+</li>
+</ol>
+</section>
+<section id="compaction-algorithm">
+<h3>
+<span class="secno">
+<del class="diff-old">4.7
+Expansion
+Expansion
+is
+the
+process
+of
+taking
+a
+JSON-LD
+document
+and
+applying
+a
+context
+such
+that
+all
+IRI
+,
+datatypes,
+and
+literal
+values
+are
+expanded
+so
+that
+the
+context
+is
+no
+longer
+necessary.
+JSON-LD
+document
+expansion
+is
+typically
+used
+as
+a
+part
+of
+other
+JSON-LD
+API
+methods.
+For
+example,
+assume
+the
+following
+JSON-LD
+input
+document:
+{
+ "@context":
+ {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type", "@id"
+ }
+ },
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/"
+}
+Running
+the
+JSON-LD
+Expansion
+algorithm
+against
+the
+JSON-LD
+input
+document
+provided
+above
+would
+result
+in
+the
+following
+output:
+{
+ "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
+ "http://xmlns.com/foaf/0.1/homepage": {
+ "@id": "http://manu.sporny.org/"
+ }
+}
+4.7.1
+</del>
+<ins class="diff-chg">5.8
+</ins>
+</span>
+<del class="diff-old">Expansion
+</del>
+<ins class="diff-chg">Compaction
+</ins>
+Algorithm
+</h3>
+<p>
+The
+algorithm
+takes
+<del class="diff-old">three
+</del>
+<ins class="diff-chg">four
+</ins>
+input
+variables:
+an
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+an
+<a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">
+<ins class="diff-new">inverse
+context
+</ins></a>,<ins class="diff-new">
+an
+</ins>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>,
+and
+an
+<em>
+element
+</em>
+to
+be
+<del class="diff-old">expanded.
+</del>
+<ins class="diff-chg">compacted.
+</ins>
+To
+begin,
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+set
+to
+the
+result
+of
+<del class="diff-old">performing,
+</del>
+<ins class="diff-chg">performing
+</ins>
+<a href="#context-processing">
+Context
+Processing
+</a>
+on
+the
+passed
+<em>
+context
+</em>,
+<del class="diff-old">or
+empty
+if
+</del>
+<a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">
+<ins class="diff-chg">inverse
+</ins>
+context
+</a>
+is
+<del class="diff-old">null
+</del>
+<ins class="diff-chg">set
+to
+the
+result
+of
+</ins><a href="#context-processing"><ins class="diff-chg">
+creating
+an
+inverse
+context
+</ins></a><ins class="diff-chg">
+from
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins>
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+is
+set
+to
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>,
+and
+<em>
+element
+</em>
+is
+set
+to
+the
+<ins class="diff-new">result
+of
+performing
+the
+</ins><a href="#expansion-algorithm"><ins class="diff-new">
+Expansion
+Algorithm
+</ins></a><ins class="diff-new">
+on
+the
+</ins>
+<a class="tref internalDFN" title="json-ld_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>.
+</p>
+<ol class="algorithm">
+<li>
+If
+<em>
+element
+</em>
+is
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>,
+<del class="diff-old">process
+</del>
+<ol class="algorithm">
+<li>
+<ins class="diff-chg">Initialize
+a
+new
+empty
+array
+</ins><em><ins class="diff-chg">
+result
+</ins></em>.</li><li><ins class="diff-chg">
+Process
+</ins>
+each
+<del class="diff-old">entry
+</del>
+<ins class="diff-chg">item
+</ins>
+in
+<em>
+element
+</em>
+recursively
+using
+this
+algorithm,
+passing
+<del class="diff-old">copies
+</del>
+<ins class="diff-chg">a
+copy
+</ins>
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">
+<ins class="diff-chg">inverse
+context
+</ins></a>,
+and
+<ins class="diff-new">the
+</ins>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>.
+<ins class="diff-new">Add
+each
+compacted
+item
+to
+</ins><em><ins class="diff-new">
+result
+</ins></em><ins class="diff-new">
+unless
+it
+is
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-new">
+null
+</ins></a>.</li><li>
+If
+<em>
+<ins class="diff-new">result
+</ins></em>
+has
+a
+<del class="diff-old">@container
+</del>
+<ins class="diff-chg">single
+item
+and
+the
+</ins><code class="idlMemberName"><a href="#widl-JsonLdOptions-compactArrays"><ins class="diff-chg">
+compactArrays
+</ins></a>
+</code>
+<ins class="diff-new">option
+is
+</ins>
+set
+to
+<code>
+<del class="diff-old">@list
+and
+any
+entry
+in
+</del>
+<ins class="diff-chg">true
+</ins></code>,<ins class="diff-chg">
+return
+that
+item;
+otherwise
+return
+</ins><em><ins class="diff-chg">
+result
+</ins></em>.</li></ol></li><li><ins class="diff-chg">
+If
+</ins>
+<em>
+element
+</em>
+is
+<del class="diff-old">an
+array
+,
+or
+is
+</del>
+<ins class="diff-chg">not
+</ins>
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+<del class="diff-old">containing
+a
+@list
+property,
+</del>
+<ins class="diff-chg">it
+is
+already
+in
+compact
+form,
+</ins>
+return
+<del class="diff-old">an
+error,
+</del>
+<ins class="diff-chg">it
+</ins>
+as
+<del class="diff-old">lists
+of
+lists
+are
+not
+allowed.
+If
+the
+expanded
+entry
+is
+null,
+drop
+it.
+</del>
+<ins class="diff-chg">is.
+</ins></li><li>
+If
+<del class="diff-old">it's
+an
+array,
+merge
+its
+entries
+with
+</del>
+<em>
+element
+</em>
+<del class="diff-old">'s
+entries.
+Otherwise,
+if
+</del>
+<ins class="diff-chg">has
+an
+</ins><code><ins class="diff-chg">
+@value
+</ins></code><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+@id
+</ins></code><ins class="diff-chg">
+member,
+replace
+</ins>
+<em>
+element
+</em>
+<del class="diff-old">is
+an
+object
+</del>
+<ins class="diff-chg">with
+the
+result
+of
+the
+</ins><a href="#value-compaction"><ins class="diff-chg">
+Value
+Compaction
+algorithm
+</ins></a>.
+If
+<ins class="diff-new">the
+updated
+</ins>
+<em>
+element
+</em>
+<del class="diff-old">has
+</del>
+<ins class="diff-chg">is
+</ins>
+a
+<del class="diff-old">@context
+property,
+update
+the
+active
+context
+according
+to
+the
+steps
+outlined
+in
+Context
+Processing
+</del>
+<a class="tref internalDFN" title="scalar" href="#dfn-scalar">
+<ins class="diff-chg">scalar
+</ins></a>,<ins class="diff-chg">
+return
+it
+as
+it
+cannot
+be
+further
+compacted.
+</ins></li><li><ins class="diff-chg">
+Initialize
+a
+new
+empty
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins>
+</a>
+<del class="diff-old">and
+remove
+the
+@context
+property.
+</del>
+<ins class="diff-chg">result.
+</ins>
+</li>
+<li>
+<del class="diff-old">Then,
+proceed
+and
+process
+</del>
+<ins class="diff-chg">Process
+</ins>
+each
+<em>
+property
+</em>
+and
+<em>
+value
+</em>
+in
+<em>
+element
+</em>
+<ins class="diff-new">ordered
+by
+</ins><em><ins class="diff-new">
+property
+</ins></em>
+as
+follows:
+<ol class="algorithm">
+<li>
+<del class="diff-old">Remove
+</del>
+<ins class="diff-chg">If
+</ins>
+<em>
+property
+</em>
+<del class="diff-old">from
+element
+,
+expand
+</del>
+<ins class="diff-chg">is
+a
+JSON-LD
+</ins><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-chg">
+keyword
+</ins></a><ol class="algorithm"><li><ins class="diff-chg">
+and
+</ins>
+<em>
+property
+</em>
+<ins class="diff-new">equals
+</ins><code><ins class="diff-new">
+@id
+</ins></code>,<ins class="diff-new">
+compact
+</ins><em><ins class="diff-new">
+value
+</ins></em>
+according
+<del class="diff-old">to
+</del>
+the
+<del class="diff-old">steps
+outlined
+in
+</del>
+<ins class="diff-chg">rules
+of
+the
+</ins><a href="#iri-compaction-algorithm">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">Expansion
+</del>
+<ins class="diff-chg">Compaction
+algorithm
+</ins>
+</a>.
+<del class="diff-old">Set
+the
+active
+property
+to
+the
+original
+un-expanded
+</del>
+</li>
+<li>
+<ins class="diff-chg">Otherwise,
+if
+</ins>
+<em>
+property
+</em>
+<del class="diff-old">if
+</del>
+<ins class="diff-chg">equals
+</ins><code><ins class="diff-chg">
+@type
+</ins></code>,<ins class="diff-chg">
+compact
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+<del class="diff-old">is
+not
+a
+keyword
+.
+If
+</del>
+<ins class="diff-chg">(or
+each
+item
+of
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+<del class="diff-old">does
+not
+expand
+to
+a
+keyword
+or
+</del>
+<ins class="diff-chg">if
+it
+is
+</ins>
+an
+<del class="diff-old">absolute
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a><ins class="diff-chg">
+)
+according
+the
+rules
+of
+the
+</ins><a href="#iri-compaction-algorithm">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<ins class="diff-chg">Compaction
+algorithm
+</ins>
+</a>
+<del class="diff-old">(i.e.,
+it
+doesn't
+contain
+a
+colon),
+continue
+</del>
+with
+the
+<del class="diff-old">next
+property
+from
+</del>
+<em>
+<del class="diff-old">element
+.
+</del>
+<ins class="diff-chg">vocabRelative
+</ins></em><ins class="diff-chg">
+flag
+set
+to
+</ins><code><ins class="diff-chg">
+true
+</ins></code>.
+If
+<em>
+value
+</em>
+is
+<del class="diff-old">null
+</del>
+<ins class="diff-chg">an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins>
+</a>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">consisting
+of
+just
+one
+item,
+replace
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+<del class="diff-old">is
+not
+@value
+,
+continue
+</del>
+with
+<del class="diff-old">the
+next
+property
+from
+element
+.
+</del>
+<ins class="diff-chg">that
+item.
+</ins>
+</li>
+<li>
+<del class="diff-old">If
+the
+</del>
+<ins class="diff-chg">Otherwise,
+if
+</ins>
+<em>
+property
+</em>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">equals
+</ins>
+<code>
+<del class="diff-old">@id
+the
+</del>
+<ins class="diff-chg">@graph
+</ins></code>,<ins class="diff-chg">
+compact
+</ins>
+<em>
+value
+</em>
+<del class="diff-old">must
+be
+</del>
+<ins class="diff-chg">by
+recursively
+invoking
+this
+algorithm,
+passing
+</ins>
+a
+<del class="diff-old">string
+.
+Expand
+</del>
+<ins class="diff-chg">copy
+of
+</ins>
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-new">active
+context
+</ins></a>,<a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context"><ins class="diff-new">
+inverse
+context
+</ins></a>,<ins class="diff-new">
+and
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">property
+</ins>
+</em>
+<del class="diff-old">according
+</del>
+<ins class="diff-chg">as
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+ensuring
+that
+the
+result
+is
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a>.</li><li><ins class="diff-chg">
+Set
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a>
+to
+<ins class="diff-chg">the
+result
+of
+performing
+</ins><a href="#iri-compaction-algorithm">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">Expansion
+.
+</del>
+<ins class="diff-chg">Compaction
+</ins></a><ins class="diff-chg">
+on
+</ins><em><ins class="diff-chg">
+property
+</ins></em>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+if
+</del>
+<ins class="diff-chg">Set
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+member
+of
+</ins><em><ins class="diff-chg">
+result
+</ins></em><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+value
+</ins></em>.</li><li><ins class="diff-chg">
+Continue
+with
+</ins>
+the
+<ins class="diff-new">next
+</ins>
+<em>
+property
+</em>
+<del class="diff-old">is
+@type
+:
+</del>
+<ins class="diff-chg">-
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+pair
+from
+</ins><em><ins class="diff-chg">
+element
+</ins></em>.</li></ol></li>
+<li>
+If
+<em>
+value
+</em>
+is
+<del class="diff-old">a
+string
+</del>
+<ins class="diff-chg">an
+empty
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins>
+</a>,
+<del class="diff-old">expand
+according
+</del>
+<ol class="algorithm">
+<li>
+<ins class="diff-chg">set
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a>
+to
+<ins class="diff-chg">the
+result
+of
+performing
+</ins><a href="#iri-compaction-algorithm">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">Expansion
+.
+Otherwise,
+if
+</del>
+<ins class="diff-chg">Compaction
+</ins></a><ins class="diff-chg">
+on
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">property
+</ins></em><ins class="diff-chg">
+with
+the
+</ins><em><ins class="diff-chg">
+vocabRelative
+</ins>
+</em>
+<ins class="diff-new">flag
+set
+to
+</ins><code><ins class="diff-new">
+true
+</ins></code>.</li><li><ins class="diff-new">
+If
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a>
+is
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+<del class="diff-old">Object
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>,
+<ins class="diff-new">i.e.,
+</ins>
+it
+<del class="diff-old">must
+be
+empty
+(used
+for
+Framing
+</del>
+<ins class="diff-chg">is
+a
+</ins><a class="tref internalDFN" title="property_generator" href="#dfn-property_generator"><ins class="diff-chg">
+property
+generator
+</ins></a>,<ins class="diff-chg">
+set
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins>
+</a>
+<del class="diff-old">).
+</del>
+<ins class="diff-chg">to
+the
+result
+of
+performing
+the
+</ins><a href="#find-and-remove-property-generator-duplicates"><ins class="diff-chg">
+Find
+and
+Remove
+Property
+Generator
+Duplicates
+</ins></a><ins class="diff-chg">
+algorithm
+passing
+</ins><em><ins class="diff-chg">
+element
+</ins></em>,<em><ins class="diff-chg">
+property
+</ins></em>,<a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a><ins class="diff-chg">
+for
+value,
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>,<ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+if
+</del>
+<ins class="diff-chg">Ensure
+that
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">result
+</ins>
+</em>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">has
+an
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+member;
+if
+not
+create
+it
+and
+set
+its
+value
+to
+</ins>
+an
+<ins class="diff-new">empty
+</ins>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+<del class="diff-old">,
+all
+elements
+must
+be
+string
+s.
+Expand
+</del>
+</a>.
+</li>
+<li>
+<ins class="diff-chg">Continue
+with
+the
+next
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+-
+</ins>
+<em>
+value
+</em>
+<ins class="diff-new">pair
+from
+</ins><em><ins class="diff-new">
+element
+</ins></em>.</li></ol></li><li><ins class="diff-new">
+Otherwise
+perform
+the
+following
+steps
+</ins>
+for
+each
+<em>
+<ins class="diff-new">item
+</ins></em>
+of
+<del class="diff-old">its
+entries
+according
+</del>
+<em>
+<ins class="diff-chg">value
+</ins></em>:<ol class="algorithm"><li><ins class="diff-chg">
+Set
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a>
+to
+<ins class="diff-chg">the
+result
+of
+performing
+</ins><a href="#iri-compaction-algorithm">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">Expansion
+.
+</del>
+<ins class="diff-chg">Compaction
+</ins></a><ins class="diff-chg">
+on
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+with
+the
+</ins><em><ins class="diff-chg">
+vocabRelative
+</ins></em><ins class="diff-chg">
+flag
+set
+to
+</ins><code><ins class="diff-chg">
+true
+</ins></code>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+if
+</del>
+<ins class="diff-chg">If
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+is
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>,<ins class="diff-chg">
+i.e.,
+it
+is
+a
+</ins><a class="tref internalDFN" title="property_generator" href="#dfn-property_generator"><ins class="diff-chg">
+property
+generator
+</ins></a>,<ins class="diff-chg">
+set
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+to
+the
+result
+of
+performing
+</ins>
+the
+<a href="#find-and-remove-property-generator-duplicates">
+<ins class="diff-new">Find
+and
+Remove
+Property
+Generator
+Duplicates
+</ins></a><ins class="diff-new">
+algorithm
+passing
+</ins><em><ins class="diff-new">
+element
+</ins></em>,
+<em>
+property
+</em>,
+<em>
+<ins class="diff-chg">item
+</ins></em>,<ins class="diff-chg">
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>,<ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a>.</li><li><ins class="diff-chg">
+If
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property's
+</ins></a><a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping"><ins class="diff-chg">
+container
+mapping
+</ins></a>
+is
+<ins class="diff-new">set
+to
+</ins>
+<code>
+<del class="diff-old">@value
+</del>
+<ins class="diff-chg">@language
+</ins>
+</code>
+or
+<code>
+<del class="diff-old">@language
+</del>
+<ins class="diff-chg">@annotation
+</ins>
+</code>
+<del class="diff-old">the
+</del>
+<ol class="algorithm">
+<li>
+<ins class="diff-chg">Unless
+</ins>
+<em>
+<del class="diff-old">value
+must
+not
+</del>
+<ins class="diff-chg">result
+</ins>
+</em>
+<del class="diff-old">be
+a
+</del>
+<ins class="diff-chg">has
+already
+an
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+member,
+create
+one
+and
+initialize
+its
+value
+to
+an
+empty
+</ins>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+<del class="diff-old">or
+an
+array
+</del>
+</a>.
+<ins class="diff-new">This
+object
+is
+called
+</ins><em><ins class="diff-new">
+mapObject
+</ins></em>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+if
+the
+</del>
+<ins class="diff-chg">Set
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">index
+</ins>
+</em>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">to
+the
+value
+of
+the
+</ins>
+<code>
+<del class="diff-old">@list
+</del>
+<ins class="diff-chg">@language
+</ins>
+</code>
+or
+<code>
+<del class="diff-old">@set
+</del>
+<ins class="diff-chg">@annotation
+</ins>
+</code>
+<del class="diff-old">expand
+</del>
+<ins class="diff-chg">member
+of
+</ins>
+<em>
+<ins class="diff-new">item
+</ins></em><ins class="diff-new">
+(depending
+on
+the
+</ins>
+value
+<ins class="diff-new">of
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property's
+</ins></a><a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping"><ins class="diff-new">
+container
+mapping
+</ins></a><ins class="diff-new">
+).
+</ins></li><li><ins class="diff-new">
+First
+compact
+</ins><em><ins class="diff-new">
+item
+</ins>
+</em>
+<del class="diff-old">recursively
+</del>
+using
+<ins class="diff-new">the
+</ins><a href="#value-compaction"><ins class="diff-new">
+Value
+Compaction
+algorithm
+</ins></a><ins class="diff-new">
+passing
+</ins><em><ins class="diff-new">
+index
+</ins></em><ins class="diff-new">
+as
+</ins><em><ins class="diff-new">
+containerValue
+</ins></em>,<ins class="diff-new">
+then
+compact
+it
+by
+recursively
+invoking
+</ins>
+this
+<del class="diff-old">algorithm,
+</del>
+<ins class="diff-chg">algorithm
+</ins>
+passing
+<del class="diff-old">copies
+</del>
+<ins class="diff-chg">a
+copy
+</ins>
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">
+<ins class="diff-chg">inverse
+context
+</ins></a>,
+and
+<ins class="diff-chg">the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+<del class="diff-old">.
+</del>
+</a>.
+</li>
+<li>
+If
+<ins class="diff-new">no
+</ins><em><ins class="diff-new">
+index
+</ins></em><ins class="diff-new">
+member
+exists
+in
+</ins>
+the
+<del class="diff-old">expanded
+</del>
+<em>
+<ins class="diff-new">mapObject
+</ins></em><ins class="diff-new">
+create
+one
+and
+set
+its
+</ins>
+value
+<ins class="diff-new">to
+</ins><em><ins class="diff-new">
+item
+</ins>
+</em>
+<del class="diff-old">is
+not
+an
+array
+,
+convert
+</del>
+<ins class="diff-chg">;
+otherwise
+append
+</ins><em><ins class="diff-chg">
+item
+</ins></em><ins class="diff-chg">
+to
+the
+</ins><em><ins class="diff-chg">
+index
+</ins></em><ins class="diff-chg">
+member
+(converting
+</ins>
+it
+to
+an
+array
+<del class="diff-old">.
+If
+</del>
+<ins class="diff-chg">if
+it
+is
+not
+one
+already).
+</ins></li><li><ins class="diff-chg">
+Continue
+with
+the
+next
+</ins>
+<em>
+property
+</em>
+<del class="diff-old">is
+@list
+and
+any
+entry
+in
+</del>
+<ins class="diff-chg">-
+</ins>
+<em>
+value
+</em>
+<ins class="diff-new">pair
+from
+</ins><em><ins class="diff-new">
+element
+</ins></em>.</li></ol></li><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+item
+</ins></em>
+is
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+<del class="diff-old">containing
+an
+</del>
+<ins class="diff-chg">having
+a
+</ins>
+<code>
+@list
+</code>
+<del class="diff-old">property,
+return
+an
+error,
+as
+lists
+</del>
+<ins class="diff-chg">member,
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+compact
+the
+value
+</ins>
+of
+<del class="diff-old">lists
+are
+not
+supported.
+</del>
+<ins class="diff-chg">that
+member
+by
+recursively
+invoking
+this
+algorithm
+passing
+a
+copy
+of
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>,<a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context"><ins class="diff-chg">
+inverse
+context
+</ins></a>,<ins class="diff-chg">
+and
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+ensuring
+that
+the
+result
+is
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+expand
+</del>
+<ins class="diff-chg">If
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property's
+</ins></a><a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping"><ins class="diff-chg">
+container
+mapping
+</ins></a><ins class="diff-chg">
+is
+set
+to
+</ins><code><ins class="diff-chg">
+@list
+</ins></code>,<ins class="diff-chg">
+set
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+member
+of
+</ins><em><ins class="diff-chg">
+result
+</ins></em><ins class="diff-chg">
+to
+the
+value
+of
+</ins><em><ins class="diff-chg">
+item's
+</ins></em><code><ins class="diff-chg">
+@list
+</ins></code><ins class="diff-chg">
+member.
+If
+such
+an
+member
+already
+exists
+in
+result,
+raise
+an
+</ins><code class="error"><ins class="diff-chg">
+COMPACTION_TO_LIST_OF_LISTS
+</ins></code><ins class="diff-chg">
+error;
+otherwise
+continue
+with
+the
+next
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+-
+</ins>
+<em>
+value
+</em>
+<ins class="diff-new">pair
+from
+</ins><em><ins class="diff-new">
+element
+</ins></em>.</li></ol></li><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+item
+</ins></em><ins class="diff-new">
+is
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a>,<ins class="diff-new">
+compact
+it
+by
+</ins>
+recursively
+<del class="diff-old">using
+</del>
+<ins class="diff-chg">invoking
+</ins>
+this
+<del class="diff-old">algorithm,
+</del>
+<ins class="diff-chg">algorithm
+</ins>
+passing
+<del class="diff-old">copies
+</del>
+<ins class="diff-chg">a
+copy
+</ins>
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">
+<ins class="diff-chg">inverse
+context
+</ins></a>,
+and
+<ins class="diff-new">the
+</ins>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>.
+</li>
+<li>
+If
+<ins class="diff-chg">no
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+</ins>
+property
+</a>
+<ins class="diff-new">member
+exists
+in
+</ins><em><ins class="diff-new">
+result
+</ins>
+</em>
+<del class="diff-old">is
+not
+a
+keyword
+</del>
+<ins class="diff-chg">create
+one
+</ins>
+and
+<ins class="diff-new">set
+its
+value
+to
+</ins><em><ins class="diff-new">
+item
+</ins></em><ins class="diff-new">
+;
+otherwise
+append
+</ins><em><ins class="diff-new">
+item
+</ins></em><ins class="diff-new">
+to
+the
+</ins>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+<del class="diff-old">has
+a
+</del>
+<ins class="diff-chg">member
+(converting
+it
+to
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a><ins class="diff-chg">
+if
+it
+is
+not
+one
+already).
+</ins></li><li><ins class="diff-chg">
+If
+the
+</ins><code class="idlMemberName"><a href="#widl-JsonLdOptions-compactArrays"><ins class="diff-chg">
+compactArrays
+</ins></a></code><ins class="diff-chg">
+option
+is
+set
+to
+</ins>
+<code>
+<del class="diff-old">@container
+</del>
+<ins class="diff-chg">false
+</ins>
+</code>
+<ins class="diff-new">or
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property's
+</ins></a><a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping"><ins class="diff-new">
+container
+mapping
+</ins></a><ins class="diff-new">
+is
+set
+to
+</ins>
+<code>
+@list
+</code>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">or
+</ins><code><ins class="diff-chg">
+@set
+</ins></code>,<ins class="diff-chg">
+convert
+</ins>
+the
+<del class="diff-old">expanded
+</del>
+value
+<ins class="diff-new">of
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+member
+of
+</ins><em><ins class="diff-new">
+result
+</ins>
+</em>
+<ins class="diff-new">to
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-new">
+array
+</ins></a><ins class="diff-new">
+if
+it
+</ins>
+is
+not
+<del class="diff-old">null
+,
+convert
+</del>
+<ins class="diff-chg">one
+already.
+</ins></li></ol></li></ol><p><ins class="diff-chg">
+If,
+after
+the
+algorithm
+outlined
+above
+is
+run,
+the
+resulting
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">to
+</del>
+<ins class="diff-chg">is
+</ins>
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a><ins class="diff-chg">
+replace
+it
+with
+a
+new
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+</ins>
+object
+</a>
+with
+<del class="diff-old">an
+</del>
+<ins class="diff-chg">a
+single
+member
+whose
+name
+is
+the
+result
+of
+compacting
+the
+value
+</ins>
+<code>
+<del class="diff-old">@list
+</del>
+<ins class="diff-chg">@graph
+</ins>
+</code>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">with
+the
+</ins><a href="#iri-compaction-algorithm"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+Compaction
+algorithm
+</ins></a><ins class="diff-chg">
+and
+</ins>
+whose
+value
+is
+<del class="diff-old">set
+</del>
+<em>
+<ins class="diff-chg">element
+</ins></em>.<ins class="diff-chg">
+Finally,
+add
+a
+</ins><code><ins class="diff-chg">
+@context
+</ins></code><ins class="diff-chg">
+property
+</ins>
+to
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">(unless
+</del>
+<ins class="diff-chg">and
+set
+it
+to
+the
+initially
+passed
+</ins><em><ins class="diff-chg">
+context
+</ins></em>.</p></li></ol></section><section id="iri-compaction-algorithm"><h3><span class="secno"><ins class="diff-chg">
+5.9
+</ins></span><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+Compaction
+Algorithm
+</ins></h3><p><ins class="diff-chg">
+This
+section
+defines
+an
+algorithm
+for
+transforming
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a><ins class="diff-chg">
+to
+a
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+or
+</ins><a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri"><ins class="diff-chg">
+compact
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a>.<ins class="diff-chg">
+If
+a
+</ins>
+<em>
+value
+</em>
+is
+<del class="diff-old">already
+in
+that
+form).
+Convert
+</del>
+<ins class="diff-chg">passed
+it
+is
+used
+to
+choose
+the
+best
+matching
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a>.</p><p><ins class="diff-chg">
+This
+algorithm
+takes
+three
+mandatory
+and
+two
+optional
+parameters.
+The
+mandatory
+parameters
+are
+the
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">iri
+</ins>
+</em>
+to
+<del class="diff-old">array
+form
+unless
+</del>
+<ins class="diff-chg">be
+compacted,
+an
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>,<ins class="diff-chg">
+and
+an
+</ins><a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context"><ins class="diff-chg">
+inverse
+context
+</ins></a>.<ins class="diff-chg">
+Optionally
+it
+is
+possible
+to
+pass
+a
+</ins>
+<em>
+value
+</em>
+<del class="diff-old">is
+null
+</del>
+<ins class="diff-chg">and
+a
+</ins><em><ins class="diff-chg">
+vocabRelative
+</ins></em><ins class="diff-chg">
+flag
+which
+specifies
+whether
+the
+passed
+</ins><em><ins class="diff-chg">
+iri
+</ins></em><ins class="diff-chg">
+should
+be
+compacted
+using
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context's
+</ins>
+</a>
+<del class="diff-old">or
+</del>
+<a class="tref internalDFN" title="vocabulary_mapping" href="#dfn-vocabulary_mapping">
+<ins class="diff-chg">vocabulary
+mapping
+</ins></a>.<ins class="diff-chg">
+If
+the
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">vocabRelative
+</ins>
+</em>
+<ins class="diff-new">flag
+</ins>
+is
+<ins class="diff-new">not
+set
+it
+defaults
+to
+</ins>
+<code>
+<del class="diff-old">@id
+,
+@type
+,
+@value
+,
+or
+@language
+</del>
+<ins class="diff-chg">false
+</ins>
+</code>.
+</p>
+<p>
+<ins class="diff-chg">The
+algorithm
+for
+generating
+a
+</ins><a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri"><ins class="diff-chg">
+compact
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a><ins class="diff-chg">
+is:
+</ins></p><ol class="algorithm">
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">Initialize
+a
+variable
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">result
+</ins>
+</em>
+<del class="diff-old">is
+not
+</del>
+<ins class="diff-chg">to
+</ins>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>.
+</li>
+<li>
+<ins class="diff-new">If
+an
+entry
+for
+</ins><em><ins class="diff-new">
+iri
+</ins></em><ins class="diff-new">
+exists
+in
+the
+</ins><a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context"><ins class="diff-new">
+inverse
+context
+</ins>
+</a>,
+<del class="diff-old">either
+merge
+</del>
+<ins class="diff-chg">perform
+the
+following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+a
+</ins>
+<em>
+value
+</em>
+<del class="diff-old">into
+</del>
+<ins class="diff-chg">has
+been
+passed,
+perform
+the
+following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+Initialize
+</ins><em><ins class="diff-chg">
+queryPath
+</ins></em>,<ins class="diff-chg">
+which
+will
+be
+used
+to
+query
+the
+</ins><a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context"><ins class="diff-chg">
+inverse
+context
+</ins></a>,<ins class="diff-chg">
+to
+</ins>
+an
+<del class="diff-old">existing
+</del>
+<ins class="diff-chg">empty
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a></li><li id="calculate-value-profile-algorithm"><ins class="diff-chg">
+Initialize
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">container
+</ins>
+</em>
+<del class="diff-old">property
+of
+</del>
+<ins class="diff-chg">to
+</ins><code><ins class="diff-chg">
+@set
+</ins></code>,
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">typeOrLanguage
+</ins></em>,<ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+typeLanguageValue
+</ins>
+</em>
+<del class="diff-old">or
+create
+</del>
+<ins class="diff-chg">to
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>.</li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+is
+</ins>
+a
+<del class="diff-old">new
+</del>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a><ol class="algorithm"><li><ins class="diff-chg">
+and
+it
+has
+an
+</ins><code><ins class="diff-chg">
+@annotation
+</ins></code><ins class="diff-chg">
+member,
+set
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">container
+</ins>
+</em>
+<del class="diff-old">property
+with
+</del>
+<ins class="diff-chg">to
+</ins><code><ins class="diff-chg">
+@annotation
+</ins></code>.</li><li><ins class="diff-chg">
+If
+</ins>
+<em>
+value
+</em>
+<del class="diff-old">as
+value.
+</del>
+<ins class="diff-chg">has
+an
+</ins><code><ins class="diff-chg">
+@id
+</ins></code><ins class="diff-chg">
+member,
+set
+</ins><em><ins class="diff-chg">
+typeOrLanguage
+</ins></em><ins class="diff-chg">
+to
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+typeLanguageValue
+</ins></em><ins class="diff-chg">
+to
+</ins><code><ins class="diff-chg">
+@id
+</ins></code>.
+</li>
+<li>
+<del class="diff-old">If
+the
+processed
+</del>
+<ins class="diff-chg">Otherwise,
+if
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+has
+an
+<code>
+@value
+</code>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">member,
+</ins>
+<ol class="algorithm">
+<li>
+<ins class="diff-chg">and
+an
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+member,
+set
+</ins>
+<em>
+<del class="diff-old">element
+must
+not
+</del>
+<ins class="diff-chg">typeOrLanguage
+</ins>
+</em>
+<del class="diff-old">have
+more
+than
+one
+other
+property,
+which
+can
+either
+be
+</del>
+<ins class="diff-chg">to
+</ins>
+<code>
+<del class="diff-old">@language
+</del>
+<ins class="diff-chg">@type
+</ins>
+</code>
+<del class="diff-old">or
+</del>
+<ins class="diff-chg">and
+</ins><em><ins class="diff-chg">
+typeLanguageValue
+</ins></em><ins class="diff-chg">
+to
+the
+value
+of
+the
+</ins>
+<code>
+@type
+</code>
+<del class="diff-old">with
+a
+string
+value.
+</del>
+<ins class="diff-chg">member
+of
+</ins><em><ins class="diff-chg">
+value
+</ins></em>.
+</li>
+<li>
+<ins class="diff-new">Otherwise,
+</ins>
+if
+<ins class="diff-new">it
+has
+an
+</ins><code><ins class="diff-new">
+@language
+</ins></code><ins class="diff-new">
+member,
+set
+</ins><em><ins class="diff-new">
+typeOrLanguage
+</ins></em><ins class="diff-new">
+to
+</ins><code><ins class="diff-new">
+@language
+</ins></code><ins class="diff-new">
+and
+</ins><em><ins class="diff-new">
+typeLanguageValue
+</ins></em><ins class="diff-new">
+to
+</ins>
+the
+value
+of
+<ins class="diff-new">the
+</ins>
+<code>
+<del class="diff-old">@value
+</del>
+<ins class="diff-chg">@language
+</ins>
+</code>
+<del class="diff-old">equals
+null
+,
+replace
+</del>
+<ins class="diff-chg">member
+of
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">value
+</ins></em>.<ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+value
+</ins>
+</em>
+<del class="diff-old">with
+</del>
+<ins class="diff-chg">has
+no
+</ins><code><ins class="diff-chg">
+@annotation
+</ins></code><ins class="diff-chg">
+member,
+set
+</ins><em><ins class="diff-chg">
+container
+</ins></em><ins class="diff-chg">
+to
+</ins><code><ins class="diff-chg">
+@language
+</ins></code></li><li><ins class="diff-chg">
+Otherwise,
+if
+</ins>
+the
+value
+of
+<em>
+<ins class="diff-new">value's
+</ins></em>
+<code>
+@value
+</code>
+<ins class="diff-new">member
+is
+is
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-new">
+string
+</ins></a>,<ins class="diff-new">
+set
+</ins><em><ins class="diff-new">
+typeOrLanguage
+</ins></em><ins class="diff-new">
+to
+</ins><code><ins class="diff-new">
+@language
+</ins></code><ins class="diff-new">
+and
+</ins><em><ins class="diff-new">
+typeLanguageValue
+</ins></em><ins class="diff-new">
+to
+</ins><code><ins class="diff-new">
+@null
+</ins>
+</code>.
+</li>
+</ol>
+</li>
+<li>
+Otherwise,
+if
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+has
+an
+<code>
+<del class="diff-old">@type
+</del>
+<ins class="diff-chg">@list
+</ins>
+</code>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">member,
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+</ins><code><ins class="diff-chg">
+@list
+</ins></code><ins class="diff-chg">
+member
+has
+at
+least
+one
+item,
+update
+</ins><em><ins class="diff-chg">
+container
+</ins></em>,<em><ins class="diff-chg">
+typeOrLanguage
+</ins></em>,
+and
+<del class="diff-old">its
+value
+is
+</del>
+<em>
+<ins class="diff-chg">typeLanguageValue
+</ins></em><ins class="diff-chg">
+by
+recursively
+running
+the
+steps
+</ins><a href="#calculate-value-profile-algorithm"><ins class="diff-chg">
+2.1.2
+</ins></a><ins class="diff-chg">
+to
+2.1.3.4
+(which
+will
+never
+be
+true
+since
+list
+of
+lists
+are
+</ins>
+not
+<del class="diff-old">in
+</del>
+<ins class="diff-chg">allowed)
+of
+this
+algorithm
+passing
+</ins>
+the
+<del class="diff-old">form
+</del>
+<ins class="diff-chg">first
+item
+</ins>
+of
+<del class="diff-old">an
+array
+,
+convert
+it
+to
+an
+array
+.
+</del>
+<em>
+<ins class="diff-chg">value's
+</ins></em><code><ins class="diff-chg">
+@list
+</ins></code><ins class="diff-chg">
+member
+as
+new
+</ins><em><ins class="diff-chg">
+value
+</ins></em>.
+</li>
+<li>
+If
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+has
+<del class="diff-old">an
+</del>
+<ins class="diff-chg">no
+</ins>
+<code>
+<del class="diff-old">@set
+</del>
+<ins class="diff-chg">@annotation
+</ins>
+</code>
+<del class="diff-old">or
+</del>
+<ins class="diff-chg">member,
+set
+</ins><em><ins class="diff-chg">
+container
+</ins></em><ins class="diff-chg">
+to
+</ins>
+<code>
+@list
+<del class="diff-old">property,
+it
+must
+</del>
+</code>.
+</li>
+<li>
+<ins class="diff-chg">Starting
+from
+the
+second
+item
+of
+</ins><em><ins class="diff-chg">
+value's
+</ins>
+</em>
+<code>
+<ins class="diff-new">@list
+</ins></code><ins class="diff-new">
+member,
+recursively
+run
+the
+steps
+</ins><a href="#calculate-value-profile-algorithm"><ins class="diff-new">
+2.1.2
+</ins></a><ins class="diff-new">
+to
+2.1.3.4
+(which
+will
+never
+</ins>
+be
+<ins class="diff-new">true
+since
+list
+of
+lists
+are
+not
+allowed)
+of
+this
+algorithm
+passing
+</ins>
+the
+<del class="diff-old">only
+property.
+Set
+</del>
+<ins class="diff-chg">item
+as
+new
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">value
+</ins></em>.<ins class="diff-chg">
+If
+the
+resulting
+</ins><em><ins class="diff-chg">
+typeOrLanguage
+</ins>
+</em>
+<del class="diff-old">to
+</del>
+<ins class="diff-chg">or
+</ins><em><ins class="diff-chg">
+typeLanguageValue
+</ins></em><ins class="diff-chg">
+differ
+from
+</ins>
+the
+<ins class="diff-new">current
+</ins>
+value
+of
+<del class="diff-old">@set
+;
+leave
+</del>
+<em>
+<ins class="diff-chg">typeOrLanguage
+</ins></em><ins class="diff-chg">
+or
+</ins><em><ins class="diff-chg">
+typeLanguageValue
+</ins></em>,<ins class="diff-chg">
+set
+both
+to
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a><ins class="diff-chg">
+and
+stop
+processing
+the
+</ins>
+<code>
+@list
+</code>
+<del class="diff-old">untouched.
+</del>
+<ins class="diff-chg">items.
+</ins></li></ol></li></ol>
+</li>
+<li>
+If
+<ins class="diff-new">the
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">container
+</ins>
+</em>
+<del class="diff-old">has
+just
+a
+</del>
+<ins class="diff-chg">equals
+</ins>
+<code>
+<del class="diff-old">@language
+property,
+</del>
+<ins class="diff-chg">@list
+</ins></code>,
+set
+<ins class="diff-new">the
+first
+item
+of
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">queryPath
+</ins>
+</em>
+to
+<ins class="diff-chg">an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a><ins class="diff-chg">
+consisting
+of
+the
+two
+elements
+</ins><code><ins class="diff-chg">
+@list
+</ins></code><ins class="diff-chg">
+and
+</ins><code>
+null
+<del class="diff-old">.
+</del>
+</code>
+<ins class="diff-chg">;
+otherwise
+set
+it
+to
+an
+array
+consisting
+of
+three
+elements
+where
+the
+first
+element
+is
+the
+value
+of
+</ins><em><ins class="diff-chg">
+container
+</ins></em><ins class="diff-chg">
+and
+the
+other
+two
+elements
+are
+</ins><code><ins class="diff-chg">
+@set
+</ins></code><ins class="diff-chg">
+and
+</ins><code><ins class="diff-chg">
+@null
+</ins></code>.
+</li>
+<li>
+<ins class="diff-chg">If
+</ins><em><ins class="diff-chg">
+typeOrLanguage
+</ins></em><ins class="diff-chg">
+is
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+set
+the
+second
+and
+the
+the
+third
+item
+of
+</ins><em><ins class="diff-chg">
+queryPath
+</ins></em><ins class="diff-chg">
+to
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a><ins class="diff-chg">
+consisting
+of
+a
+single
+element
+</ins><code><ins class="diff-chg">
+@null
+</ins></code>.
+</li>
+<li>
+Otherwise,
+<del class="diff-old">expand
+</del>
+<ins class="diff-chg">set
+the
+second
+item
+of
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">queryPath
+</ins>
+</em>
+<del class="diff-old">according
+</del>
+to
+<del class="diff-old">the
+Value
+Expansion
+</del>
+<ins class="diff-chg">an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins>
+</a>
+<del class="diff-old">rules,
+passing
+copies
+</del>
+<ins class="diff-chg">consisting
+of
+two
+elements
+where
+the
+first
+element
+is
+the
+value
+</ins>
+of
+<em>
+<ins class="diff-new">typeOrLanguage
+</ins></em><ins class="diff-new">
+and
+</ins>
+the
+<del class="diff-old">active
+context
+</del>
+<ins class="diff-chg">second
+element
+is
+</ins><code><ins class="diff-chg">
+@null
+</ins></code>.<ins class="diff-chg">
+Set
+the
+third
+item
+of
+</ins><em><ins class="diff-chg">
+queryPath
+</ins></em><ins class="diff-chg">
+to
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins>
+</a>
+<ins class="diff-new">whose
+first
+element
+</ins><em><ins class="diff-new">
+typeLanguageValue
+</ins></em>
+and
+<del class="diff-old">active
+property
+.
+</del>
+<ins class="diff-chg">whose
+second
+element
+is
+</ins><code><ins class="diff-chg">
+@null
+</ins></code>.
+</li>
+<del class="diff-old">If,
+after
+</del>
+<li>
+<a href="#inverse-context-query-algorithm">
+<ins class="diff-chg">Query
+</ins>
+the
+<del class="diff-old">algorithm
+outlined
+above
+is
+run,
+</del>
+<ins class="diff-chg">inverse
+context
+</ins></a><ins class="diff-chg">
+and
+store
+</ins>
+the
+<del class="diff-old">resulting
+</del>
+<ins class="diff-chg">result
+in
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">result
+</ins></em>.</li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+result
+</ins>
+</em>
+is
+<del class="diff-old">an
+</del>
+<ins class="diff-chg">a
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a><ins class="diff-chg">
+or
+a
+</ins>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+with
+<del class="diff-old">just
+</del>
+a
+<code>
+<del class="diff-old">@graph
+</del>
+<ins class="diff-chg">term
+</ins>
+</code>
+<del class="diff-old">property,
+</del>
+<ins class="diff-chg">member,
+return
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">result
+</ins></em>.</li></ol></li><li><ins class="diff-chg">
+Otherwise,
+if
+the
+entry
+for
+</ins><em><ins class="diff-chg">
+iri
+</ins>
+</em>
+<del class="diff-old">is
+set
+to
+</del>
+<ins class="diff-chg">in
+</ins>
+the
+<del class="diff-old">value
+of
+</del>
+<a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">
+<ins class="diff-chg">inverse
+context
+</ins></a><ins class="diff-chg">
+has
+a
+</ins>
+<code>
+<del class="diff-old">@graph
+</del>
+<ins class="diff-chg">term
+</ins>
+</code>
+<del class="diff-old">'s
+</del>
+<ins class="diff-chg">member,
+return
+its
+</ins>
+value.
+<del class="diff-old">Finally,
+if
+</del>
+</li>
+</ol>
+</li>
+<li>
+<ins class="diff-chg">For
+each
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">termIri
+</ins>
+</em>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">-
+</ins><em><ins class="diff-chg">
+termDefinition
+</ins></em><ins class="diff-chg">
+pair
+in
+</ins><a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context"><ins class="diff-chg">
+inverse
+context
+</ins></a><ins class="diff-chg">
+sorted
+in
+reverse
+order
+by
+</ins><em><ins class="diff-chg">
+termIri
+</ins></em><ins class="diff-chg">
+the
+(longest
+</ins><em><ins class="diff-chg">
+termIri
+</ins></em><ins class="diff-chg">
+comes
+first),
+perform
+the
+following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+termDefinition
+</ins></em><ins class="diff-chg">
+does
+not
+have
+</ins>
+a
+<del class="diff-old">JSON
+object
+,
+</del>
+<code>
+<ins class="diff-chg">term
+</ins></code><ins class="diff-chg">
+member,
+i.e.,
+</ins>
+it
+is
+<del class="diff-old">wrapped
+into
+an
+array
+</del>
+<ins class="diff-chg">a
+property
+generator,
+continue
+with
+the
+next
+</ins><em><ins class="diff-chg">
+termIri
+</ins></em><ins class="diff-chg">
+-
+</ins><em><ins class="diff-chg">
+termDefinition
+</ins></em><ins class="diff-chg">
+pair
+from
+</ins><a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context"><ins class="diff-chg">
+inverse
+context
+</ins>
+</a>.
+<del class="diff-old">4.8
+Compaction
+Compaction
+</del>
+</li>
+<li>
+<ins class="diff-chg">Otherwise,
+if
+</ins><em><ins class="diff-chg">
+iri
+</ins></em><ins class="diff-chg">
+begins
+with
+</ins><em><ins class="diff-chg">
+termIri
+</ins></em><ins class="diff-chg">
+and
+</ins>
+is
+<ins class="diff-new">longer
+than
+</ins><em><ins class="diff-new">
+termIri
+</ins></em>,<ins class="diff-new">
+generate
+a
+</ins><a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri"><ins class="diff-new">
+compact
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr></a><ins class="diff-new">
+by
+concatenating
+</ins>
+the
+<del class="diff-old">process
+</del>
+<ins class="diff-chg">value
+</ins>
+of
+<del class="diff-old">taking
+</del>
+<ins class="diff-chg">the
+</ins><code><ins class="diff-chg">
+term
+</ins></code><ins class="diff-chg">
+member
+of
+</ins><em><ins class="diff-chg">
+termDefinition
+</ins></em><ins class="diff-chg">
+with
+</ins>
+a
+<del class="diff-old">JSON-LD
+document
+</del>
+<ins class="diff-chg">colon
+(
+</ins><code>:</code><ins class="diff-chg">
+)
+character
+</ins>
+and
+<del class="diff-old">applying
+a
+context
+such
+that
+</del>
+the
+<del class="diff-old">most
+compact
+form
+</del>
+<ins class="diff-chg">unmatched
+part
+</ins>
+of
+<em>
+<ins class="diff-new">iri
+</ins></em>.</li><li><ins class="diff-new">
+If
+</ins>
+the
+<del class="diff-old">document
+is
+generated.
+JSON
+is
+typically
+expressed
+in
+a
+very
+compact,
+key-value
+format.
+That
+is,
+full
+IRIs
+are
+rarely
+used
+as
+keys.
+At
+times,
+a
+JSON-LD
+document
+may
+be
+received
+that
+is
+not
+in
+its
+most
+compact
+form.
+JSON-LD,
+via
+the
+API,
+provides
+a
+way
+to
+</del>
+<ins class="diff-chg">resulting
+</ins><a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<del class="diff-old">a
+JSON-LD
+document.
+For
+example,
+assume
+the
+following
+JSON-LD
+input
+document:
+{
+ "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
+ "http://xmlns.com/foaf/0.1/homepage": {
+ "@id": "http://manu.sporny.org/"
+ }
+}
+Additionally,
+assume
+the
+following
+developer-supplied
+JSON-LD
+context:
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ }
+}
+</del>
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr>
+<del class="diff-old">Running
+</del>
+</a>
+<ins class="diff-chg">has
+an
+entry
+in
+</ins>
+the
+<del class="diff-old">JSON-LD
+Compaction
+algorithm
+given
+</del>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-chg">active
+context
+</ins></a>,<ins class="diff-chg">
+continue
+with
+</ins>
+the
+<ins class="diff-new">next
+</ins><em><ins class="diff-new">
+termIri
+</ins></em><ins class="diff-new">
+-
+</ins><em><ins class="diff-new">
+termDefinition
+</ins></em><ins class="diff-new">
+pair
+from
+</ins><a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context"><ins class="diff-new">
+inverse
+</ins>
+context
+<del class="diff-old">supplied
+above
+against
+</del>
+</a>
+<ins class="diff-chg">as
+</ins>
+the
+<del class="diff-old">JSON-LD
+input
+document
+provided
+above
+would
+</del>
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+<ins class="diff-chg">compact
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a><ins class="diff-chg">
+cannot
+be
+used.
+</ins></li><li><ins class="diff-chg">
+Otherwise,
+if
+</ins>
+result
+<del class="diff-old">in
+</del>
+<ins class="diff-chg">is
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+return
+</ins>
+the
+<del class="diff-old">following
+output:
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ },
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/"
+}
+</del>
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+<ins class="diff-chg">compact
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>
+<del class="diff-old">The
+compaction
+algorithm
+also
+enables
+the
+developer
+to
+map
+any
+expanded
+format
+into
+an
+application-specific
+compacted
+format.
+While
+</del>
+</a>
+<ins class="diff-chg">;
+if
+it
+is
+not
+null,
+set
+</ins>
+the
+<del class="diff-old">context
+provided
+above
+mapped
+</del>
+<code>
+<del class="diff-old">http://xmlns.com/foaf/0.1/name
+</del>
+<ins class="diff-chg">term
+</ins>
+</code>
+<ins class="diff-new">member
+of
+</ins><em><ins class="diff-new">
+result
+</ins></em>
+to
+<del class="diff-old">name
+,
+it
+could
+have
+also
+mapped
+it
+to
+any
+arbitrary
+string
+provided
+by
+</del>
+the
+<del class="diff-old">developer.
+</del>
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+<ins class="diff-chg">compact
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>
+<del class="diff-old">4.8.1
+Compaction
+Algorithm
+The
+algorithm
+takes
+three
+input
+variables:
+an
+active
+context
+,
+an
+active
+property
+,
+</del>
+</a>
+and
+<del class="diff-old">an
+</del>
+<ins class="diff-chg">return
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">result
+</ins></em>.</li></ol></li><li><ins class="diff-chg">
+If
+the
+</ins><em><ins class="diff-chg">
+vocabRelative
+</ins>
+</em>
+<ins class="diff-new">flag
+is
+set
+</ins>
+to
+<del class="diff-old">be
+compacted.
+To
+begin,
+</del>
+<code>
+<ins class="diff-chg">true
+</ins></code>,
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+<del class="diff-old">is
+set
+to
+</del>
+<ins class="diff-chg">has
+a
+</ins><a class="tref internalDFN" title="vocabulary_mapping" href="#dfn-vocabulary_mapping"><ins class="diff-chg">
+vocabulary
+mapping
+</ins></a>,<ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+iri
+</ins></em><ins class="diff-chg">
+begins
+with
+</ins>
+the
+<del class="diff-old">result
+</del>
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr>
+of
+<del class="diff-old">performing
+Context
+Processing
+</del>
+<ins class="diff-chg">the
+</ins><a class="tref internalDFN" title="vocabulary_mapping" href="#dfn-vocabulary_mapping"><ins class="diff-chg">
+vocabulary
+mapping
+</ins>
+</a>
+<del class="diff-old">on
+</del>
+<ins class="diff-chg">but
+is
+longer
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+Set
+</ins><em><ins class="diff-chg">
+vocabIri
+</ins></em><ins class="diff-chg">
+to
+</ins>
+the
+<del class="diff-old">passed
+</del>
+<ins class="diff-chg">unmatched
+part
+of
+</ins>
+<em>
+<del class="diff-old">context
+,
+</del>
+<ins class="diff-chg">iri
+</ins></em>.</li><li><ins class="diff-chg">
+If
+there
+does
+not
+exist
+an
+entry
+for
+</ins><em><ins class="diff-chg">
+vocabIri
+</ins></em><ins class="diff-chg">
+in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">context
+</ins></a>,<ins class="diff-chg">
+return
+</ins><em><ins class="diff-chg">
+vocabIri
+</ins></em><ins class="diff-chg">
+if
+</ins><em><ins class="diff-chg">
+result
+</ins></em><ins class="diff-chg">
+is
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins>
+</a>
+<ins class="diff-new">;
+if
+it
+</ins>
+is
+<ins class="diff-new">not
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-new">
+null
+</ins></a>
+set
+<ins class="diff-new">the
+</ins><code><ins class="diff-new">
+term
+</ins></code><ins class="diff-new">
+member
+of
+</ins><em><ins class="diff-new">
+result
+</ins></em>
+to
+<em>
+<ins class="diff-new">vocabIri
+</ins></em><ins class="diff-new">
+and
+return
+</ins><em><ins class="diff-new">
+result
+</ins></em>.</li></ol></li><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+result
+</ins></em><ins class="diff-new">
+is
+</ins>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>,
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">return
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">iri
+</ins>
+</em>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">as
+is.
+</ins></li><li><ins class="diff-chg">
+Otherwise
+</ins>
+set
+<del class="diff-old">to
+</del>
+the
+<del class="diff-old">result
+</del>
+<code>
+<ins class="diff-chg">term
+</ins></code><ins class="diff-chg">
+member
+</ins>
+of
+<del class="diff-old">performing
+</del>
+<em>
+<ins class="diff-chg">result
+</ins></em><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+iri
+</ins></em><ins class="diff-chg">
+and
+return
+</ins><em><ins class="diff-chg">
+result
+</ins></em>.</li></ol></section><section id="inverse-context-creation"><h3><span class="secno"><ins class="diff-chg">
+5.10
+</ins></span><ins class="diff-chg">
+Inverse
+Context
+Creation
+</ins></h3><p><ins class="diff-chg">
+An
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+as
+produced
+by
+</ins>
+the
+<del class="diff-old">Expansion
+Algorithm
+</del>
+<a href="#context-processing">
+<ins class="diff-chg">Context
+Processing
+</ins>
+</a>
+<del class="diff-old">on
+</del>
+<ins class="diff-chg">algorithm
+is
+very
+efficient
+for
+</ins><a href="#iri-expansion"><ins class="diff-chg">
+expanding
+</ins></a><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+terms
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri"><ins class="diff-chg">
+compact
+IRIs
+</ins></a><ins class="diff-chg">
+to
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-chg">
+IRIs
+</ins></a><ins class="diff-chg">
+but
+is
+of
+limited
+use
+for
+</ins>
+the
+<del class="diff-old">JSON-LD
+input
+</del>
+<ins class="diff-chg">opposite
+operation:
+</ins><a href="#iri-compaction-algorithm"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+compaction
+</ins>
+</a>.
+<del class="diff-old">This
+removes
+any
+existing
+</del>
+<ins class="diff-chg">Hence,
+this
+algorithm
+introduces
+the
+notion
+of
+an
+</ins><a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context"><ins class="diff-chg">
+inverse
+</ins>
+context
+</a>
+<ins class="diff-new">which
+brings
+the
+same
+efficiency
+</ins>
+to
+<a href="#iri-compaction-algorithm">
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-new">IRI
+</ins></abbr><ins class="diff-new">
+compaction
+</ins></a>.<ins class="diff-new">
+An
+</ins><dfn title="inverse_context" id="dfn-inverse_context"><ins class="diff-new">
+inverse
+context
+</ins></dfn><ins class="diff-new">
+a
+tree
+of
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+objects
+</ins></a><ins class="diff-new">
+which
+</ins>
+allow
+<del class="diff-old">the
+given
+</del>
+<ins class="diff-chg">to
+efficiently
+select
+a
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+for
+a
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a><ins class="diff-chg">
+-value
+pair.
+</ins></p><p><ins class="diff-chg">
+The
+value
+takes
+an
+</ins>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+<del class="diff-old">to
+be
+cleanly
+applied.
+</del>
+<ins class="diff-chg">and
+returns
+the
+corresponding
+</ins><a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context"><ins class="diff-chg">
+inverse
+context
+</ins></a>.
+</p>
+<ol class="algorithm">
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">Set
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">defaultLanguage
+</ins>
+</em>
+<ins class="diff-new">to
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context's
+</ins></a><ins class="diff-new">
+default
+language
+if
+there
+</ins>
+is
+<del class="diff-old">an
+array
+,
+process
+</del>
+<ins class="diff-chg">one;
+otherwise
+set
+it
+to
+</ins><code><ins class="diff-chg">
+@null
+</ins></code>.</li><li><ins class="diff-chg">
+For
+</ins>
+each
+<del class="diff-old">entry
+</del>
+<a class="tref internalDFN" title="term_definition" href="#dfn-term_definition">
+<ins class="diff-chg">term
+definition
+</ins></a>
+in
+<del class="diff-old">element
+recursively
+using
+this
+algorithm,
+passing
+a
+copy
+of
+</del>
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">perform
+</ins>
+the
+<del class="diff-old">active
+property
+.
+</del>
+<ins class="diff-chg">following
+steps:
+</ins><ol class="algorithm"><li>
+If
+<del class="diff-old">element
+has
+a
+single
+item
+and
+</del>
+the
+<del class="diff-old">compactArrays
+</del>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<ins class="diff-chg">term's
+</ins>
+</a>
+<a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping">
+<del class="diff-old">option
+</del>
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr><ins class="diff-chg">
+mapping
+</ins></a>
+is
+set
+to
+<del class="diff-old">true
+,
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins></a><ins class="diff-chg">
+continue
+with
+</ins>
+the
+<del class="diff-old">compacted
+value
+is
+that
+item;
+otherwise
+</del>
+<ins class="diff-chg">next
+</ins><a class="tref internalDFN" title="term_definition" href="#dfn-term_definition"><ins class="diff-chg">
+term
+definition
+</ins></a>.</li><li><ins class="diff-chg">
+Set
+</ins><em><ins class="diff-chg">
+container
+</ins></em><ins class="diff-chg">
+to
+</ins>
+the
+<del class="diff-old">compacted
+</del>
+value
+<del class="diff-old">is
+element
+.
+</del>
+<ins class="diff-chg">of
+the
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term's
+</ins></a><a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping"><ins class="diff-chg">
+container
+mapping
+</ins></a><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+@null
+</ins></code><ins class="diff-chg">
+if
+no
+such
+mapping
+exists.
+</ins>
+</li>
+<li>
+<del class="diff-old">Otherwise,
+if
+</del>
+<ins class="diff-chg">If
+the
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+is
+a
+</ins><a class="tref internalDFN" title="property_generator" href="#dfn-property_generator"><ins class="diff-chg">
+property
+generator
+</ins></a>,<ins class="diff-chg">
+set
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">termType
+</ins>
+</em>
+<del class="diff-old">is
+an
+object:
+</del>
+<ins class="diff-chg">to
+</ins><code><ins class="diff-chg">
+propertyGenerators
+</ins></code>.</li>
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">Otherwise
+set
+set
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">termType
+</ins>
+</em>
+<del class="diff-old">has
+an
+</del>
+<ins class="diff-chg">to
+</ins>
+<code>
+<del class="diff-old">@value
+</del>
+<ins class="diff-chg">term
+</ins>
+</code>
+<del class="diff-old">property
+or
+element
+is
+a
+node
+reference
+,
+return
+</del>
+<ins class="diff-chg">and
+append
+</ins>
+the
+<del class="diff-old">result
+</del>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<ins class="diff-chg">term
+</ins></a><ins class="diff-chg">
+to
+the
+</ins><code><ins class="diff-chg">
+term
+</ins></code><ins class="diff-chg">
+member
+</ins>
+of
+<del class="diff-old">performing
+Value
+Compaction
+</del>
+<ins class="diff-chg">the
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins>
+</a>
+<del class="diff-old">on
+</del>
+<ins class="diff-chg">for
+the
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term's
+</ins></a><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+in
+</ins><a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context"><ins class="diff-chg">
+inverse
+context
+</ins></a><ins class="diff-chg">
+(append
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">term
+</ins>
+</em>
+<del class="diff-old">using
+active
+property
+.
+</del>
+<ins class="diff-chg">to
+</ins><code><ins class="diff-chg">
+inverseContext[iri]['term']
+</ins></code><ins class="diff-chg">
+).
+</ins></li><li><ins class="diff-chg">
+For
+each
+</ins><em><ins class="diff-chg">
+iri
+</ins></em><ins class="diff-chg">
+mapped
+to
+the
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a>,<ins class="diff-chg">
+perform
+the
+following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+has
+a
+</ins><a class="tref internalDFN" title="type_mapping" href="#dfn-type_mapping"><ins class="diff-chg">
+type
+mapping
+</ins></a><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+type
+</ins></em>,<ins class="diff-chg">
+append
+the
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+to
+</ins><code><ins class="diff-chg">
+inverseContext[iri][container]['@type'][type][termType]
+</ins></code>,<ins class="diff-chg">
+e.g.,
+</ins><code><ins class="diff-chg">
+inverseContext['http://...']['@list']['@type']['http://...']['term']
+</ins></code>.
+</li>
+<li>
+Otherwise,
+if
+the
+<del class="diff-old">active
+property
+</del>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<ins class="diff-chg">term
+</ins>
+</a>
+has
+a
+<del class="diff-old">@container
+</del>
+<a class="tref internalDFN" title="language_mapping" href="#dfn-language_mapping">
+<ins class="diff-chg">language
+</ins>
+mapping
+</a>
+<ins class="diff-new">store
+the
+associated
+language
+in
+</ins><em><ins class="diff-new">
+language
+</ins></em>,<ins class="diff-new">
+replacing
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-new">
+null
+</ins></a><ins class="diff-new">
+with
+</ins><code><ins class="diff-new">
+@null
+</ins></code>.<ins class="diff-new">
+Then
+append
+the
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a>
+to
+<code>
+<del class="diff-old">@list
+</del>
+<ins class="diff-chg">inverseContext[iri][container]['@language'][language][termType]
+</ins></code>,<ins class="diff-chg">
+e.g.,
+</ins><code><ins class="diff-chg">
+inverseContext['http://...']['@list']['@language']['de']['term']
+</ins></code>.</li><li><ins class="diff-chg">
+Otherwise
+append
+the
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+to
+</ins><code><ins class="diff-chg">
+inverseContext[iri][container]['@null']['@null'][termType]
+</ins></code><ins class="diff-chg">
+as
+well
+as
+</ins><code><ins class="diff-chg">
+inverseContext[iri][container]['@language'][defaultLanguage][termType]
+</ins>
+</code>
+<ins class="diff-new">to
+take
+the
+</ins><a class="tref internalDFN" title="default_language" href="#dfn-default_language"><ins class="diff-new">
+default
+language
+</ins></a><ins class="diff-new">
+into
+consideration
+for
+terms
+without
+explicit
+</ins><a class="tref internalDFN" title="language_mapping" href="#dfn-language_mapping"><ins class="diff-new">
+language
+mapping
+</ins></a>.</li></ol></li></ol></li><li><ins class="diff-new">
+Remove
+all
+but
+the
+shortest
+</ins>
+and
+<del class="diff-old">element
+has
+</del>
+<ins class="diff-chg">lexicographically
+least
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+in
+each
+</ins><code><ins class="diff-chg">
+term
+</ins></code><ins class="diff-chg">
+member
+in
+</ins><a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context"><ins class="diff-chg">
+inverse
+context
+</ins></a>.<ins class="diff-chg">
+The
+result
+is
+thus
+</ins>
+a
+<del class="diff-old">corresponding
+</del>
+<ins class="diff-chg">single
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a><ins class="diff-chg">
+value.
+</ins></li><li><ins class="diff-chg">
+Finally,
+sort
+the
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a><ins class="diff-chg">
+associated
+with
+every
+</ins>
+<code>
+<del class="diff-old">@list
+</del>
+<ins class="diff-chg">propertyGenerators
+</ins>
+</code>
+<del class="diff-old">property,
+recursively
+compact
+</del>
+<ins class="diff-chg">member
+in
+</ins><a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context"><ins class="diff-chg">
+inverse
+context
+</ins></a><ins class="diff-chg">
+lexicographically
+(shortest
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+terms
+</ins></a><ins class="diff-chg">
+come
+first).
+</ins></li></ol></section><section id="inverse-context-query-algorithm"><h3><span class="secno"><ins class="diff-chg">
+5.11
+</ins></span><ins class="diff-chg">
+Inverse
+Context
+Query
+Algorithm
+</ins></h3><p><ins class="diff-chg">
+It
+is
+possible
+</ins>
+that
+<del class="diff-old">property's
+value
+passing
+a
+copy
+</del>
+<ins class="diff-chg">multiple
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+terms
+</ins></a><ins class="diff-chg">
+that
+differ
+in
+their
+</ins><a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping"><ins class="diff-chg">
+container
+</ins></a>,<a class="tref internalDFN" title="type_mapping" href="#dfn-type_mapping"><ins class="diff-chg">
+type
+</ins></a>,<ins class="diff-chg">
+or
+</ins><a class="tref internalDFN" title="language_mapping" href="#dfn-language_mapping"><ins class="diff-chg">
+language
+mapping
+</ins></a><ins class="diff-chg">
+are
+mapped
+to
+the
+same
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a>.<ins class="diff-chg">
+The
+purpose
+</ins>
+of
+<ins class="diff-new">this
+algorithm
+is
+to
+query
+</ins>
+the
+<del class="diff-old">active
+</del>
+<a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">
+<ins class="diff-chg">inverse
+</ins>
+context
+</a>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">to
+return
+either
+</ins>
+the
+<del class="diff-old">active
+</del>
+<ins class="diff-chg">best
+matching
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a>,<ins class="diff-chg">
+or
+a
+list
+of
+potential
+</ins><a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">
+property
+<ins class="diff-new">generators
+</ins>
+</a>
+<del class="diff-old">ensuring
+that
+the
+result
+is
+an
+array
+</del>
+<ins class="diff-chg">along
+</ins>
+with
+<del class="diff-old">all
+null
+values
+removed.
+If
+there
+already
+exists
+</del>
+a
+<del class="diff-old">value
+for
+active
+</del>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<ins class="diff-chg">term
+</ins></a><ins class="diff-chg">
+to
+fall
+back
+to
+if
+none
+of
+the
+</ins><a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">
+property
+<ins class="diff-new">generators
+</ins>
+</a>
+<del class="diff-old">in
+</del>
+<ins class="diff-chg">can
+be
+applied.
+</ins></p><p><ins class="diff-chg">
+This
+algorithm
+takes
+an
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">inverseContextSubtree
+</ins></em>,<ins class="diff-chg">
+a
+</ins><em><ins class="diff-chg">
+queryPath
+</ins>
+</em>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">as
+generated
+by
+</ins>
+the
+<del class="diff-old">full
+</del>
+<a href="#iri-compaction-algorithm">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">of
+</del>
+<ins class="diff-chg">Compaction
+algorithm
+</ins></a><ins class="diff-chg">
+and
+a
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">level
+</ins>
+</em>
+<ins class="diff-new">parameter
+which
+</ins>
+is
+<del class="diff-old">also
+coerced
+</del>
+<ins class="diff-chg">initialized
+</ins>
+to
+<code>
+<del class="diff-old">@list
+,
+return
+an
+error.
+Otherwise
+store
+</del>
+<ins class="diff-chg">0
+</ins></code><ins class="diff-chg">
+if
+nothing
+else
+is
+passed.
+The
+algorithm
+returns
+either
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a><ins class="diff-chg">
+representing
+</ins>
+the
+<del class="diff-old">resulting
+</del>
+<ins class="diff-chg">best
+matching
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+or
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+consisting
+of
+a
+</ins><code><ins class="diff-chg">
+propertyGenerators
+</ins></code><ins class="diff-chg">
+member,
+containing
+a
+sorted
+</ins><a class="tref internalDFN" title="array" href="#dfn-array">
+array
+<del class="diff-old">as
+value
+</del>
+</a>
+of
+<del class="diff-old">active
+</del>
+<ins class="diff-chg">potential
+</ins><a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">
+property
+<ins class="diff-new">generators
+</ins></a>,<ins class="diff-new">
+and
+an
+optional
+</ins><code><ins class="diff-new">
+term
+</ins></code><ins class="diff-new">
+member
+containing
+a
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins>
+</a>
+<ins class="diff-new">to
+fall
+back
+to
+</ins>
+if
+<del class="diff-old">empty
+or
+</del>
+<ins class="diff-chg">none
+of
+the
+</ins><a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">
+property
+<ins class="diff-new">generators
+</ins></a><ins class="diff-new">
+can
+be
+applied.
+</ins></p><ol class="algorithm"><li><ins class="diff-new">
+Initialize
+</ins><em><ins class="diff-new">
+result
+</ins>
+</em>
+<del class="diff-old">otherwise.
+</del>
+<ins class="diff-chg">to
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+construct
+</del>
+<ins class="diff-chg">If
+</ins>
+<em>
+<del class="diff-old">output
+</del>
+<ins class="diff-chg">level
+</ins>
+</em>
+<del class="diff-old">as
+</del>
+<ins class="diff-chg">equals
+</ins><code><ins class="diff-chg">
+3
+</ins></code>,<ins class="diff-chg">
+i.e.,
+the
+deepest
+nested
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+in
+the
+</ins><a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context"><ins class="diff-chg">
+inverse
+context
+</ins></a><ins class="diff-chg">
+has
+been
+reached,
+perform
+the
+following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+inverseContextSubtree
+</ins></em><ins class="diff-chg">
+has
+a
+</ins><code><ins class="diff-chg">
+propertyGenerators
+</ins></code><ins class="diff-chg">
+member,
+copy
+that
+member
+into
+</ins>
+a
+new
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+<del class="diff-old">used
+for
+returning
+the
+result
+of
+compacting
+</del>
+<ins class="diff-chg">and
+store
+that
+object
+in
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">result
+</ins>
+</em>.
+<del class="diff-old">For
+each
+</del>
+</li>
+<li>
+<ins class="diff-chg">If
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">inverseContextSubtree
+</ins>
+</em>
+<ins class="diff-new">has
+a
+</ins><code><ins class="diff-new">
+term
+</ins></code><ins class="diff-new">
+member
+</ins>
+and
+<em>
+<ins class="diff-new">result
+</ins></em><ins class="diff-new">
+is
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-new">
+null
+</ins></a>,<ins class="diff-new">
+return
+the
+</ins>
+value
+<ins class="diff-new">of
+that
+member;
+otherwise
+</ins><em><ins class="diff-new">
+result
+</ins>
+</em>
+<del class="diff-old">in
+</del>
+<ins class="diff-chg">is
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>,<ins class="diff-chg">
+copy
+the
+</ins><code><ins class="diff-chg">
+term
+</ins></code><ins class="diff-chg">
+member
+into
+</ins>
+<em>
+<del class="diff-old">element:
+</del>
+<ins class="diff-chg">result
+</ins>
+</em>
+<ins class="diff-chg">and
+return
+</ins><em><ins class="diff-chg">
+result
+</ins></em>.</li></ol></li>
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">Otherwise,
+for
+each
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">entry
+</ins>
+</em>
+<del class="diff-old">is
+@id
+or
+</del>
+<ins class="diff-chg">of
+the
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a><ins class="diff-chg">
+in
+</ins><em><ins class="diff-chg">
+queryPath's
+</ins></em><em><ins class="diff-chg">
+level'd
+</ins></em><ins class="diff-chg">
+position
+(
+</ins>
+<code>
+<del class="diff-old">@type
+</del>
+<ins class="diff-chg">queryPath[level]
+</ins>
+</code>
+<ins class="diff-new">),
+perform
+the
+following
+steps:
+</ins>
+<ol class="algorithm">
+<li>
+<del class="diff-old">Set
+active
+property
+</del>
+<ins class="diff-chg">If
+</ins><em><ins class="diff-chg">
+inverseContextSubtree
+</ins></em><ins class="diff-chg">
+has
+no
+</ins><em><ins class="diff-chg">
+entry
+</ins></em><ins class="diff-chg">
+member,
+continue
+with
+the
+next
+</ins><em><ins class="diff-chg">
+entry
+</ins></em>.</li><li><ins class="diff-chg">
+Otherwise
+set
+</ins><em><ins class="diff-chg">
+tmpResult
+</ins></em>
+to
+the
+result
+of
+<del class="diff-old">performing
+IRI
+Compaction
+on
+</del>
+<ins class="diff-chg">recursively
+invoking
+this
+algorithm
+passing
+the
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">entry
+</ins></em><ins class="diff-chg">
+member
+of
+</ins><em><ins class="diff-chg">
+inverseContextSubtree
+</ins></em><ins class="diff-chg">
+as
+new
+</ins><em><ins class="diff-chg">
+inverseContextSubtree
+</ins></em>,<em><ins class="diff-chg">
+queryPath
+</ins></em>,<ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+level
+</ins></em><ins class="diff-chg">
++
+</ins><code><ins class="diff-chg">
+1
+</ins></code><ins class="diff-chg">
+as
+new
+</ins><em><ins class="diff-chg">
+level
+</ins>
+</em>.
+</li>
+<li>
+If
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">tmpResult
+</ins>
+</em>
+is
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+<del class="diff-old">,
+the
+compacted
+</del>
+</a>
+<ins class="diff-chg">and
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">result
+</ins>
+</em>
+is
+<del class="diff-old">the
+result
+of
+performing
+IRI
+Compaction
+on
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins></a>,<ins class="diff-chg">
+return
+</ins>
+<em>
+<del class="diff-old">value
+.
+Otherwise,
+</del>
+<ins class="diff-chg">tmpResult
+</ins></em><ins class="diff-chg">
+;
+otherwise,
+if
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">result
+</ins>
+</em>
+<del class="diff-old">must
+</del>
+<ins class="diff-chg">is
+not
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+transform
+</ins><em><ins class="diff-chg">
+tmpResult
+</ins>
+</em>
+<del class="diff-old">be
+</del>
+<ins class="diff-chg">to
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+whose
+</ins><code><ins class="diff-chg">
+propertyGenerators
+</ins></code><ins class="diff-chg">
+member
+is
+set
+to
+</ins>
+an
+<ins class="diff-new">empty
+</ins>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+<del class="diff-old">.
+Perform
+IRI
+Compaction
+</del>
+</a>
+<del class="diff-old">on
+every
+entry
+of
+</del>
+<ins class="diff-chg">and
+whose
+</ins><code><ins class="diff-chg">
+term
+</ins></code><ins class="diff-chg">
+member
+is
+set
+to
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">tmpResult
+</ins>
+</em>.
+</li>
+<li>
+If
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">result
+</ins>
+</em>
+<del class="diff-old">contains
+just
+one
+entry
+and
+</del>
+<ins class="diff-chg">is
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+replace
+it
+with
+</ins><em><ins class="diff-chg">
+tmpResult
+</ins></em>.</li><li><ins class="diff-chg">
+Otherwise,
+append
+each
+item
+of
+</ins>
+the
+<del class="diff-old">compactArrays
+</del>
+<code>
+<ins class="diff-chg">propertyGenerator
+</ins>
+</code>
+<del class="diff-old">option
+is
+set
+</del>
+<ins class="diff-chg">member
+of
+</ins><em><ins class="diff-chg">
+tmpResult
+</ins></em>
+to
+<ins class="diff-new">the
+</ins>
+<code>
+<del class="diff-old">true
+,
+</del>
+<ins class="diff-chg">propertyGenerator
+</ins></code><ins class="diff-chg">
+member
+of
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">result
+</ins>
+</em>
+<ins class="diff-new">unless
+it
+</ins>
+is
+<del class="diff-old">set
+to
+that
+entry.
+</del>
+<ins class="diff-chg">already
+in
+</ins><em><ins class="diff-chg">
+result's
+</ins></em><ins class="diff-chg">
+member.
+If
+</ins><em><ins class="diff-chg">
+result
+</ins></em><ins class="diff-chg">
+has
+no
+</ins><code><ins class="diff-chg">
+term
+</ins></code><ins class="diff-chg">
+member
+but
+</ins><em><ins class="diff-chg">
+tmpResult
+</ins></em><ins class="diff-chg">
+does,
+copy
+</ins><em><ins class="diff-chg">
+tmpResult's
+</ins></em><code><ins class="diff-chg">
+term
+</ins></code><ins class="diff-chg">
+member
+into
+</ins><em><ins class="diff-chg">
+result
+</ins></em>.</li></ol>
+</li>
+<li>
+<del class="diff-old">Add
+</del>
+<ins class="diff-chg">Return
+</ins><em><ins class="diff-chg">
+result
+</ins></em>.</li></ol></section><section id="value-compaction"><h3><span class="secno"><ins class="diff-chg">
+5.12
+</ins></span><ins class="diff-chg">
+Value
+Compaction
+</ins></h3><p><ins class="diff-chg">
+Expansion
+transforms
+all
+values
+into
+</ins><a class="tref internalDFN" title="expanded_form" href="#dfn-expanded_form"><ins class="diff-chg">
+expanded
+form
+</ins></a><ins class="diff-chg">
+in
+JSON-LD.
+This
+algorithm
+does
+the
+opposite,
+it
+compacts
+an
+algorithm
+according
+the
+</ins><a class="tref internalDFN" title="term_definition" href="#dfn-term_definition"><ins class="diff-chg">
+term
+definition
+</ins></a><ins class="diff-chg">
+of
+the
+passed
+</ins>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+<del class="diff-old">and
+</del>
+</a>.
+<ins class="diff-chg">After
+</ins>
+the
+<ins class="diff-new">application
+of
+this
+algorithm
+a
+value
+is
+said
+to
+be
+in
+</ins><dfn title="compacted_form" id="dfn-compacted_form">
+compacted
+<ins class="diff-new">form
+</ins></dfn>.</p><p><ins class="diff-new">
+This
+algorithm
+takes
+a
+</ins>
+<em>
+value
+<del class="diff-old">to
+</del>
+</em>,
+<ins class="diff-chg">an
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>,<ins class="diff-chg">
+an
+</ins><a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context"><ins class="diff-chg">
+inverse
+context
+</ins></a>,<ins class="diff-chg">
+an
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a>,<ins class="diff-chg">
+and
+an
+optional
+</ins>
+<em>
+<del class="diff-old">output
+</del>
+<ins class="diff-chg">containerValue
+</ins>
+</em>.
+</p>
+<ol class="algorithm">
+<li>
+<del class="diff-old">Otherwise,
+</del>
+<ins class="diff-chg">If
+a
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">containerValue
+</ins>
+</em>
+<del class="diff-old">must
+</del>
+<ins class="diff-chg">has
+been
+passed,
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+has
+a
+</ins><a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping"><ins class="diff-chg">
+container
+mapping
+</ins></a><ins class="diff-chg">
+set
+to
+</ins><code><ins class="diff-chg">
+@annotation
+</ins></code><ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+value
+</ins>
+</em>
+<del class="diff-old">be
+</del>
+<ins class="diff-chg">has
+</ins>
+an
+<del class="diff-old">array
+.
+</del>
+<code>
+<ins class="diff-chg">@annotation
+</ins></code><ins class="diff-chg">
+member
+which
+equals
+</ins><em><ins class="diff-chg">
+containerValue
+</ins></em>,<ins class="diff-chg">
+remove
+that
+member.
+</ins>
+</li>
+<li>
+If
+<em>
+value
+</em>
+is
+<del class="diff-old">empty:
+Set
+active
+property
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins>
+</a>
+<del class="diff-old">to
+</del>
+<ins class="diff-chg">having
+a
+single
+member
+</ins><code><ins class="diff-chg">
+@id
+</ins></code>,<ins class="diff-chg">
+return
+</ins>
+the
+result
+of
+performing
+<a href="#iri-compaction-algorithm">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Compaction
+</a>
+on
+<del class="diff-old">property
+.
+</del>
+<ins class="diff-chg">that
+member's
+value.
+</ins>
+</li>
+<li>
+<del class="diff-old">Create
+an
+entry
+in
+</del>
+<ins class="diff-chg">Otherwise,
+if
+</ins>
+<em>
+<del class="diff-old">output
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+<del class="diff-old">for
+</del>
+<ins class="diff-chg">is
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+having
+a
+</ins><code><ins class="diff-chg">
+@value
+</ins></code><ins class="diff-chg">
+member,
+perform
+the
+following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+</ins>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+<ins class="diff-new">has
+a
+</ins><a class="tref internalDFN" title="type_mapping" href="#dfn-type_mapping"><ins class="diff-new">
+type
+mapping
+</ins></a>
+and
+<em>
+value
+<del class="diff-old">.
+For
+each
+item
+</del>
+</em>
+<del class="diff-old">in
+</del>
+<ins class="diff-chg">has
+a
+corresponding
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+member,
+remove
+the
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+member
+from
+</ins>
+<em>
+value
+<del class="diff-old">:
+</del>
+</em>.
+</li>
+<li>
+<del class="diff-old">Set
+</del>
+<ins class="diff-chg">Otherwise,
+if
+the
+</ins>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+<del class="diff-old">to
+the
+result
+of
+performing
+IRI
+Compaction
+</del>
+<ins class="diff-chg">has
+a
+</ins><a class="tref internalDFN" title="language_mapping" href="#dfn-language_mapping"><ins class="diff-chg">
+language
+mapping
+</ins>
+</a>
+<del class="diff-old">for
+property
+</del>
+and
+<em>
+<del class="diff-old">item
+using
+the
+active
+context
+.
+Compact
+item
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+<del class="diff-old">by
+recursively
+performing
+this
+algorithm
+passing
+</del>
+<ins class="diff-chg">has
+</ins>
+a
+<del class="diff-old">copy
+of
+the
+active
+context
+and
+</del>
+<ins class="diff-chg">corresponding
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+member,
+remove
+</ins>
+the
+<del class="diff-old">active
+property
+.
+</del>
+<code>
+<ins class="diff-chg">@language
+</ins></code><ins class="diff-chg">
+member
+from
+</ins><em><ins class="diff-chg">
+value
+</ins></em>.
+</li>
+<li>
+<del class="diff-old">If
+an
+entry
+already
+exists
+in
+</del>
+<ins class="diff-chg">Otherwise,
+if
+a
+</ins>
+<em>
+<del class="diff-old">output
+</del>
+<ins class="diff-chg">containerValue
+</ins>
+</em>
+<del class="diff-old">for
+</del>
+<ins class="diff-chg">has
+been
+passed,
+the
+</ins>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+<del class="diff-old">,
+convert
+it
+to
+an
+array
+</del>
+</a>
+<del class="diff-old">if
+necessary,
+</del>
+<ins class="diff-chg">has
+a
+</ins><a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping"><ins class="diff-chg">
+container
+mapping
+</ins></a><ins class="diff-chg">
+set
+to
+</ins><code><ins class="diff-chg">
+@language
+</ins></code>,
+and
+<del class="diff-old">append
+</del>
+<em>
+<ins class="diff-chg">value
+</ins></em><ins class="diff-chg">
+has
+a
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+member
+which
+equals
+</ins><em><ins class="diff-chg">
+containerValue
+</ins></em>,<ins class="diff-chg">
+remove
+</ins>
+the
+<del class="diff-old">compacted
+</del>
+<code>
+<ins class="diff-chg">@language
+</ins></code><ins class="diff-chg">
+member
+from
+</ins>
+<em>
+value
+</em>.
+</li>
+<li>
+Otherwise,
+if
+the
+<del class="diff-old">compacted
+</del>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-chg">active
+context
+</ins></a><ins class="diff-chg">
+has
+a
+</ins><a class="tref internalDFN" title="default_language" href="#dfn-default_language"><ins class="diff-chg">
+default
+language
+</ins></a><ol class="algorithm"><li><ins class="diff-chg">
+and
+the
+</ins>
+<em>
+value
+</em>
+<del class="diff-old">is
+not
+an
+array
+and
+active
+property
+</del>
+has
+a
+<ins class="diff-new">corresponding
+</ins>
+<code>
+<del class="diff-old">@container
+mapping
+to
+@set
+</del>
+<ins class="diff-chg">@language
+</ins>
+</code>
+<del class="diff-old">or
+if
+</del>
+<ins class="diff-chg">member,
+remove
+</ins>
+the
+<del class="diff-old">compactArrays
+option
+is
+set
+to
+</del>
+<code>
+<del class="diff-old">false
+,
+convert
+</del>
+<ins class="diff-chg">@language
+</ins></code><ins class="diff-chg">
+member
+from
+</ins>
+<em>
+value
+<del class="diff-old">to
+an
+array.
+</del>
+</em>.
+</li>
+<li>
+<del class="diff-old">Create
+an
+entry
+in
+</del>
+<ins class="diff-chg">Otherwise,
+or
+if
+the
+value
+of
+</ins>
+<em>
+<del class="diff-old">output
+</del>
+<ins class="diff-chg">value's
+</ins>
+</em>
+<del class="diff-old">for
+active
+property
+and
+</del>
+<code>
+<ins class="diff-chg">@value
+</ins></code><ins class="diff-chg">
+member
+is
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a>,<ins class="diff-chg">
+return
+</ins>
+<em>
+value
+</em>.
+</li>
+</ol>
+</li>
+<li>
+<ins class="diff-chg">If
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+has
+just
+a
+</ins><code><ins class="diff-chg">
+@value
+</ins></code><ins class="diff-chg">
+member,
+return
+the
+value
+of
+that
+member.
+</ins>
+</li>
+</ol>
+</li>
+<li>
+<del class="diff-old">Otherwise,
+return
+</del>
+<ins class="diff-chg">Return
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+as
+<del class="diff-old">the
+compacted
+element
+.
+</del>
+<ins class="diff-chg">is.
+</ins></li></ol></section><section id="find-and-remove-property-generator-duplicates"><h3>
+<del class="diff-old">Issue
+</del>
+<span class="secno">
+<ins class="diff-chg">5.13
+</ins>
+</span>
+<del class="diff-old">Perhaps
+this
+should
+also
+call
+Value
+Compaction
+on
+native
+types
+</del>
+<ins class="diff-chg">Find
+</ins>
+and
+<del class="diff-old">strings,
+which
+could
+consolidate
+potential
+transformation
+in
+one
+place.
+</del>
+<ins class="diff-chg">Remove
+Property
+Generator
+Duplicates
+</ins></h3>
+<p>
+<del class="diff-old">If,
+after
+the
+</del>
+<ins class="diff-chg">This
+</ins>
+algorithm
+<del class="diff-old">outlined
+above
+is
+run,
+the
+resulting
+</del>
+<ins class="diff-chg">checks
+if
+a
+specific
+value
+exists
+for
+all
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-chg">
+IRIs
+</ins></a><ins class="diff-chg">
+associated
+with
+a
+</ins><a class="tref internalDFN" title="property_generator" href="#dfn-property_generator"><ins class="diff-chg">
+property
+generator
+</ins></a><ins class="diff-chg">
+and
+if
+so,
+it
+removes
+them.
+The
+algorithm
+takes
+five
+parameters:
+</ins>
+<em>
+element
+<del class="diff-old">is
+an
+array
+</del>
+</em>,
+<em>
+<ins class="diff-chg">property
+</ins></em>,<em><ins class="diff-chg">
+value
+</ins></em>,<a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins>
+</a>,
+<del class="diff-old">put
+</del>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+<ins class="diff-chg">active
+property
+</ins></a>.</p><ol class="algorithm"><li><ins class="diff-chg">
+For
+each
+item
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">propertyGenerator
+</ins>
+</em>
+<del class="diff-old">into
+</del>
+<ins class="diff-chg">of
+the
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a><ins class="diff-chg">
+which
+is
+the
+value
+of
+</ins>
+the
+<code>
+<del class="diff-old">@graph
+</del>
+<ins class="diff-chg">propertyGenerators
+</ins>
+</code>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">member
+</ins>
+of
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+<ins class="diff-new">active
+property
+</ins></a><ins class="diff-new">
+perform
+the
+following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-new">
+Check
+that
+</ins>
+a
+<del class="diff-old">new
+JSON
+object
+</del>
+<ins class="diff-chg">member
+exists
+for
+each
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>
+</a>
+<del class="diff-old">and
+then
+set
+</del>
+<ins class="diff-chg">associated
+with
+the
+</ins>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">propertyGenerator
+</ins></em>.<ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+value
+</ins>
+</em>
+<del class="diff-old">to
+</del>
+<ins class="diff-chg">is
+not
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a><ins class="diff-chg">
+also
+check
+whether
+each
+of
+those
+members
+</ins>
+that
+<del class="diff-old">JSON
+object
+.
+Finally,
+add
+a
+@context
+property
+to
+</del>
+<ins class="diff-chg">contains
+</ins>
+<em>
+<del class="diff-old">element
+and
+set
+it
+</del>
+<ins class="diff-chg">value
+</ins></em>.<ins class="diff-chg">
+Values
+are
+considered
+</ins>
+to
+<ins class="diff-new">be
+equal
+if
+they
+are
+of
+</ins>
+the
+<del class="diff-old">initially
+passed
+context
+.
+4.9
+Flattening
+Flattening
+is
+</del>
+<ins class="diff-chg">same
+type
+and
+have
+</ins>
+the
+<del class="diff-old">process
+of
+taking
+a
+JSON-LD
+document,
+expanding
+</del>
+<ins class="diff-chg">same
+value(s);
+</ins><a class="tref internalDFN" title="node_object" href="#dfn-node_object"><ins class="diff-chg">
+node
+objects
+</ins>
+</a>
+<del class="diff-old">it,
+labeling
+</del>
+<ins class="diff-chg">are
+considered
+to
+be
+equal
+if
+</ins>
+all
+<ins class="diff-new">members
+match,
+except
+if
+no
+</ins><code><ins class="diff-new">
+@id
+</ins></code><ins class="diff-new">
+member
+exists
+(i.e.,
+it
+is
+an
+</ins>
+unlabeled
+<del class="diff-old">nodes
+with
+a
+</del>
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>,
+<ins class="diff-new">in
+that
+case
+</ins><a class="tref internalDFN" title="node_object" href="#dfn-node_object"><ins class="diff-new">
+node
+objects
+</ins>
+</a>
+<del class="diff-old">identifier,
+and
+returning
+an
+array
+of
+</del>
+<ins class="diff-chg">are
+never
+considered
+to
+be
+equal.
+</ins></li><li><ins class="diff-chg">
+If
+that's
+not
+</ins>
+the
+<del class="diff-old">nodes
+defined
+in
+</del>
+<ins class="diff-chg">case,
+continue
+with
+</ins>
+the
+<del class="diff-old">document.
+For
+example,
+assume
+</del>
+<ins class="diff-chg">next
+</ins><em><ins class="diff-chg">
+propertyGenerator
+</ins></em>.</li><li><ins class="diff-chg">
+Otherwise,
+remove
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+from
+every
+member.
+If
+</ins>
+the
+<del class="diff-old">following
+JSON-LD
+input
+document:
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "knows": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "@id": "http://example.com/markus",
+ "name": "Markus Lanthaler",
+ "knows": {
+ "name": "Manu Sporny"
+ }
+}
+Running
+</del>
+<ins class="diff-chg">resulting
+value
+of
+a
+member
+is
+an
+empty
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a>,<ins class="diff-chg">
+remove
+</ins>
+the
+<del class="diff-old">JSON-LD
+Flattening
+algorithm
+for
+</del>
+<ins class="diff-chg">member
+altogether
+from
+</ins><em><ins class="diff-chg">
+element
+</ins></em>.</li><li><ins class="diff-chg">
+Return
+</ins><em><ins class="diff-chg">
+propertyGenerator
+</ins></em>.</li></ol></li><li><ins class="diff-chg">
+Return
+the
+value
+of
+</ins>
+the
+<del class="diff-old">merged
+graph
+(
+</del>
+<code>
+<del class="diff-old">@merged
+</del>
+<ins class="diff-chg">term
+</ins>
+</code>
+<del class="diff-old">)
+against
+the
+JSON-LD
+input
+document
+provided
+above
+would
+result
+in
+the
+following
+output:
+[
+ {
+ "@id": "http://example.com/markus",
+ "http://xmlns.com/foaf/0.1/knows": [ { "@id": "_:t0" } ],
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ },
+ {
+ "@id": "_:t0",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Manu Sporny" } ]
+ }
+]
+</del>
+<ins class="diff-chg">member
+of
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+since
+no
+matching
+</ins><a class="tref internalDFN" title="property_generator" href="#dfn-property_generator"><ins class="diff-chg">
+property
+generator
+</ins></a><ins class="diff-chg">
+has
+been
+found.
+</ins></li></ol></section>
+<section id="flattening-algorithm">
+<h3>
+<span class="secno">
+<del class="diff-old">4.9.1
+</del>
+<ins class="diff-chg">5.14
+</ins>
+</span>
+Flattening
+Algorithm
+</h3>
+<p>
+The
+algorithm
+takes
+two
+input
+variables,
+an
+<em>
+element
+</em>
+to
+flatten
+and
+<del class="diff-old">the
+graph
+for
+which
+the
+node
+definitions
+should
+be
+returned.
+If
+</del>
+<ins class="diff-chg">a
+</ins>
+<em>
+<del class="diff-old">graph
+</del>
+<ins class="diff-chg">context
+</ins>
+</em>
+<del class="diff-old">is
+not
+set,
+it
+will
+default
+</del>
+<ins class="diff-chg">used
+</ins>
+to
+<del class="diff-old">@merged
+which
+represents
+the
+result
+of
+merging
+all
+graphs
+including
+</del>
+<ins class="diff-chg">compact
+</ins>
+the
+<del class="diff-old">default
+graph
+(
+@default
+).
+</del>
+<ins class="diff-chg">flattened
+document.
+</ins>
+</p>
+<ol class="algorithm">
+<li>
+Expand
+<em>
+element
+</em>
+according
+the
+<a href="#expansion-algorithm">
+Expansion
+<del class="diff-old">Algorithm
+</del>
+<ins class="diff-chg">algorithm
+</ins>
+</a>.
+</li>
+<li>
+Generate
+a
+<em>
+nodeMap
+</em>
+according
+the
+<a href="#node-map-generation">
+Node
+Map
+Generation
+<del class="diff-old">Algorithm
+</del>
+<ins class="diff-chg">algorithm
+</ins>
+</a>.
+</li>
+<li>
+<del class="diff-old">Initialize
+</del>
+<ins class="diff-chg">Let
+</ins><em><ins class="diff-chg">
+defaultGraph
+</ins></em><ins class="diff-chg">
+be
+the
+value
+of
+the
+</ins><code><ins class="diff-chg">
+@default
+</ins></code><ins class="diff-chg">
+member
+of
+</ins><em><ins class="diff-chg">
+nodeMap
+</ins></em><ins class="diff-chg">
+;
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+representing
+the
+</ins><a class="tref internalDFN" title="default_graph" href="#dfn-default_graph"><ins class="diff-chg">
+default
+graph
+</ins></a>.</li><li><ins class="diff-chg">
+For
+each
+other
+</ins><em><ins class="diff-chg">
+graphName
+</ins></em><ins class="diff-chg">
+-
+</ins><em><ins class="diff-chg">
+graph
+</ins></em><ins class="diff-chg">
+pair
+in
+</ins><em><ins class="diff-chg">
+nodeMap
+</ins></em><ins class="diff-chg">
+perform
+the
+following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+defaultGraph
+</ins></em><ins class="diff-chg">
+does
+not
+have
+a
+</ins><em><ins class="diff-chg">
+graphName
+</ins></em><ins class="diff-chg">
+member,
+create
+one
+and
+initialize
+its
+value
+to
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+consisting
+of
+an
+</ins><code><ins class="diff-chg">
+@id
+</ins></code><ins class="diff-chg">
+member
+whose
+value
+is
+set
+to
+</ins><em><ins class="diff-chg">
+graphName
+</ins></em>.</li><li><ins class="diff-chg">
+Add
+a
+</ins><code><ins class="diff-chg">
+@graph
+</ins></code><ins class="diff-chg">
+member
+set
+to
+</ins>
+an
+empty
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+<ins class="diff-new">(referred
+to
+as
+</ins>
+<em>
+<del class="diff-old">result
+</del>
+<ins class="diff-chg">nodes
+</ins></em><ins class="diff-chg">
+)
+to
+the
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+which
+is
+the
+value
+of
+the
+</ins><em><ins class="diff-chg">
+graphName
+</ins></em><ins class="diff-chg">
+member
+of
+</ins><em><ins class="diff-chg">
+nodeMap
+</ins>
+</em>.
+</li>
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">For
+each
+</ins>
+<em>
+<del class="diff-old">nodeMap
+</del>
+<ins class="diff-chg">id
+</ins>
+</em>
+<del class="diff-old">has
+no
+property
+</del>
+<ins class="diff-chg">-
+</ins><em><ins class="diff-chg">
+node
+</ins></em><ins class="diff-chg">
+pair
+in
+</ins>
+<em>
+graph
+<del class="diff-old">,
+return
+</del>
+</em>
+<ins class="diff-chg">ordered
+by
+</ins>
+<em>
+<del class="diff-old">result
+</del>
+<ins class="diff-chg">id
+</ins>
+</em>,
+<del class="diff-old">otherwise
+set
+</del>
+<ins class="diff-chg">add
+</ins>
+<em>
+<del class="diff-old">definitions
+</del>
+<ins class="diff-chg">node
+</ins>
+</em>
+to
+<del class="diff-old">its
+value.
+</del>
+<ins class="diff-chg">the
+</ins><em><ins class="diff-chg">
+nodes
+</ins></em><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a>.</li></ol>
+</li>
+<li>
+<del class="diff-old">Foreach
+</del>
+<ins class="diff-chg">Initialize
+an
+empty
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a><ins class="diff-chg">
+flattened.
+</ins></li><li><ins class="diff-chg">
+For
+each
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">id
+</ins>
+</em>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">-
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">node
+</ins>
+</em>
+<del class="diff-old">of
+of
+</del>
+<ins class="diff-chg">pair
+in
+</ins>
+<em>
+<del class="diff-old">definitions
+</del>
+<ins class="diff-chg">defaultGraph
+</ins>
+</em>
+ordered
+by
+<em>
+<del class="diff-old">property
+:
+Add
+</del>
+<ins class="diff-chg">id
+</ins></em>,<ins class="diff-chg">
+add
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">node
+</ins>
+</em>
+to
+<em>
+<del class="diff-old">result
+</del>
+<ins class="diff-chg">flattened
+</ins>
+</em>.
+</li>
+<li>
+<ins class="diff-chg">If
+</ins><em><ins class="diff-chg">
+context
+</ins></em><ins class="diff-chg">
+equals
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+return
+</ins><em><ins class="diff-chg">
+flattened
+</ins></em>.
+</li>
+<li>
+<del class="diff-old">Return
+</del>
+<ins class="diff-chg">Otherwise,
+return
+the
+result
+of
+compacting
+</ins><em><ins class="diff-chg">
+flattened
+</ins></em><ins class="diff-chg">
+according
+the
+</ins><a href="#compaction-algorithm"><ins class="diff-chg">
+Compaction
+algorithm
+</ins></a><ins class="diff-chg">
+passing
+</ins>
+<em>
+<ins class="diff-new">context
+</ins></em><ins class="diff-new">
+ensuring
+that
+the
+compaction
+</ins>
+result
+<del class="diff-old">.
+</del>
+<ins class="diff-chg">uses
+the
+</ins><code><ins class="diff-chg">
+@graph
+</ins></code><ins class="diff-chg">
+keyword
+(or
+its
+alias)
+at
+the
+top-level,
+even
+if
+the
+context
+is
+empty
+or
+if
+there
+is
+only
+one
+element
+to
+put
+in
+the
+</ins><code><ins class="diff-chg">
+@graph
+</ins></code><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a>.<ins class="diff-chg">
+This
+ensures
+that
+the
+returned
+document
+has
+a
+deterministic
+structure.
+</ins>
+</li>
+</ol>
+</section>
+<section id="node-map-generation">
+<h3>
+<span class="secno">
+<del class="diff-old">4.9.2
+</del>
+<ins class="diff-chg">5.15
+</ins>
+</span>
+Node
+Map
+Generation
+</h3>
+<p>
+<del class="diff-old">The
+Node
+Map
+Generation
+</del>
+<ins class="diff-chg">This
+</ins>
+algorithm
+<del class="diff-old">takes
+as
+input
+an
+expanded
+JSON-LD
+document
+and
+results
+in
+</del>
+<ins class="diff-chg">creates
+</ins>
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+<em>
+nodeMap
+</em>
+holding
+<del class="diff-old">a
+flat
+</del>
+<ins class="diff-chg">an
+indexed
+</ins>
+representation
+of
+the
+<a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">
+graphs
+</a>
+and
+<a class="tref internalDFN" title="node" href="#dfn-node">
+nodes
+</a>
+represented
+in
+the
+<ins class="diff-new">passed,
+expanded
+</ins>
+document.
+All
+<a class="tref internalDFN" title="node" href="#dfn-node">
+nodes
+</a>
+that
+are
+not
+uniquely
+identified
+by
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+get
+assigned
+a
+(new)
+<a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">
+blank
+node
+<del class="diff-old">identifier.
+</del>
+<ins class="diff-chg">identifier
+</ins></a>.
+The
+resulting
+<em>
+nodeMap
+</em>
+<del class="diff-old">document
+</del>
+will
+have
+a
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">member
+</ins>
+for
+every
+graph
+in
+the
+document
+whose
+value
+is
+another
+object
+with
+a
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">member
+</ins>
+for
+every
+<a class="tref internalDFN" title="node" href="#dfn-node">
+node
+</a>
+represented
+in
+the
+document.
+<del class="diff-old">While
+the
+</del>
+<ins class="diff-chg">The
+</ins>
+default
+graph
+is
+stored
+under
+the
+<code>
+@default
+</code>
+<del class="diff-old">property
+and
+the
+merged
+graph
+under
+the
+@merged
+property,
+</del>
+<ins class="diff-chg">member,
+</ins>
+all
+other
+graphs
+are
+stored
+under
+their
+<del class="diff-old">respective
+IRIs
+.
+</del>
+<ins class="diff-chg">graph
+name.
+</ins>
+</p>
+<p>
+The
+algorithm
+takes
+as
+input
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">an
+</ins>
+expanded
+JSON-LD
+document
+<del class="diff-old">as
+</del>
+<em>
+element
+<del class="diff-old">,
+the
+initially
+empty
+</del>
+</em>
+<ins class="diff-chg">and
+a
+reference
+to
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>
+<em>
+nodeMap
+<del class="diff-old">,
+</del>
+</em>.
+<ins class="diff-chg">Furthermore
+it
+has
+the
+optional
+parameters
+</ins><a class="tref internalDFN" title="active_graph" href="#dfn-active_graph"><ins class="diff-chg">
+active
+graph
+</ins></a><ins class="diff-chg">
+(which
+defaults
+to
+</ins>
+<code>
+@default
+</code>
+<del class="diff-old">as
+graph
+,
+null
+as
+list
+,
+</del>
+<ins class="diff-chg">),
+an
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-chg">
+active
+subject
+</ins></a>,<a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a>,
+and
+<del class="diff-old">null
+</del>
+<ins class="diff-chg">a
+reference
+to
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins>
+</a>
+<del class="diff-old">as
+</del>
+<em>
+<del class="diff-old">id
+</del>
+<ins class="diff-chg">list
+</ins>
+</em>.
+<ins class="diff-new">The
+</ins><em><ins class="diff-new">
+nodeMap
+</ins></em><ins class="diff-new">
+must
+be
+initialized
+to
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+consisting
+of
+a
+single
+member
+whose
+name
+corresponds
+with
+</ins><a class="tref internalDFN" title="active_graph" href="#dfn-active_graph"><ins class="diff-new">
+active
+graph
+</ins></a><ins class="diff-new">
+and
+whose
+value
+is
+an
+empty
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a>.
+</p>
+<ol class="algorithm">
+<li>
+If
+<em>
+element
+</em>
+is
+an
+array,
+process
+each
+entry
+in
+<em>
+element
+</em>
+recursively,
+using
+this
+algorithm
+and
+return.
+</li>
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">Otherwise
+</ins>
+<em>
+element
+</em>
+is
+<del class="diff-old">not
+</del>
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+<del class="diff-old">or
+if
+it
+has
+a
+@value
+property,
+then
+if
+</del>
+</a>.
+<ins class="diff-chg">Let
+</ins>
+<em>
+<del class="diff-old">list
+</del>
+<ins class="diff-chg">activeGraph
+</ins>
+</em>
+<ins class="diff-new">be
+the
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+which
+</ins>
+is
+<del class="diff-old">not
+null
+,
+append
+element
+to
+</del>
+<ins class="diff-chg">the
+value
+of
+the
+</ins><a class="tref internalDFN" title="active_graph" href="#dfn-active_graph"><ins class="diff-chg">
+active
+graph
+</ins></a><ins class="diff-chg">
+member
+of
+</ins>
+<em>
+<del class="diff-old">list
+and
+return.
+</del>
+<ins class="diff-chg">nodeMap
+</ins></em>.
+</li>
+<li>
+If
+<del class="diff-old">id
+is
+null
+and
+if
+the
+</del>
+<ins class="diff-chg">it
+has
+a
+</ins>
+<code>
+<del class="diff-old">@id
+</del>
+<ins class="diff-chg">@type
+</ins>
+</code>
+<del class="diff-old">property
+exists
+and
+is
+an
+IRI
+,
+set
+</del>
+<ins class="diff-chg">member,
+perform
+for
+each
+</ins>
+<em>
+<del class="diff-old">id
+</del>
+<ins class="diff-chg">item
+</ins>
+</em>
+<del class="diff-old">to
+its
+value,
+otherwise
+set
+it
+to
+a
+blank
+node
+identifier
+created
+by
+</del>
+the
+<del class="diff-old">Generate
+Blank
+Node
+Identifier
+algorithm.
+</del>
+<ins class="diff-chg">following
+steps:
+</ins><ol class="algorithm">
+<li>
+If
+<em>
+<del class="diff-old">list
+</del>
+<ins class="diff-chg">item
+</ins>
+</em>
+is
+<del class="diff-old">not
+null
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-chg">
+blank
+node
+identifier
+</ins>
+</a>,
+<del class="diff-old">append
+</del>
+<ins class="diff-chg">replace
+it
+with
+</ins>
+a
+<a href="#generate-blank-node-identifier">
+new
+<ins class="diff-chg">blank
+</ins>
+node
+<del class="diff-old">reference
+to
+list
+using
+id
+as
+the
+value
+for
+@id
+.
+</del>
+<ins class="diff-chg">identifier
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">Let
+nodes
+be
+the
+value
+in
+nodeMap
+where
+the
+key
+is
+</del>
+<ins class="diff-chg">If
+</ins>
+<em>
+<del class="diff-old">graph
+</del>
+<ins class="diff-chg">activeGraph
+</ins>
+</em>
+<del class="diff-old">;
+if
+</del>
+<ins class="diff-chg">has
+</ins>
+no
+<del class="diff-old">such
+</del>
+<ins class="diff-chg">member
+</ins><em><ins class="diff-chg">
+item
+</ins></em>,<ins class="diff-chg">
+create
+it
+and
+initialize
+its
+</ins>
+value
+<del class="diff-old">exists,
+insert
+</del>
+<ins class="diff-chg">to
+</ins>
+a
+<del class="diff-old">new
+</del>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+<del class="diff-old">for
+</del>
+<ins class="diff-chg">consisting
+of
+a
+single
+member
+</ins><code><ins class="diff-chg">
+@id
+</ins></code><ins class="diff-chg">
+with
+</ins>
+the
+<del class="diff-old">key
+</del>
+<ins class="diff-chg">value
+</ins>
+<em>
+<del class="diff-old">graph
+</del>
+<ins class="diff-chg">item
+</ins>
+</em>.
+</li>
+</ol>
+</li>
+<li>
+If
+<em>
+<del class="diff-old">id
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+<ins class="diff-new">has
+an
+</ins><code><ins class="diff-new">
+@value
+</ins></code><ins class="diff-new">
+member,
+perform
+the
+following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-new">
+If
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a>
+is
+<del class="diff-old">not
+in
+nodes
+,
+create
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins></a>,<a href="#generate-blank-node-identifier"><ins class="diff-chg">
+generate
+</ins>
+a
+<del class="diff-old">new
+JSON
+object
+</del>
+<ins class="diff-chg">blank
+</ins>
+node
+<del class="diff-old">with
+</del>
+<ins class="diff-chg">identifier
+</ins></a>
+<em>
+id
+</em>
+<del class="diff-old">as
+the
+value
+for
+@id
+.
+Let
+</del>
+<ins class="diff-chg">and
+store
+</ins>
+<em>
+<del class="diff-old">node
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">be
+the
+</del>
+<ins class="diff-chg">as
+</ins>
+value
+of
+<ins class="diff-new">the
+member
+</ins>
+<em>
+id
+</em>
+in
+<em>
+<del class="diff-old">nodes
+</del>
+<ins class="diff-chg">activeGraph
+</ins>
+</em>.
+<div class="issue">
+<div class="issue-title">
+<a href="https://github.com/json-ld/json-ld.org/issues/207">
+<span>
+<ins class="diff-new">Issue
+207
+</ins></span></a></div><p class=""><ins class="diff-new">
+Handling
+of
+free-floating
+values
+is
+still
+being
+discussed.
+</ins></p></div>
+</li>
+<li>
+<del class="diff-old">For
+each
+property
+that
+is
+not
+@id
+and
+each
+</del>
+<ins class="diff-chg">Otherwise,
+if
+no
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">list
+</ins>
+</em>
+<del class="diff-old">in
+</del>
+<ins class="diff-chg">has
+been
+passed,
+merge
+</ins>
+<em>
+element
+</em>
+<del class="diff-old">ordered
+by
+</del>
+<ins class="diff-chg">into
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+</ins>
+property
+<del class="diff-old">:
+</del>
+</a>
+<ins class="diff-chg">member
+of
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-chg">
+active
+subject
+</ins></a><ins class="diff-chg">
+in
+</ins><em><ins class="diff-chg">
+activeGraph
+</ins></em>.</li>
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">Otherwise,
+append
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">to
+the
+</ins>
+<code>
+<del class="diff-old">@graph
+,
+recursively
+call
+this
+algorithm
+passing
+value
+for
+element
+,
+nodeMap
+,
+null
+for
+</del>
+<ins class="diff-chg">@list
+</ins></code><ins class="diff-chg">
+member
+of
+</ins>
+<em>
+list
+<del class="diff-old">and
+</del>
+</em>.
+</li>
+</ol>
+</li>
+<li>
+<ins class="diff-chg">Otherwise,
+</ins>
+if
+<em>
+<del class="diff-old">graph
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">has
+an
+</ins>
+<code>
+<del class="diff-old">@merged
+</del>
+<ins class="diff-chg">@list
+</ins>
+</code>
+<del class="diff-old">use
+graph
+,
+otherwise
+use
+id
+for
+graph
+and
+then
+continue.
+</del>
+<ins class="diff-chg">member,
+perform
+the
+following
+steps:
+</ins><ol class="algorithm">
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">Initialize
+a
+new
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">result
+</ins>
+</em>
+<del class="diff-old">is
+not
+@type
+and
+is
+</del>
+<ins class="diff-chg">having
+</ins>
+a
+<del class="diff-old">keyword,
+merge
+</del>
+<ins class="diff-chg">single
+member
+</ins>
+<code>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">@list
+</ins>
+</code>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">whose
+</ins>
+value
+<del class="diff-old">into
+node
+and
+then
+continue.
+</del>
+<ins class="diff-chg">is
+initialized
+to
+an
+empty
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">For
+each
+</del>
+<ins class="diff-chg">Recursively
+call
+this
+algorithm
+passing
+the
+</ins>
+value
+<ins class="diff-new">of
+</ins>
+<em>
+<del class="diff-old">v
+</del>
+<ins class="diff-chg">element's
+</ins>
+</em>
+<del class="diff-old">in
+the
+array
+</del>
+<code>
+<ins class="diff-chg">@list
+</ins></code><ins class="diff-chg">
+member
+as
+new
+</ins>
+<em>
+<del class="diff-old">value
+:
+If
+</del>
+<ins class="diff-chg">element
+</ins></em><ins class="diff-chg">
+and
+</ins>
+<em>
+<del class="diff-old">v
+</del>
+<ins class="diff-chg">result
+</ins>
+</em>
+<del class="diff-old">is
+a
+node
+definition
+or
+node
+reference
+:
+</del>
+<ins class="diff-chg">as
+</ins><em><ins class="diff-chg">
+list
+</ins></em>.</li>
+<li>
+If
+<del class="diff-old">the
+</del>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+<ins class="diff-chg">active
+</ins>
+property
+<del class="diff-old">@id
+is
+not
+an
+IRI
+</del>
+</a>
+<del class="diff-old">or
+it
+does
+not
+exist,
+map
+v
+to
+a
+</del>
+<ins class="diff-chg">is
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,
+<a href="#generate-blank-node-identifier">
+<del class="diff-old">new
+</del>
+<ins class="diff-chg">generate
+a
+</ins>
+blank
+node
+identifier
+</a>
+<em>
+<del class="diff-old">name
+</del>
+<ins class="diff-chg">id
+</ins>
+</em>
+<del class="diff-old">to
+avoid
+collisions.
+If
+one
+does
+not
+already
+exist,
+add
+a
+node
+reference
+for
+</del>
+<ins class="diff-chg">and
+store
+</ins>
+<em>
+<del class="diff-old">v
+</del>
+<ins class="diff-chg">result
+</ins>
+</em>
+<del class="diff-old">into
+</del>
+<ins class="diff-chg">as
+value
+of
+the
+member
+</ins>
+<em>
+<del class="diff-old">node
+</del>
+<ins class="diff-chg">id
+</ins>
+</em>
+<del class="diff-old">for
+</del>
+<ins class="diff-chg">in
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">activeGraph
+</ins>
+</em>.
+<div class="issue">
+<div class="issue-title">
+<a href="https://github.com/json-ld/json-ld.org/issues/207">
+<span>
+<ins class="diff-new">Issue
+207
+</ins></span></a></div><p class=""><ins class="diff-new">
+Handling
+of
+free-floating
+values
+is
+still
+being
+discussed.
+</ins></p></div>
+</li>
+<li>
+<del class="diff-old">Recursively
+call
+this
+algorithm
+passing
+</del>
+<ins class="diff-chg">Otherwise,
+add
+</ins>
+<em>
+<del class="diff-old">v
+</del>
+<ins class="diff-chg">result
+</ins>
+</em>
+<del class="diff-old">for
+</del>
+<ins class="diff-chg">to
+the
+the
+</ins>
+value
+<del class="diff-old">,
+nodeMap
+,
+graph
+,
+null
+</del>
+<ins class="diff-chg">of
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins>
+</a>
+<del class="diff-old">for
+list
+,
+and
+name
+for
+</del>
+<ins class="diff-chg">member
+of
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-chg">
+active
+subject
+</ins></a><ins class="diff-chg">
+in
+</ins>
+<em>
+<del class="diff-old">id
+</del>
+<ins class="diff-chg">activeGraph
+</ins>
+</em>.
+</li>
+</ol>
+</li>
+<li>
+Otherwise
+<del class="diff-old">if
+</del>
+<em>
+<del class="diff-old">v
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">has
+</del>
+<ins class="diff-chg">is
+a
+</ins><a class="tref internalDFN" title="node_object" href="#dfn-node_object"><ins class="diff-chg">
+node
+object
+</ins></a>,<ins class="diff-chg">
+perform
+</ins>
+the
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+has
+an
+</ins>
+<code>
+<del class="diff-old">@list
+</del>
+<ins class="diff-chg">@id
+</ins>
+</code>
+<del class="diff-old">then
+recursively
+call
+this
+algorithm
+with
+the
+</del>
+<ins class="diff-chg">member,
+store
+its
+</ins>
+value
+<del class="diff-old">of
+@list
+as
+</del>
+<ins class="diff-chg">in
+</ins>
+<em>
+<del class="diff-old">element
+,
+</del>
+<ins class="diff-chg">id
+</ins></em><ins class="diff-chg">
+and
+remove
+the
+member
+from
+</ins>
+<em>
+<del class="diff-old">nodeMap
+,
+</del>
+<ins class="diff-chg">element
+</ins></em>.<ins class="diff-chg">
+If
+</ins>
+<em>
+<del class="diff-old">graph
+,
+and
+</del>
+<ins class="diff-chg">id
+</ins></em><ins class="diff-chg">
+is
+a
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-chg">
+blank
+node
+identifier
+</ins></a>,<ins class="diff-chg">
+replace
+it
+with
+</ins><a href="#generate-blank-node-identifier">
+a
+new
+<del class="diff-old">array
+flattenedList
+</del>
+<ins class="diff-chg">blank
+node
+identifier
+</ins></a>.</li><li><ins class="diff-chg">
+Otherwise
+</ins><a href="#generate-blank-node-identifier"><ins class="diff-chg">
+generate
+a
+new
+blank
+node
+identifier
+</ins></a><ins class="diff-chg">
+and
+store
+it
+</ins>
+as
+<em>
+<del class="diff-old">list
+</del>
+<ins class="diff-chg">id
+</ins>
+</em>.
+<del class="diff-old">Create
+</del>
+</li>
+<li>
+<ins class="diff-chg">If
+</ins><em><ins class="diff-chg">
+activeGraph
+</ins></em><ins class="diff-chg">
+does
+not
+contain
+a
+member
+</ins><em><ins class="diff-chg">
+id
+</ins></em>,<ins class="diff-chg">
+create
+one
+and
+initialize
+it
+to
+</ins>
+a
+<del class="diff-old">new
+</del>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+<del class="diff-old">with
+the
+property
+</del>
+<ins class="diff-chg">consisting
+of
+a
+single
+member
+</ins>
+<code>
+<del class="diff-old">@list
+</del>
+<ins class="diff-chg">@id
+</ins>
+</code>
+<ins class="diff-new">whose
+value
+is
+</ins>
+set
+to
+<em>
+<del class="diff-old">flattenedList
+and
+add
+it
+to
+node
+for
+property
+</del>
+<ins class="diff-chg">id
+</ins>
+</em>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+if
+</del>
+<ins class="diff-chg">If
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+</ins>
+property
+<del class="diff-old">is
+@type
+and
+v
+</del>
+</a>
+is
+not
+<del class="diff-old">an
+IRI
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins>
+</a>,
+<del class="diff-old">generate
+</del>
+<ins class="diff-chg">perform
+the
+following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+Create
+</ins>
+a
+new
+<del class="diff-old">blank
+node
+identifier
+</del>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins>
+</a>
+<del class="diff-old">and
+add
+it
+to
+</del>
+<em>
+<del class="diff-old">node
+</del>
+<ins class="diff-chg">reference
+</ins>
+</em>
+<del class="diff-old">for
+</del>
+<ins class="diff-chg">consisting
+of
+a
+single
+member
+</ins><code><ins class="diff-chg">
+@id
+</ins></code><ins class="diff-chg">
+whose
+value
+is
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">id
+</ins>
+</em>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+add
+</del>
+<ins class="diff-chg">If
+no
+</ins>
+<em>
+<del class="diff-old">v
+</del>
+<ins class="diff-chg">list
+</ins>
+</em>
+<del class="diff-old">to
+</del>
+<ins class="diff-chg">has
+been
+passed,
+merge
+</ins>
+<em>
+<del class="diff-old">node
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">for
+</del>
+<ins class="diff-chg">into
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+</ins>
+property
+</a>
+<ins class="diff-new">member
+of
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a><ins class="diff-new">
+in
+</ins><em><ins class="diff-new">
+activeGraph
+</ins>
+</em>.
+</li>
+<li>
+<ins class="diff-chg">Otherwise,
+append
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+to
+the
+</ins><code><ins class="diff-chg">
+@list
+</ins></code><ins class="diff-chg">
+member
+of
+</ins><em><ins class="diff-chg">
+list
+</ins></em>.
+</li>
+</ol>
+</li>
+<del class="diff-old">After
+the
+above
+outlined
+algorithm
+</del>
+<li>
+<ins class="diff-chg">If
+</ins><em><ins class="diff-chg">
+element
+</ins></em>
+has
+<del class="diff-old">been
+executed,
+the
+node
+map
+for
+all
+graphs
+including
+</del>
+<ins class="diff-chg">an
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+member,
+merge
+each
+value
+into
+</ins>
+the
+<del class="diff-old">default
+graph
+are
+contained
+</del>
+<code>
+<ins class="diff-chg">@type
+</ins></code><ins class="diff-chg">
+of
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-chg">
+active
+subject
+</ins></a>
+in
+<em>
+<del class="diff-old">nodeMap
+</del>
+<ins class="diff-chg">activeGraph
+</ins>
+</em>.
+<del class="diff-old">To
+also
+create
+the
+node
+map
+for
+the
+merged
+graph,
+execute
+</del>
+<ins class="diff-chg">Then
+remove
+</ins>
+the
+<del class="diff-old">algorithm
+again,
+but
+pass
+</del>
+<code>
+<del class="diff-old">@merged
+</del>
+<ins class="diff-chg">@type
+</ins>
+</code>
+<del class="diff-old">for
+</del>
+<ins class="diff-chg">member
+from
+</ins>
+<em>
+<del class="diff-old">graph
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>.
+<del class="diff-old">4.9.3
+Generate
+Blank
+Node
+Identifier
+This
+algorithm
+is
+used
+by
+</del>
+</li>
+<li>
+<ins class="diff-chg">If
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+has
+an
+</ins><code><ins class="diff-chg">
+@annotation
+</ins></code><ins class="diff-chg">
+member,
+set
+</ins>
+the
+<del class="diff-old">Node
+Map
+Generation
+Algorithm
+</del>
+<code>
+<ins class="diff-chg">@annotation
+</ins></code><ins class="diff-chg">
+of
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-chg">
+active
+subject
+</ins>
+</a>
+<ins class="diff-new">in
+</ins><em><ins class="diff-new">
+activeGraph
+</ins></em>
+to
+<del class="diff-old">deterministically
+name
+blank
+node
+</del>
+<ins class="diff-chg">its
+value.
+If
+such
+a
+member
+already
+exists
+in
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-chg">
+active
+subject
+</ins>
+</a>
+<del class="diff-old">identifiers.
+It
+uses
+</del>
+<ins class="diff-chg">and
+has
+a
+different
+value,
+raise
+</ins>
+a
+<code class="error">
+<ins class="diff-new">CONFLICTING_ANNOTATION
+</ins></code><ins class="diff-new">
+error.
+Otherwise
+continue
+and
+remove
+the
+</ins><code><ins class="diff-new">
+@annotation
+</ins></code><ins class="diff-new">
+from
+</ins>
+<em>
+<del class="diff-old">identifier
+map
+</del>
+<ins class="diff-chg">element
+</ins></em>.</li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+element
+</ins>
+</em>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">has
+an
+</ins><code><ins class="diff-chg">
+@graph
+</ins></code><ins class="diff-chg">
+member,
+recursively
+invoke
+this
+algorithm
+passing
+the
+value
+of
+the
+</ins><code><ins class="diff-chg">
+@graph
+</ins></code><ins class="diff-chg">
+member
+as
+new
+</ins>
+<em>
+<del class="diff-old">prefix
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+and
+<del class="diff-old">takes
+a
+possibly
+null
+identifier
+and
+returns
+a
+</del>
+<em>
+<ins class="diff-chg">id
+</ins></em><ins class="diff-chg">
+as
+</ins>
+new
+<del class="diff-old">identifier
+based
+on
+</del>
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+<ins class="diff-chg">active
+subject
+</ins></a>.<ins class="diff-chg">
+Then
+remove
+the
+</ins><code><ins class="diff-chg">
+@graph
+</ins></code><ins class="diff-chg">
+member
+from
+</ins>
+<em>
+<del class="diff-old">prefix
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>.
+<del class="diff-old">The
+variable
+</del>
+</li>
+<li>
+<ins class="diff-chg">Finally
+for
+each
+</ins>
+<em>
+<del class="diff-old">next
+identifier
+</del>
+<ins class="diff-chg">property
+</ins>
+</em>
+<del class="diff-old">is
+initialized
+to
+</del>
+<ins class="diff-chg">-
+</ins>
+<em>
+<del class="diff-old">prefix
+appended
+with
+0
+.
+The
+default
+</del>
+value
+<del class="diff-old">of
+</del>
+</em>
+<ins class="diff-chg">pair
+in
+</ins>
+<em>
+<del class="diff-old">prefix
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">is
+_:t
+.
+</del>
+<ins class="diff-chg">ordered
+by
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+perform
+the
+following
+steps:
+</ins>
+<ol class="algorithm">
+<li>
+If
+<ins class="diff-new">no
+</ins><em><ins class="diff-new">
+property
+</ins></em><ins class="diff-new">
+member
+exists
+in
+</ins>
+the
+<del class="diff-old">old
+identifier
+is
+not
+null
+</del>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins>
+</a>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">which
+</ins>
+is
+<del class="diff-old">in
+the
+identifier
+map
+,
+return
+</del>
+the
+<del class="diff-old">mapped
+identifier.
+Otherwise,
+if
+</del>
+<ins class="diff-chg">value
+of
+</ins>
+the
+<del class="diff-old">old
+identifier
+is
+not
+null
+,
+create
+a
+new
+entry
+in
+</del>
+<em>
+<del class="diff-old">identifier
+map
+</del>
+<ins class="diff-chg">id
+</ins>
+</em>
+<del class="diff-old">initialized
+to
+the
+current
+value
+</del>
+<ins class="diff-chg">member
+</ins>
+of
+<em>
+<del class="diff-old">next
+identifier
+.
+Increment
+next
+identifier
+</del>
+<ins class="diff-chg">activeGraph
+</ins>
+</em>
+<del class="diff-old">by
+adding
+one
+to
+the
+integer
+suffix.
+Return
+</del>
+<ins class="diff-chg">create
+</ins>
+the
+<del class="diff-old">mapped
+identifier.
+</del>
+<ins class="diff-chg">member
+and
+initialize
+its
+value
+to
+an
+empty
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+increment
+</del>
+<ins class="diff-chg">Recursively
+invoke
+this
+algorithm
+passing
+</ins>
+<em>
+<del class="diff-old">next
+identifier
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+<del class="diff-old">by
+adding
+one
+to
+the
+integer
+suffix
+</del>
+<ins class="diff-chg">as
+new
+</ins><em><ins class="diff-chg">
+element
+</ins></em>,<em><ins class="diff-chg">
+id
+</ins></em><ins class="diff-chg">
+as
+new
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-chg">
+active
+subject
+</ins></a>,
+and
+<del class="diff-old">return
+its
+original
+value.
+</del>
+<em>
+<ins class="diff-chg">property
+</ins></em><ins class="diff-chg">
+as
+new
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a>.</li></ol></li></ol>
+</li>
+</ol>
+</section>
+<section id="rdf-conversion-algorithms">
+<h3>
+<span class="secno">
+<del class="diff-old">4.10
+</del>
+<ins class="diff-chg">5.16
+</ins>
+</span>
+RDF
+Conversion
+<ins class="diff-new">Algorithms
+</ins>
+</h3>
+<p>
+<del class="diff-old">A
+JSON-LD
+document
+may
+be
+converted
+between
+other
+RDF-compatible
+document
+formats
+using
+the
+algorithms
+specified
+in
+this
+section.
+The
+JSON-LD
+Processing
+Model
+</del>
+<ins class="diff-chg">This
+specification
+</ins>
+describes
+<del class="diff-old">processing
+rules
+for
+extracting
+RDF
+from
+a
+</del>
+<ins class="diff-chg">algorithms
+to
+transform
+</ins>
+JSON-LD
+<del class="diff-old">document,
+and
+for
+transforming
+</del>
+<ins class="diff-chg">documents
+to
+</ins>
+an
+array
+of
+<del class="diff-old">Quad
+</del>
+<ins class="diff-chg">RDF
+</ins><a class="tref internalDFN" title="quad" href="#dfn-quad"><ins class="diff-chg">
+quads
+</ins>
+</a>
+<del class="diff-old">retrieved
+by
+processing
+another
+serialization
+format
+into
+JSON-LD.
+</del>
+<ins class="diff-chg">and
+vice-versa.
+</ins>
+Note
+that
+many
+uses
+of
+JSON-LD
+may
+not
+require
+generation
+of
+RDF.
+</p>
+<p>
+The
+processing
+algorithms
+described
+in
+this
+section
+are
+provided
+in
+order
+to
+demonstrate
+how
+one
+might
+implement
+a
+JSON-LD
+to
+RDF
+processor.
+Conformant
+implementations
+are
+only
+required
+to
+produce
+the
+same
+type
+and
+number
+of
+<a class="tref internalDFN" title="quad" href="#dfn-quad">
+quads
+<del class="diff-old">during
+the
+output
+process
+and
+</del>
+</a>
+<ins class="diff-chg">but
+</ins>
+are
+not
+required
+to
+implement
+the
+algorithm
+exactly
+as
+described.
+</p>
+<del class="diff-old">4.10.1
+Overview
+This
+section
+is
+non-normative.
+JSON-LD
+is
+intended
+to
+have
+an
+easy
+to
+parse
+grammar
+that
+closely
+models
+existing
+practice
+in
+using
+JSON
+for
+describing
+object
+representations.
+This
+allows
+the
+use
+of
+existing
+libraries
+for
+parsing
+JSON.
+As
+with
+other
+grammars
+used
+for
+describing
+Linked
+Data
+,
+a
+key
+concept
+is
+that
+of
+a
+node
+in
+a
+linked
+data
+graph
+.
+Nodes
+may
+be
+of
+three
+basic
+types.
+The
+first
+is
+the
+IRI
+</del>
+<div class="issue">
+<del class="diff-old">,
+which
+is
+used
+to
+refer
+to
+node
+s
+in
+other
+linked
+data
+graph
+s.
+The
+second
+is
+the
+blank
+node
+,
+which
+are
+nodes
+for
+which
+an
+external
+name
+does
+not
+exist,
+or
+is
+not
+known.
+The
+third
+is
+a
+Literal
+,
+which
+express
+values
+such
+as
+strings,
+dates
+and
+other
+information
+having
+a
+lexical
+form,
+possibly
+including
+an
+explicit
+language
+or
+datatype.
+Data
+described
+with
+JSON-LD
+may
+be
+considered
+to
+be
+a
+graph
+made
+up
+of
+subject
+and
+object
+nodes
+related
+via
+a
+property
+node
+.
+Specific
+implementations
+may
+also
+choose
+to
+operate
+on
+the
+document
+as
+a
+normal
+JSON
+description
+of
+objects
+having
+attributes.
+Both
+approaches
+are
+valid
+ways
+to
+interact
+with
+JSON-LD
+documents.
+</del>
+<div class="issue-title">
+<del class="diff-old">4.10.2
+</del>
+<span>
+<ins class="diff-chg">Issue
+</ins>
+</span>
+<del class="diff-old">Parsing
+Examples
+This
+section
+is
+non-normative.
+The
+following
+examples
+show
+simple
+transformations
+of
+JSON-LD
+documents
+to
+Turtle
+[
+TURTLE-TR
+].
+The
+first
+example
+uses
+a
+simple
+document
+containing
+a
+simple
+FOAF
+profile:
+{
+ "@context": {"foaf": "http://xmlns.com/foaf/0.1/"},
+ "@id": "http://greggkellogg.net/foaf#me",
+ "@type": "foaf:Person",
+ "foaf:name": "Gregg Kellogg",
+ "foaf:knows": {
+ "@type": "foaf:Person",
+ "foaf:name": "Manu Sporny"
+ }
+}
+This
+translates
+fairly
+directly
+to
+a
+similar
+Turtle
+document:
+@prefix foaf: <http://xmlns.com/foaf/0.1/>.
+<http://greggkellogg.net/foaf#me> a foaf:Person;
+ foaf:name "Gregg Kellogg";
+foaf:knows
+[
+a
+foaf:Person;
+foaf:name
+"Manu
+Sporny"].
+The
+actual
+parsing
+steps
+first
+require
+that
+the
+JSON-LD
+document
+be
+expanded,
+to
+eliminate
+the
+@context
+:
+[{
+ "@id": "http://greggkellogg.net/foaf#me",
+ "@type": ["http://xmlns.com/foaf/0.1/Person"],
+ "http://xmlns.com/foaf/0.1/name": [{"@value": "Gregg Kellogg"}],
+ "http://xmlns.com/foaf/0.1/knows": [{
+ "@type": ["http://xmlns.com/foaf/0.1/Person"],
+ "http://xmlns.com/foaf/0.1/name": [{"@value": "Manu Sporny"}]
+ }]
+}]
+</del>
+</div>
+<del class="diff-old">The
+process
+of
+translating
+this
+to
+RDF
+then
+operates
+over
+each
+node
+definition
+to
+find
+a
+subject,
+each
+property
+to
+find
+an
+RDF
+predicate
+,
+and
+each
+value
+of
+that
+property
+to
+find
+an
+object
+.
+In
+this
+case,
+each
+property
+has
+just
+a
+single
+object:
+foaf:name
+identifies
+a
+literal
+,
+and
+foaf:knows
+identifies
+a
+second
+node
+definition
+similar
+to
+Turtle's
+blankNodePropertyList
+.
+After
+expansion,
+JSON-LD
+numbers
+,
+booleans
+,
+typed
+literals
+,
+language-tagged-strings
+,
+and
+IRIs
+become
+explicit,
+and
+can
+be
+directly
+transformed
+into
+their
+RDF
+representations.
+[{
+ "@id": "http://greggkellogg.net/foaf#me",
+ "@type": ["http://xmlns.com/foaf/0.1/Person"],
+ "http://xmlns.com/foaf/0.1/name": [{"@value": "Gregg Kellogg"}],
+ "http://xmlns.com/foaf/0.1/currentProject": [{"@id": "http://json-ld.org/"}],
+ "http://xmlns.com/foaf/0.1/birthday": [{
+ "@value": "1957-02-27",
+ "@type": "http://www.w3.org/2001/XMLSchema#date"
+ }],
+ "http://xmlns.com/foaf/0.1/knows": [{
+ "@type": ["http://xmlns.com/foaf/0.1/Person"],
+ "http://xmlns.com/foaf/0.1/name": [{"@value": "Manu Sporny"}]
+ }]
+}]
+</del>
+<del class="diff-old">Translates
+to:
+</del>
+<p class="">
+<ins class="diff-chg">This
+algorithm
+hasn't
+been
+updated
+yet.
+</ins>
+</p>
+<del class="diff-old">@prefix foaf: <http://xmlns.com/foaf/0.1/>.
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
+<http://greggkellogg.net/foaf#me> a foaf:Person;
+ foaf:name "Gregg Kellogg";
+ foaf:currentProject <http://json-ld.org/>;
+ foaf:birthday "1957-02-27"^^xsd:date;
+foaf:knows
+[
+a
+foaf:Person;
+foaf:name
+"Manu
+Sporny"].
+</del>
+</div>
+<section id="convert-to-rdf-algorithm">
+<h4>
+<span class="secno">
+<del class="diff-old">4.10.3
+</del>
+<ins class="diff-chg">5.16.1
+</ins>
+</span>
+Convert
+to
+RDF
+Algorithm
+</h4>
+<p>
+The
+algorithm
+below
+is
+designed
+for
+in-memory
+implementations
+with
+random
+access
+to
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+elements.
+</p>
+<p>
+A
+conforming
+JSON-LD
+processor
+implementing
+RDF
+conversion
+<em class="rfc2119" title="must">
+must
+</em>
+implement
+a
+processing
+algorithm
+that
+results
+in
+the
+same
+set
+of
+RDF
+<a class="tref internalDFN" title="quad" href="#dfn-quad">
+<del class="diff-old">Quads
+</del>
+<ins class="diff-chg">quads
+</ins>
+</a>
+that
+the
+following
+algorithm
+generates:
+</p>
+<p>
+The
+algorithm
+takes
+four
+input
+variables:
+a
+<em>
+element
+</em>
+to
+be
+converted,
+an
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+<a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">
+graph
+name
+</a>.
+To
+begin,
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+<a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">
+graph
+name
+</a>
+are
+set
+to
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>,
+and
+<em>
+element
+</em>
+is
+set
+to
+the
+result
+of
+performing
+the
+<a href="#expansion-algorithm">
+Expansion
+Algorithm
+</a>
+on
+the
+<a class="tref internalDFN" title="json-ld_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+<del class="diff-old">.
+</del>
+</a>
+<ins class="diff-chg">which
+is
+expected
+to
+be
+a
+a
+well-formed
+JSON-LD
+document
+as
+defined
+in
+[
+</ins><cite><a class="bibref" href="#bib-JSON-LD"><ins class="diff-chg">
+JSON-LD
+</ins></a></cite><ins class="diff-chg">
+].
+</ins>
+This
+removes
+any
+existing
+context
+to
+allow
+the
+given
+context
+to
+be
+cleanly
+applied.
+</p>
+<ol class="algorithm">
+<li id="processing-step-associative">
+If
+<em>
+element
+</em>
+is
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>,
+perform
+the
+following
+steps:
+<ol class="algorithm">
+<li>
+Set
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>.
+</li>
+<li>
+If
+<em>
+element
+</em>
+has
+a
+<code>
+@value
+</code>
+property:
+<ol class="algorithm">
+<li>
+If
+the
+value
+of
+<code>
+@value
+</code>
+is
+a
+<a class="tref internalDFN" title="number" href="#dfn-number">
+number
+</a>,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+a
+<a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">
+typed
+<del class="diff-old">literal
+</del>
+<ins class="diff-chg">value
+</ins>
+</a>
+using
+a
+<del class="diff-old">string
+representation
+</del>
+<a class="tref internalDFN" title="canonical_lexical_form" href="#dfn-canonical_lexical_form">
+<ins class="diff-chg">canonical
+lexical
+form
+</ins></a>
+of
+the
+value
+as
+defined
+in
+the
+section
+<a href="#data-round-tripping">
+Data
+Round
+Tripping
+</a>.
+Set
+datatype
+to
+the
+value
+of
+the
+<code>
+@type
+</code>
+property
+if
+it
+exists,
+otherwise
+either
+<code>
+xsd:integer
+</code>
+or
+<code>
+xsd:double
+</code>,
+depending
+on
+if
+the
+value
+contains
+a
+fractional
+and/or
+an
+exponential
+component.
+</li>
+<li>
+Otherwise,
+if
+the
+value
+of
+<code>
+@value
+</code>
+is
+<strong>
+true
+</strong>
+or
+<strong>
+false
+</strong>,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+a
+<a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">
+typed
+<del class="diff-old">literal
+</del>
+<ins class="diff-chg">value
+</ins>
+</a>
+created
+from
+the
+<del class="diff-old">string
+representation
+</del>
+<a class="tref internalDFN" title="canonical_lexical_form" href="#dfn-canonical_lexical_form">
+<ins class="diff-chg">canonical
+lexical
+form
+</ins></a>
+of
+the
+value.
+Set
+datatype
+to
+the
+value
+of
+the
+<code>
+@type
+</code>
+property
+if
+it
+exists,
+otherwise
+<code>
+xsd:boolean
+</code>.
+</li>
+<li>
+Otherwise,
+if
+<em>
+element
+</em>
+contains
+a
+<code>
+@type
+</code>
+property,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+a
+<a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">
+typed
+<del class="diff-old">literal
+</del>
+<ins class="diff-chg">value
+</ins>
+</a>.
+</li>
+<li>
+Otherwise,
+if
+<em>
+element
+</em>
+contains
+a
+<code>
+@language
+</code>
+property,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+a
+<a class="tref internalDFN" title="language-tagged_string" href="#dfn-language-tagged_string">
+language-tagged
+string
+</a>.
+</li>
+<li>
+Otherwise,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+a
+<a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">
+typed
+<del class="diff-old">literal
+</del>
+<ins class="diff-chg">value
+</ins>
+</a>
+using
+<code>
+xsd:string
+</code>
+as
+the
+datatype.
+</li>
+</ol>
+</li>
+<li>
+If
+<em>
+element
+</em>
+has
+a
+<code>
+@list
+</code>
+property
+the
+value
+<em class="rfc2119" title="must">
+must
+</em>
+be
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>.
+Process
+its
+value
+as
+a
+list
+as
+described
+in
+<a href="#list-conversion">
+List
+Conversion
+</a>
+using
+the
+return
+value
+as
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+</li>
+<li>
+If
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+is
+not
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>:
+<ol class="algorithm">
+<li>
+If
+neither
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+nor
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+are
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>,
+generate
+a
+<a class="tref internalDFN" title="quad" href="#dfn-quad">
+Quad
+</a>
+representing
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>,
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>,
+and
+<a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">
+graph
+name
+</a>.
+</li>
+<li>
+Return
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+</li>
+</ol>
+</li>
+<li id="processing-step-subject">
+If
+<em>
+element
+</em>
+has
+a
+<code>
+@id
+</code>
+property,
+the
+value
+<em class="rfc2119" title="must">
+must
+</em>
+be
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>,
+set
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+to
+the
+previously
+expanded
+value
+(either
+a
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>
+or
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+).
+</li>
+<li>
+Otherwise,
+if
+<em>
+element
+</em>
+does
+not
+have
+a
+<code>
+@id
+</code>
+property,
+set
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+to
+newly
+generated
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>.
+</li>
+<li>
+Process
+each
+<em>
+property
+</em>
+and
+<em>
+value
+</em>
+in
+<em>
+element
+</em>,
+ordered
+by
+<em>
+property
+</em>,
+as
+follows:
+<ol class="algorithm">
+<li>
+If
+<em>
+property
+</em>
+is
+<code>
+@type
+</code>,
+set
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+to
+<code>
+rdf:type
+</code>.
+</li>
+<li>
+Otherwise,
+if
+<em>
+property
+</em>
+is
+<code>
+@graph
+</code>,
+process
+<em>
+value
+</em>
+algorithm
+recursively,
+using
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+as
+<a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">
+graph
+name
+</a>
+and
+null
+values
+for
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+then
+proceed
+to
+next
+property.
+</li>
+<li>
+Otherwise,
+if
+<em>
+property
+</em>
+is
+a
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>,
+skip
+this
+step.
+</li>
+<li>
+Otherwise,
+set
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+to
+the
+<a class="tref internalDFN" title="expanded_iri_form" href="#dfn-expanded_iri_form">
+<ins class="diff-new">expanded
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">form
+</ins></a>
+of
+<em>
+property
+</em>.
+</li>
+<li>
+Process
+<em>
+value
+</em>
+recursively
+using
+this
+algorithm,
+passing
+copies
+of
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+<a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">
+graph
+name
+</a>.
+</li>
+</ol>
+</li>
+<li>
+Set
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>.
+</li>
+</ol>
+</li>
+<li>
+Otherwise,
+if
+<em>
+element
+</em>
+is
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>,
+process
+each
+value
+in
+the
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+as
+follows,
+process
+<em>
+element
+</em>
+recursively
+using
+this
+algorithm,
+using
+copies
+of
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>,
+and
+<a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">
+graph
+name
+</a>.
+</li>
+<li>
+Otherwise,
+if
+<em>
+element
+</em>
+is
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>,
+then
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+must
+be
+<code>
+rdf:type
+</code>
+so
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+</li>
+<li>
+If
+any
+of
+these
+steps
+created
+an
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+and
+neither
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+nor
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+are
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>,
+generate
+a
+<a class="tref internalDFN" title="quad" href="#dfn-quad">
+Quad
+</a>
+using
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>,
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+and
+<a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">
+graph
+name
+</a>.
+</li>
+<li>
+Return
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+</li>
+</ol>
+</section>
+<section id="list-conversion" typeof="bibo:Chapter" resource="#list-conversion" rel="bibo:chapter">
+<h4>
+<span class="secno">
+<del class="diff-old">4.10.4
+</del>
+<ins class="diff-chg">5.16.2
+</ins>
+</span>
+List
+Conversion
+</h4>
+<p>
+List
+Conversion
+is
+the
+process
+of
+taking
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+of
+values
+and
+adding
+them
+to
+a
+newly
+created
+<cite>
+<a href="http://www.w3.org/TR/rdf-schema/#ch_collectionvocab">
+RDF
+Collection
+</a>
+</cite>
+(see
+[
+<cite>
+<a class="bibref" href="#bib-RDF-SCHEMA">
+RDF-SCHEMA
+</a>
+</cite>
+])
+by
+linking
+each
+element
+of
+the
+list
+using
+<code>
+rdf:first
+</code>
+and
+<code>
+rdf:next
+</code>,
+terminating
+the
+list
+with
+<code>
+rdf:nil
+</code>
+using
+the
+following
+sequence:
+</p>
+<p>
+The
+algorithm
+is
+invoked
+with
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+<em>
+array
+</em>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+returns
+a
+value
+to
+be
+used
+as
+an
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+in
+the
+calling
+location.
+</p>
+<div class="note">
+<div class="note-title">
+<span>
+Note
+</span>
+</div>
+<div class="">
+This
+algorithm
+does
+not
+support
+lists
+containing
+lists.
+</div>
+</div>
+<div class="issue">
+<div class="issue-title">
+<span>
+<ins class="diff-new">Issue
+</ins></span></div><p class=""><ins class="diff-new">
+This
+algorithm
+hasn't
+been
+updated
+yet.
+</ins></p></div>
+<ol class="algorithm">
+<li>
+If
+<em>
+array
+</em>
+is
+empty
+return
+<code>
+rdf:nil
+</code>.
+</li>
+<li>
+Otherwise,
+generate
+a
+<a class="tref internalDFN" title="quad" href="#dfn-quad">
+Quad
+</a>
+using
+using
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+a
+newly
+generated
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>
+identified
+as
+<em>
+first
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>
+</em>.
+</li>
+<li>
+For
+each
+element
+in
+<em>
+array
+</em>
+other
+than
+the
+last
+element:
+<ol class="algorithm">
+<li>
+Create
+a
+processor
+state
+using
+<em>
+first
+blank
+node
+</em>
+as
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+and
+<code>
+rdf:first
+</code>
+as
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>.
+<ol class="algorithm">
+<li>
+Process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+1
+</a>.
+</li>
+<li>
+Proceed
+using
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+</ol>
+</li>
+<li>
+Unless
+this
+is
+the
+last
+element
+in
+<em>
+array
+</em>,
+generate
+a
+new
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>
+identified
+as
+<em>
+rest
+blank
+node
+</em>,
+otherwise
+use
+<code>
+rdf:nil
+</code>.
+</li>
+<li>
+Generate
+a
+new
+<a class="tref internalDFN" title="quad" href="#dfn-quad">
+Quad
+</a>
+using
+<em>
+first
+blank
+node
+</em>,
+<code>
+rdf:rest
+</code>
+and
+<em>
+rest
+blank
+node
+</em>.
+</li>
+<li>
+Set
+<em>
+first
+blank
+node
+</em>
+to
+<em>
+rest
+blank
+node
+</em>.
+</li>
+<li>
+Return
+<em>
+first
+blank
+node
+</em>.
+</li>
+</ol>
+</li>
+</ol>
+</section>
+<section id="convert-from-rdf-algorithm">
+<h4>
+<span class="secno">
+<del class="diff-old">4.10.5
+</del>
+<ins class="diff-chg">5.16.3
+</ins>
+</span>
+Convert
+from
+RDF
+Algorithm
+</h4>
+<p>
+In
+some
+cases,
+data
+exists
+natively
+in
+<del class="diff-old">Triples
+</del>
+<ins class="diff-chg">the
+form
+of
+triples
+</ins>
+or
+<del class="diff-old">Quads
+form;
+</del>
+<ins class="diff-chg">or
+</ins><a class="tref internalDFN" title="quad" href="#dfn-quad"><ins class="diff-chg">
+quads
+</ins></a><ins class="diff-chg">
+;
+</ins>
+for
+example,
+if
+the
+data
+was
+originally
+represented
+in
+an
+RDF
+graph
+or
+triple/quad
+store.
+This
+algorithm
+is
+designed
+to
+simply
+translate
+an
+array
+of
+<del class="diff-old">Quads
+</del>
+<a class="tref internalDFN" title="quad" href="#dfn-quad">
+<ins class="diff-chg">quads
+</ins>
+</a>
+into
+a
+JSON-LD
+document.
+</p>
+<p>
+When
+expanding
+<a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">
+typed
+<del class="diff-old">literal
+</del>
+values
+</a>
+having
+a
+datatype
+of
+<code>
+xsd:string
+</code>,
+the
+<code>
+@type
+</code>
+<em class="rfc2119" title="must not">
+must
+not
+</em>
+be
+set
+to
+<code>
+xsd:string
+</code>
+and
+the
+resulting
+value
+<em class="rfc2119" title="must">
+must
+</em>
+have
+only
+a
+<code>
+@value
+</code>
+property.
+</p>
+<p>
+The
+conversion
+algorithm
+takes
+a
+single
+parameter
+<em>
+input
+</em>
+in
+the
+form
+of
+an
+array
+of
+<a class="tref internalDFN" title="quad" href="#dfn-quad">
+Quad
+</a>
+representations.
+</p>
+<div class="issue">
+<div class="issue-title">
+<span>
+<ins class="diff-new">Issue
+</ins></span></div><p class=""><ins class="diff-new">
+This
+algorithm
+hasn't
+been
+updated
+yet.
+</ins></p></div>
+<ol class="algorithm">
+<li id="new_graph">
+Construct
+<em>
+defaultGraph
+</em>
+as
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+containing
+<em>
+nodes
+</em>
+and
+<em>
+listMap
+</em>,
+each
+an
+empty
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>.
+</li>
+<li>
+Construct
+<em>
+graphs
+</em>
+as
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+containing
+<em>
+defaultGraph
+</em>
+identified
+by
+an
+empty
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>.
+</li>
+<li>
+For
+each
+<a class="tref internalDFN" title="quad" href="#dfn-quad">
+quad
+</a>
+in
+<em>
+input
+</em>:
+<ol class="algorithm">
+<li>
+Set
+<em>
+graph
+</em>
+to
+the
+entry
+in
+<em>
+graphs
+</em>
+identified
+by
+<em>
+name
+</em>,
+initializing
+it
+to
+a
+new
+entry
+using
+the
+mechanism
+described
+in
+<a href="#new_graph">
+Step
+1
+</a>.
+</li>
+<li>
+If
+<em>
+property
+</em>
+is
+<code>
+rdf:first
+</code>,
+use
+the
+entry
+in
+<em>
+graph.listMap
+</em>
+indexed
+by
+<em>
+subject
+</em>,
+initializing
+it
+to
+a
+new
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+if
+nesessary.
+Represent
+<em>
+object
+</em>
+in
+<a class="tref internalDFN" title="expanded_form" href="#dfn-expanded_form">
+expanded
+<del class="diff-old">form,
+</del>
+<ins class="diff-chg">form
+</ins></a>,
+as
+described
+in
+<a href="#value-expansion">
+Value
+Expansion
+</a>.
+Add
+the
+resulting
+<em>
+object
+representation
+</em>
+to
+the
+entry
+indexed
+by
+<em>
+first
+</em>,
+and
+skip
+to
+the
+next
+<del class="diff-old">quad.
+</del>
+<a class="tref internalDFN" title="quad" href="#dfn-quad">
+<ins class="diff-chg">quad
+</ins></a>.
+</li>
+<li>
+If
+<em>
+property
+</em>
+is
+<code>
+rdf:rest
+</code>:
+<ol class="algorithm">
+<li>
+If
+<em>
+object
+</em>
+is
+a
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>,
+use
+the
+entry
+in
+<em>
+graph.listMap
+</em>
+indexed
+by
+<em>
+subject
+</em>,
+initializing
+it
+to
+a
+new
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+if
+necessary.
+Add
+the
+<em>
+nominalValue
+</em>
+of
+<em>
+object
+</em>
+to
+the
+entry
+indexed
+by
+<em>
+rest
+</em>.
+</li>
+<li>
+Skip
+to
+the
+next
+<del class="diff-old">quad.
+</del>
+<a class="tref internalDFN" title="quad" href="#dfn-quad">
+<ins class="diff-chg">quad
+</ins></a>.
+</li>
+</ol>
+</li>
+<li>
+If
+<em>
+name
+</em>
+is
+not
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>,
+and
+<em>
+defaultGraph.nodes
+</em>
+does
+not
+contain
+an
+entry
+for
+<em>
+name
+</em>,
+create
+a
+new
+entry
+for
+<em>
+name
+</em>
+from
+a
+new
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+with
+key/value
+pair
+of
+<code>
+@id
+</code>
+and
+<del class="diff-old">a
+string
+representation
+of
+</del>
+<em>
+name
+<del class="diff-old">.
+</del>
+</em>
+<ins class="diff-chg">represented
+in
+</ins><a class="tref internalDFN" title="expanded_iri_form" href="#dfn-expanded_iri_form"><ins class="diff-chg">
+expanded
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+form
+</ins></a>.
+</li>
+<li>
+Set
+<em>
+value
+</em>
+as
+the
+entry
+from
+<em>
+graph.nodes
+</em>
+for
+<em>
+subject
+</em>,
+initializing
+it
+to
+a
+new
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+with
+key/value
+pair
+of
+<code>
+@id
+</code>
+and
+<del class="diff-old">a
+string
+representation
+of
+</del>
+<em>
+subject
+</em>
+<ins class="diff-new">represented
+in
+</ins><a class="tref internalDFN" title="expanded_iri_form" href="#dfn-expanded_iri_form"><ins class="diff-new">
+expanded
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+form
+</ins></a>
+if
+necessary.
+</li>
+<li>
+If
+<em>
+property
+</em>
+is
+<code>
+rdf:type
+</code>,
+<em>
+<ins class="diff-chg">object
+</ins></em><ins class="diff-chg">
+is
+not
+a
+</ins><a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value"><ins class="diff-chg">
+JSON-LD
+value
+</ins></a>,
+and
+the
+<code class="idlMemberName">
+<a href="#widl-JsonLdOptions-useRdfType">
+useRdfType
+</a>
+</code>
+option
+is
+not
+present
+or
+<a class="tref internalDFN" title="false" href="#dfn-false">
+false
+</a>:
+<ol class="algorithm">
+<li>
+Append
+<del class="diff-old">the
+string
+representation
+of
+</del>
+<em>
+object
+</em>
+<ins class="diff-new">represented
+in
+</ins><a class="tref internalDFN" title="expanded_iri_form" href="#dfn-expanded_iri_form"><ins class="diff-new">
+expanded
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+form
+</ins></a>
+to
+the
+array
+value
+for
+the
+key
+<code>
+@type
+</code>,
+creating
+an
+entry
+in
+<em>
+value
+</em>
+if
+necessary.
+</li>
+</ol>
+</li>
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">Otherwise,
+if
+</ins>
+<em>
+object
+</em>
+is
+a
+<a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">
+typed
+<del class="diff-old">literal
+</del>
+<ins class="diff-chg">value
+</ins>
+</a>
+and
+the
+<code class="idlMemberName">
+<a href="#widl-JsonLdOptions-useNativeTypes">
+useNativeTypes
+</a>
+</code>
+option
+is
+set
+to
+<a class="tref internalDFN" title="true" href="#dfn-true">
+true
+</a>:
+<ol class="algorithm">
+<li>
+Generate
+a
+<em>
+converted
+value
+</em>:
+<ol class="algorithm">
+<li>
+If
+the
+literal's
+type
+is
+<code>
+xsd:boolean
+</code>,
+the
+<em>
+converted
+value
+</em>
+is
+<a class="tref internalDFN" title="true" href="#dfn-true">
+true
+</a>
+if
+the
+literal
+matches
+the
+value
+<code>
+true
+</code>
+or
+<code>
+false
+</code>
+if
+the
+literal
+matches
+the
+value
+<code>
+false
+</code>.
+</li>
+<li>
+If
+the
+literal's
+type
+is
+<code>
+xsd:integer
+</code>
+or
+<code>
+xsd:double
+</code>,
+try
+to
+convert
+the
+literal
+to
+a
+JSON
+<a class="tref internalDFN" title="number" href="#dfn-number">
+number
+</a>.
+If
+the
+conversion
+is
+successful,
+store
+the
+result
+in
+<em>
+converted
+value
+</em>,
+otherwise
+set
+<em>
+converted
+value
+</em>
+to
+<em>
+value
+</em>.
+</li>
+<li>
+Otherwise,
+do
+not
+perform
+a
+conversion.
+Set
+the
+<em>
+converted
+value
+</em>
+to
+the
+<em>
+value
+</em>.
+</li>
+</ol>
+</li>
+<li>
+Append
+the
+<em>
+converted
+value
+</em>
+to
+the
+array
+value
+for
+the
+key,
+creating
+an
+entry
+in
+<em>
+value
+</em>
+if
+necessary.
+</li>
+</ol>
+</li>
+<li>
+Otherwise,
+if
+<em>
+object
+</em>
+is
+<code>
+rdf:nil
+</code>:
+<ol class="algorithm">
+<li>
+Let
+<em>
+key
+</em>
+be
+<del class="diff-old">the
+string
+representation
+of
+</del>
+<em>
+property
+<del class="diff-old">.
+</del>
+</em>
+<ins class="diff-chg">expressed
+in
+</ins><a class="tref internalDFN" title="expanded_iri_form" href="#dfn-expanded_iri_form"><ins class="diff-chg">
+expanded
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+form
+</ins></a>.
+</li>
+<li>
+Append
+an
+empty
+<code>
+@list
+</code>
+representation
+to
+the
+array
+value
+for
+<em>
+key
+</em>,
+creating
+an
+entry
+in
+<em>
+value
+</em>
+if
+necessary.
+</li>
+</ol>
+</li>
+<li>
+Otherwise,
+<ol class="algorithm">
+<li>
+Let
+<em>
+key
+</em>
+be
+<del class="diff-old">the
+string
+representation
+of
+</del>
+<em>
+property
+</em>
+<ins class="diff-new">expressed
+in
+</ins><a class="tref internalDFN" title="expanded_iri_form" href="#dfn-expanded_iri_form"><ins class="diff-new">
+expanded
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+form
+</ins></a>
+and
+let
+<em>
+object
+representation
+</em>
+be
+<em>
+object
+</em>
+represented
+in
+<a class="tref internalDFN" title="expanded_form" href="#dfn-expanded_form">
+expanded
+form
+</a>
+as
+described
+in
+<a href="#value-expansion">
+Value
+Expansion
+</a>.
+</li>
+<li>
+If
+<em>
+object
+</em>
+is
+a
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>,
+use
+the
+entry
+in
+<em>
+graph.listMap
+</em>
+indexed
+by
+<em>
+object
+</em>,
+initializing
+it
+to
+a
+new
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+if
+nesessary.
+Add
+an
+entry
+for
+<em>
+head
+</em>
+with
+<em>
+object
+representation
+</em>.
+</li>
+<li>
+Append
+<em>
+object
+representation
+</em>
+to
+the
+array
+value
+for
+<em>
+key
+</em>,
+creating
+an
+entry
+in
+<em>
+value
+</em>
+if
+necessary.
+</li>
+</ol>
+</li>
+</ol>
+</li>
+<li>
+For
+each
+<em>
+name
+</em>
+and
+<em>
+graph
+</em>
+in
+<em>
+graphs
+</em>:
+<ol class="algorithm">
+<li>
+For
+each
+<em>
+subject
+</em>
+and
+<em>
+entry
+</em>
+in
+<em>
+graph
+</em>
+where
+<em>
+entry
+</em>
+has
+both
+<em>
+head
+</em>
+and
+<em>
+first
+</em>
+keys:
+<ol class="algorithm">
+<li>
+Set
+<em>
+value
+</em>
+to
+the
+value
+of
+<em>
+head
+</em>
+in
+<em>
+entry
+</em>.
+</li>
+<li>
+Remove
+the
+entry
+for
+<code>
+@id
+</code>
+in
+<em>
+value
+</em>.
+</li>
+<li>
+Add
+an
+entry
+to
+<em>
+value
+</em>
+for
+<code>
+@list
+</code>
+initialized
+to
+a
+new
+array
+containing
+the
+value
+of
+<em>
+first
+</em>
+from
+<em>
+entry
+</em>.
+</li>
+<li>
+While
+<em>
+entry
+</em>
+has
+a
+key
+for
+<em>
+rest
+</em>:
+<ol class="algorithm">
+<li>
+Set
+<em>
+entry
+</em>
+to
+the
+value
+of
+<em>
+graph.listMap
+</em>
+for
+<em>
+entry.rest
+</em>.
+</li>
+<li>
+Add
+the
+value
+for
+<em>
+entry.first
+</em>
+to
+the
+list
+array.
+</li>
+</ol>
+</li>
+</ol>
+</li>
+</ol>
+</li>
+<li>
+Create
+<em>
+array
+</em>
+as
+an
+empty
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>.
+</li>
+<li>
+For
+each
+<em>
+subject
+</em>
+and
+<em>
+entry
+</em>
+in
+<em>
+defaultGraph.nodes
+</em>
+ordered
+by
+<em>
+subject
+</em>:
+<ol class="algorithm">
+<li>
+Add
+<em>
+entry
+</em>
+to
+<em>
+array
+</em>.
+</li>
+<li>
+If
+<em>
+graphs
+</em>
+has
+an
+entry
+for
+<em>
+subject
+</em>,
+add
+a
+property
+<code>
+@graph
+</code>
+in
+<em>
+entry
+</em>
+containing
+the
+ordered
+entries
+from
+<em>
+graphs[subject].nodes
+</em>.
+</li>
+</ol>
+</li>
+<li>
+Return
+<em>
+array
+</em>
+as
+the
+result.
+</li>
+</ol>
+</section>
+<section id="data-round-tripping">
+<h4>
+<span class="secno">
+<del class="diff-old">5.
+</del>
+<ins class="diff-chg">5.16.4
+</ins>
+</span>
+Data
+Round
+Tripping
+</h4>
+<p>
+When
+<a href="#rdf-conversion">
+converting
+JSON-LD
+to
+RDF
+</a>
+JSON-native
+types
+such
+as
+<em>
+numbers
+</em>
+and
+<em>
+booleans
+</em>
+are
+automatically
+coerced
+to
+<strong>
+xsd:integer
+</strong>,
+<strong>
+xsd:double
+</strong>,
+or
+<strong>
+xsd:boolean
+</strong>.
+Implementers
+<em class="rfc2119" title="must">
+must
+</em>
+ensure
+that
+the
+result
+is
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">in
+</ins><a class="tref internalDFN" title="canonical_lexical_form" href="#dfn-canonical_lexical_form">
+canonical
+lexical
+form
+<del class="diff-old">in
+the
+form
+of
+a
+string
+</del>
+</a>.
+A
+<dfn title="canonical_lexical_form" id="dfn-canonical_lexical_form">
+canonical
+lexical
+form
+</dfn>
+is
+a
+set
+of
+literals
+from
+among
+the
+valid
+set
+of
+literals
+for
+a
+datatype
+such
+that
+there
+is
+a
+one-to-one
+mapping
+between
+the
+<a class="tref internalDFN" title="canonical_lexical_form" href="#dfn-canonical_lexical_form">
+canonical
+lexical
+form
+</a>
+and
+a
+value
+in
+the
+value
+space
+as
+defined
+in
+[
+<cite>
+<a class="bibref" href="#bib-XMLSCHEMA11-2">
+XMLSCHEMA11-2
+</a>
+</cite>
+].
+In
+other
+words,
+every
+value
+<em class="rfc2119" title="must">
+must
+</em>
+be
+converted
+to
+a
+deterministic
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+representation.
+</p>
+<p>
+The
+canonical
+lexical
+form
+of
+an
+<em>
+integer
+</em>,
+i.e.,
+a
+number
+without
+fractions
+or
+a
+number
+coerced
+to
+<strong>
+xsd:integer
+</strong>,
+is
+a
+finite-length
+sequence
+of
+decimal
+digits
+(
+<code>
+0-9
+</code>
+)
+with
+an
+optional
+leading
+minus
+sign;
+leading
+zeroes
+are
+prohibited.
+To
+convert
+the
+number
+in
+JavaScript,
+implementers
+can
+use
+the
+following
+snippet
+of
+code:
+</p>
+<div class="example">
+<div class="example-title">
+<span>
+Example
+<del class="diff-old">25
+</del>
+<ins class="diff-chg">12
+</ins>
+</span>
+</div>
+<pre class="example">
+(value).toFixed(0).toString()
+</pre>
+</div>
+<p>
+The
+canonical
+lexical
+form
+of
+a
+<em>
+double
+</em>,
+i.e.,
+a
+number
+with
+fractions
+or
+a
+number
+coerced
+to
+<strong>
+xsd:double
+</strong>,
+consists
+of
+a
+mantissa
+followed
+by
+the
+character
+"E",
+followed
+by
+an
+exponent.
+The
+mantissa
+<em class="rfc2119" title="must">
+must
+</em>
+be
+a
+decimal
+number.
+The
+exponent
+<em class="rfc2119" title="must">
+must
+</em>
+be
+an
+integer.
+Leading
+zeroes
+and
+a
+preceding
+plus
+sign
+(
+<code>
++
+</code>
+)
+are
+prohibited
+in
+the
+exponent.
+If
+the
+exponent
+is
+zero,
+it
+must
+be
+indicated
+by
+<code>
+E0
+</code>.
+For
+the
+mantissa,
+the
+preceding
+optional
+plus
+sign
+is
+prohibited
+and
+the
+decimal
+point
+is
+required.
+Leading
+and
+trailing
+zeroes
+are
+prohibited
+subject
+to
+the
+following:
+number
+representations
+must
+be
+normalized
+such
+that
+there
+is
+a
+single
+digit
+which
+is
+non-zero
+to
+the
+left
+of
+the
+decimal
+point
+and
+at
+least
+a
+single
+digit
+to
+the
+right
+of
+the
+decimal
+point
+unless
+the
+value
+being
+represented
+is
+zero.
+The
+canonical
+representation
+for
+zero
+is
+<code>
+0.0E0
+</code>.
+<strong>
+xsd:double
+</strong>
+'s
+value
+space
+is
+defined
+by
+the
+IEEE
+double-precision
+64-bit
+floating
+point
+type
+[
+<cite>
+<a class="bibref" href="#bib-IEEE-754-1985">
+IEEE-754-1985
+</a>
+</cite>
+];
+in
+JSON-LD
+the
+mantissa
+is
+rounded
+to
+15
+digits
+after
+the
+decimal
+point.
+</p>
+<p>
+To
+convert
+the
+number
+in
+JavaScript,
+implementers
+can
+use
+the
+following
+snippet
+of
+code:
+</p>
+<div class="example">
+<div class="example-title">
+<span>
+Example
+<del class="diff-old">26
+</del>
+<ins class="diff-chg">13
+</ins>
+</span>
+</div>
+<pre class="example">
+(value).toExponential(15).replace(/(\d)0*e\+?/,'$1E')
+</pre>
+</div>
+<div class="note">
+<div class="note-title">
+<span>
+Note
+</span>
+</div>
+<p class="">
+When
+data
+such
+as
+decimals
+need
+to
+be
+normalized,
+JSON-LD
+authors
+should
+not
+use
+values
+that
+are
+going
+to
+undergo
+automatic
+conversion.
+This
+is
+due
+to
+the
+lossy
+nature
+of
+<strong>
+xsd:double
+</strong>
+values.
+Authors
+should
+instead
+use
+the
+expanded
+object
+form
+to
+set
+the
+canonical
+lexical
+form
+directly.
+</p>
+</div>
+<p>
+The
+canonical
+lexical
+form
+of
+the
+<em>
+boolean
+</em>
+values
+<code>
+true
+</code>
+and
+<code>
+false
+</code>
+are
+the
+strings
+<strong>
+true
+</strong>
+and
+<strong>
+false
+</strong>.
+</p>
+<p>
+When
+JSON-native
+<a class="tref internalDFN" title="number" href="#dfn-number">
+number
+</a>
+s,
+are
+type
+coerced,
+lossless
+data
+round-tripping
+can
+not
+be
+guaranted
+as
+rounding
+errors
+might
+occur.
+Additionally,
+only
+literals
+typed
+as
+<strong>
+xsd:integer
+</strong>,
+<strong>
+xsd:double
+</strong>,
+and
+<strong>
+xsd:boolean
+</strong>
+are
+automatically
+converted
+back
+to
+their
+JSON-native
+counterparts
+in
+when
+<a href="#rdf-conversion">
+converting
+from
+RDF
+</a>.
+</p>
+<del class="diff-old">Note
+</del>
+<p>
+Some
+JSON
+serializers,
+such
+as
+PHP's
+native
+implementation
+in
+some
+versions,
+backslash-escape
+the
+forward
+slash
+character.
+For
+example,
+the
+value
+<code>
+http://example.com/
+</code>
+would
+be
+serialized
+as
+<code>
+http:\/\/example.com\/
+</code>.
+This
+is
+problematic
+as
+other
+JSON
+parsers
+might
+not
+understand
+those
+escaping
+characters.
+There
+is
+no
+need
+to
+backslash-escape
+forward
+slashes
+in
+JSON-LD.
+To
+aid
+interoperability
+between
+JSON-LD
+processors,
+a
+JSON-LD
+serializer
+<em class="rfc2119" title="must not">
+must
+not
+</em>
+backslash-escape
+forward
+slashes.
+</p>
+</section>
+</section>
+</section>
+<section id="the-application-programming-interface">
+<h2>
+<span class="secno">
+<ins class="diff-new">6.
+</ins></span><ins class="diff-new">
+The
+Application
+Programming
+Interface
+</ins></h2><p><ins class="diff-new">
+This
+API
+provides
+a
+clean
+mechanism
+that
+enables
+developers
+to
+convert
+JSON-LD
+data
+into
+a
+a
+variety
+of
+output
+formats
+that
+are
+easier
+to
+work
+with
+in
+various
+programming
+languages.
+If
+a
+JSON-LD
+API
+is
+provided
+in
+a
+programming
+environment,
+the
+entirety
+of
+the
+following
+API
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+implemented.
+</ins></p><section id="jsonldprocessor"><h3><span class="secno"><ins class="diff-new">
+6.1
+</ins></span><ins class="diff-new">
+JsonLdProcessor
+</ins></h3><p><ins class="diff-new">
+The
+JSON-LD
+processor
+interface
+is
+the
+high-level
+programming
+structure
+that
+developers
+use
+to
+access
+the
+JSON-LD
+transformation
+methods.
+</ins></p><p><ins class="diff-new">
+The
+JSON-LD
+API
+signatures
+are
+the
+same
+across
+all
+programming
+languages.
+Due
+to
+the
+fact
+that
+asynchronous
+programming
+is
+uncommon
+in
+certain
+languages,
+developers
+</ins><em class="rfc2119" title="may"><ins class="diff-new">
+may
+</ins></em><ins class="diff-new">
+implement
+a
+processor
+with
+a
+synchronous
+interface
+instead.
+In
+that
+case,
+the
+</ins><code><ins class="diff-new">
+callback
+</ins></code><ins class="diff-new">
+parameter
+</ins><em class="rfc2119" title="must not"><ins class="diff-new">
+must
+not
+</ins></em><ins class="diff-new">
+be
+included
+and
+the
+result
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+returned
+as
+a
+return
+value
+instead.
+</ins></p><p><ins class="diff-new">
+It
+is
+important
+to
+highlight
+that
+conformant
+</ins><a class="tref internalDFN" title="json-ld_processor" href="#dfn-json-ld_processor"><ins class="diff-new">
+JSON-LD
+processors
+</ins></a><em class="rfc2119" title="must not"><ins class="diff-new">
+must
+not
+</ins></em><ins class="diff-new">
+modify
+the
+input
+parameters.
+</ins></p> <pre class="idl"><span class="idlInterface" id="idl-def-JsonLdProcessor">[<span class="extAttr">Constructor</span>]<ins class="diff-new">
+interface <span class="idlInterfaceID">JsonLdProcessor</span> {
+</ins><span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-expand-void-object-object---DOMString-input-JsonLdCallback-callback-JsonLdOptions-options">expand</a></span> (<span class="idlParam"><span class="idlParamType">(<a>object</a> or <a>object[]</a> or <a>DOMString</a>)</span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType"><a href="#idl-def-JsonLdCallback" class="idlType"><code>JsonLdCallback</code></a></span> <span class="idlParamName">callback</span></span>, <span class="idlParam">optional <span class="idlParamType"><a href="#idl-def-JsonLdOptions" class="idlType"><code>JsonLdOptions</code></a>?</span> <span class="idlParamName">options</span></span>);</span><span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-compact-void-object-object---DOMString-input-object-DOMString-context-JsonLdCallback-callback-JsonLdOptions-options">compact</a></span> (<span class="idlParam"><span class="idlParamType">(<a>object</a> or <a>object[]</a> or <a>DOMString</a>)</span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType">(<a>object</a> or <a>DOMString</a>)</span> <span class="idlParamName">context</span></span>, <span class="idlParam"><span class="idlParamType"><a href="#idl-def-JsonLdCallback" class="idlType"><code>JsonLdCallback</code></a></span> <span class="idlParamName">callback</span></span>, <span class="idlParam">optional <span class="idlParamType"><a href="#idl-def-JsonLdOptions" class="idlType"><code>JsonLdOptions</code></a>?</span> <span class="idlParamName">options</span></span>);</span><span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-flatten-void-object-object---DOMString-input-object-DOMString-context-JsonLdCallback-callback-JsonLdOptions-options">flatten</a></span> (<span class="idlParam"><span class="idlParamType">(<a>object</a> or <a>object[]</a> or <a>DOMString</a>)</span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType">(<a>object</a> or <a>DOMString</a>)?</span> <span class="idlParamName">context</span></span>, <span class="idlParam"><span class="idlParamType"><a href="#idl-def-JsonLdCallback" class="idlType"><code>JsonLdCallback</code></a></span> <span class="idlParamName">callback</span></span>, <span class="idlParam">optional <span class="idlParamType"><a href="#idl-def-JsonLdOptions" class="idlType"><code>JsonLdOptions</code></a>?</span> <span class="idlParamName">options</span></span>);</span><ins class="diff-new">
+};
+</ins></span></pre><section id="methods"><h4><span class="secno"><ins class="diff-new">
+6.1.1
+</ins></span><ins class="diff-new">
+Methods
+</ins></h4><dl class="methods"><dt id="widl-JsonLdProcessor-compact-void-object-object---DOMString-input-object-DOMString-context-JsonLdCallback-callback-JsonLdOptions-options"><code><ins class="diff-new">
+compact
+</ins></code></dt><dd><a href="#compaction"><ins class="diff-new">
+Compacts
+</ins></a><ins class="diff-new">
+the
+given
+</ins><code><ins class="diff-new">
+input
+</ins></code><ins class="diff-new">
+using
+the
+</ins><code><ins class="diff-new">
+context
+</ins></code><ins class="diff-new">
+according
+to
+the
+steps
+in
+the
+</ins><a href="#compaction-algorithm"><ins class="diff-new">
+Compaction
+Algorithm
+</ins></a>.<table class="parameters"><tr><th><ins class="diff-new">
+Parameter
+</ins></th><th><ins class="diff-new">
+Type
+</ins></th><th><ins class="diff-new">
+Nullable
+</ins></th><th><ins class="diff-new">
+Optional
+</ins></th><th><ins class="diff-new">
+Description
+</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
+input
+</ins></td><td class="prmType"><code><ins class="diff-new">
+(
+</ins><a><ins class="diff-new">
+object
+</ins></a><ins class="diff-new">
+or
+</ins><a><ins class="diff-new">
+object[]
+</ins></a><ins class="diff-new">
+or
+</ins><a><ins class="diff-new">
+DOMString
+</ins></a><ins class="diff-new">
+)
+</ins></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+JSON-LD
+object
+or
+array
+of
+JSON-LD
+objects
+to
+perform
+the
+compaction
+upon
+or
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr></a><ins class="diff-new">
+referencing
+the
+JSON-LD
+document
+to
+compact.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+context
+</ins></td><td class="prmType"><code><ins class="diff-new">
+(
+</ins><a><ins class="diff-new">
+object
+</ins></a><ins class="diff-new">
+or
+</ins><a><ins class="diff-new">
+DOMString
+</ins></a><ins class="diff-new">
+)
+</ins></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+context
+to
+use
+when
+compacting
+the
+</ins><code><ins class="diff-new">
+input
+</ins></code><ins class="diff-new">
+;
+either
+in
+the
+form
+of
+an
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+or
+as
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr></a>.</td></tr><tr><td class="prmName"><ins class="diff-new">
+callback
+</ins></td><td class="prmType"><code><a href="#idl-def-JsonLdCallback" class="idlType"><code><ins class="diff-new">
+JsonLdCallback
+</ins></code></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+A
+callback
+that
+is
+called
+when
+processing
+is
+complete
+on
+the
+given
+</ins><code><ins class="diff-new">
+input
+</ins></code>.</td></tr><tr><td class="prmName"><ins class="diff-new">
+options
+</ins></td><td class="prmType"><code><a href="#idl-def-JsonLdOptions" class="idlType"><code><ins class="diff-new">
+JsonLdOptions
+</ins></code></a></code></td><td class="prmNullTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmOptTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmDesc"><ins class="diff-new">
+A
+set
+of
+options
+to
+configure
+the
+used
+algorithms
+such.
+This
+allows,
+e.g.,
+to
+set
+the
+input
+document's
+base
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr></a>.<ins class="diff-new">
+This
+also
+includes
+the
+</ins><code><ins class="diff-new">
+optimize
+</ins></code><ins class="diff-new">
+flag,
+which,
+if
+set,
+will
+allow
+processor-specific
+optimization.
+</ins></td></tr></table><div><em><ins class="diff-new">
+Return
+type:
+</ins></em><code><a><ins class="diff-new">
+void
+</ins></a></code></div></dd><dt id="widl-JsonLdProcessor-expand-void-object-object---DOMString-input-JsonLdCallback-callback-JsonLdOptions-options"><code><ins class="diff-new">
+expand
+</ins></code></dt><dd><a href="#expansion"><ins class="diff-new">
+Expands
+</ins></a><ins class="diff-new">
+the
+given
+</ins><code><ins class="diff-new">
+input
+</ins></code><ins class="diff-new">
+according
+to
+the
+steps
+in
+the
+</ins><a href="#expansion-algorithm"><ins class="diff-new">
+Expansion
+Algorithm
+</ins></a>.<table class="parameters"><tr><th><ins class="diff-new">
+Parameter
+</ins></th><th><ins class="diff-new">
+Type
+</ins></th><th><ins class="diff-new">
+Nullable
+</ins></th><th><ins class="diff-new">
+Optional
+</ins></th><th><ins class="diff-new">
+Description
+</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
+input
+</ins></td><td class="prmType"><code><ins class="diff-new">
+(
+</ins><a><ins class="diff-new">
+object
+</ins></a><ins class="diff-new">
+or
+</ins><a><ins class="diff-new">
+object[]
+</ins></a><ins class="diff-new">
+or
+</ins><a><ins class="diff-new">
+DOMString
+</ins></a><ins class="diff-new">
+)
+</ins></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+JSON-LD
+object
+or
+array
+of
+JSON-LD
+objects
+to
+perform
+the
+expansion
+upon
+or
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr></a><ins class="diff-new">
+referencing
+the
+JSON-LD
+document
+to
+expand.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+callback
+</ins></td><td class="prmType"><code><a href="#idl-def-JsonLdCallback" class="idlType"><code><ins class="diff-new">
+JsonLdCallback
+</ins></code></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+A
+callback
+that
+is
+called
+when
+processing
+is
+complete
+on
+the
+given
+</ins><code><ins class="diff-new">
+input
+</ins></code>.</td></tr><tr><td class="prmName"><ins class="diff-new">
+options
+</ins></td><td class="prmType"><code><a href="#idl-def-JsonLdOptions" class="idlType"><code><ins class="diff-new">
+JsonLdOptions
+</ins></code></a></code></td><td class="prmNullTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmOptTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmDesc"><ins class="diff-new">
+A
+set
+of
+options
+to
+configure
+the
+used
+algorithms
+such.
+This
+allows,
+e.g.,
+to
+set
+the
+input
+document's
+base
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr></a>.</td></tr></table><div><em><ins class="diff-new">
+Return
+type:
+</ins></em><code><a><ins class="diff-new">
+void
+</ins></a></code></div></dd><dt id="widl-JsonLdProcessor-flatten-void-object-object---DOMString-input-object-DOMString-context-JsonLdCallback-callback-JsonLdOptions-options"><code><ins class="diff-new">
+flatten
+</ins></code></dt><dd><a href="#flattening"><ins class="diff-new">
+Flattens
+</ins></a><ins class="diff-new">
+the
+given
+</ins><code><ins class="diff-new">
+input
+</ins></code><ins class="diff-new">
+and
+</ins><a href="#compaction"><ins class="diff-new">
+compacts
+</ins></a><ins class="diff-new">
+it
+using
+the
+passed
+</ins><code><ins class="diff-new">
+context
+</ins></code><ins class="diff-new">
+according
+to
+the
+steps
+in
+the
+</ins><a href="#flattening-algorithm"><ins class="diff-new">
+Flattening
+Algorithm
+</ins></a>.<table class="parameters"><tr><th><ins class="diff-new">
+Parameter
+</ins></th><th><ins class="diff-new">
+Type
+</ins></th><th><ins class="diff-new">
+Nullable
+</ins></th><th><ins class="diff-new">
+Optional
+</ins></th><th><ins class="diff-new">
+Description
+</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
+input
+</ins></td><td class="prmType"><code><ins class="diff-new">
+(
+</ins><a><ins class="diff-new">
+object
+</ins></a><ins class="diff-new">
+or
+</ins><a><ins class="diff-new">
+object[]
+</ins></a><ins class="diff-new">
+or
+</ins><a><ins class="diff-new">
+DOMString
+</ins></a><ins class="diff-new">
+)
+</ins></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+JSON-LD
+object
+or
+array
+of
+JSON-LD
+objects
+or
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr></a><ins class="diff-new">
+referencing
+the
+JSON-LD
+document
+to
+flatten.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+context
+</ins></td><td class="prmType"><code><ins class="diff-new">
+(
+</ins><a><ins class="diff-new">
+object
+</ins></a><ins class="diff-new">
+or
+</ins><a><ins class="diff-new">
+DOMString
+</ins></a><ins class="diff-new">
+)
+</ins></code></td><td class="prmNullTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+context
+to
+use
+when
+compacting
+the
+flattened
+</ins><code><ins class="diff-new">
+input
+</ins></code><ins class="diff-new">
+;
+either
+in
+the
+form
+of
+an
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+or
+as
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr></a>.<ins class="diff-new">
+If
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-new">
+null
+</ins></a><ins class="diff-new">
+is
+passed,
+the
+result
+will
+not
+be
+compacted
+but
+keept
+in
+expanded
+form.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+callback
+</ins></td><td class="prmType"><code><a href="#idl-def-JsonLdCallback" class="idlType"><code><ins class="diff-new">
+JsonLdCallback
+</ins></code></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+A
+callback
+that
+is
+called
+when
+processing
+is
+complete
+on
+the
+given
+</ins><code><ins class="diff-new">
+input
+</ins></code>.</td></tr><tr><td class="prmName"><ins class="diff-new">
+options
+</ins></td><td class="prmType"><code><a href="#idl-def-JsonLdOptions" class="idlType"><code><ins class="diff-new">
+JsonLdOptions
+</ins></code></a></code></td><td class="prmNullTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmOptTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmDesc"><ins class="diff-new">
+A
+set
+of
+options
+to
+configure
+the
+used
+algorithms
+such.
+This
+allows,
+e.g.,
+to
+set
+the
+input
+document's
+base
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr></a>.</td></tr></table><div><em><ins class="diff-new">
+Return
+type:
+</ins></em><code><a><ins class="diff-new">
+void
+</ins></a></code></div></dd></dl></section></section><section id="callbacks"><h3><span class="secno"><ins class="diff-new">
+6.2
+</ins></span><ins class="diff-new">
+Callbacks
+</ins></h3><p><ins class="diff-new">
+JSON-LD
+processors
+utilize
+callbacks
+in
+order
+to
+return
+information
+in
+an
+asynchronous
+manner
+to
+calling
+applications.
+This
+section
+details
+the
+parameters
+sent
+to
+those
+callbacks.
+</ins></p><section id="jsonldcallback"><h4><span class="secno"><ins class="diff-new">
+6.2.1
+</ins></span><ins class="diff-new">
+JsonLdCallback
+</ins></h4><p><ins class="diff-new">
+The
+</ins><a href="#idl-def-JsonLdCallback" class="idlType"><code><ins class="diff-new">
+JsonLdCallback
+</ins></code></a><ins class="diff-new">
+is
+called
+when
+processing
+of
+an
+API
+method
+of
+</ins><a href="#idl-def-JsonLdProcessor" class="idlType"><code><ins class="diff-new">
+JsonLdProcessor
+</ins></code></a><ins class="diff-new">
+has
+been
+completed
+successfully
+or
+been
+terminated
+by
+an
+error.
+</ins></p><pre class="idl"><span class="idlCallback" id="idl-def-JsonLdCallback"><ins class="diff-new">
+callback
+</ins><span class="idlCallbackID"><ins class="diff-new">
+JsonLdCallback
+</ins></span><ins class="diff-new">
+=
+</ins><span class="idlCallbackType"><a><ins class="diff-new">
+void
+</ins></a></span><ins class="diff-new">
+(
+</ins><span class="idlParam"><span class="idlParamType"><a href="#idl-def-JsonLdProcessingError" class="idlType"><code><ins class="diff-new">
+JsonLdProcessingError
+</ins></code></a></span><span class="idlParamName"><ins class="diff-new">
+error
+</ins></span></span>,<span class="idlParam"><span class="idlParamType"><a><ins class="diff-new">
+object
+or
+object
+</ins></a><ins class="diff-new">
+[]
+</ins></span><span class="idlParamName"><ins class="diff-new">
+document
+</ins></span></span><ins class="diff-new">
+);
+</ins></span></pre><section><h5 id="callback-jsonldcallback-parameters"><ins class="diff-new">
+Callback
+</ins><a class="idlType" href="#idl-def-JsonLdCallback"><code><ins class="diff-new">
+JsonLdCallback
+</ins></code></a><ins class="diff-new">
+Parameters
+</ins></h5><dl class="callback-members"><dt id="widl-JsonLdCallback-error"><code><ins class="diff-new">
+error
+</ins></code><ins class="diff-new">
+of
+type
+</ins><span class="idlMemberType"><a href="#idl-def-JsonLdProcessingError" class="idlType"><code><ins class="diff-new">
+JsonLdProcessingError
+</ins></code></a></span></dt><dd><ins class="diff-new">
+If
+the
+value
+is
+</ins><code><ins class="diff-new">
+null
+</ins></code>,<ins class="diff-new">
+then
+no
+error
+occurred.
+If
+the
+value
+is
+non-
+</ins><code><ins class="diff-new">
+null
+</ins></code>,<ins class="diff-new">
+a
+processing
+error
+occurred
+and
+the
+details
+will
+be
+contained
+within
+the
+</ins><code><ins class="diff-new">
+error
+</ins></code><ins class="diff-new">
+object.
+</ins></dd><dt id="widl-JsonLdCallback-document"><code><ins class="diff-new">
+document
+</ins></code><ins class="diff-new">
+of
+type
+array
+of
+</ins><span class="idlMemberType"><a><ins class="diff-new">
+object
+or
+object
+</ins></a></span></dt><dd><ins class="diff-new">
+The
+processed
+JSON-LD
+document.
+</ins></dd></dl></section></section></section><section id="data-structures"><h3><span class="secno"><ins class="diff-new">
+6.3
+</ins></span><ins class="diff-new">
+Data
+Structures
+</ins></h3><p><ins class="diff-new">
+This
+section
+describes
+datatype
+definitions
+used
+within
+the
+JSON-LD
+API.
+</ins></p><section id="jsonldoptions"><h4><span class="secno"><ins class="diff-new">
+6.3.1
+</ins></span><ins class="diff-new">
+JsonLdOptions
+</ins></h4><p><ins class="diff-new">
+The
+</ins><a href="#idl-def-JsonLdOptions" class="idlType"><code><ins class="diff-new">
+JsonLdOptions
+</ins></code></a><ins class="diff-new">
+type
+is
+used
+to
+pass
+various
+options
+to
+the
+</ins><a href="#idl-def-JsonLdProcessor" class="idlType"><code><ins class="diff-new">
+JsonLdProcessor
+</ins></code></a><ins class="diff-new">
+methods.
+</ins></p> <pre class="idl"><span class="idlDictionary" id="idl-def-JsonLdOptions">dictionary <span class="idlDictionaryID">JsonLdOptions</span> {<span class="idlMember"> <span class="idlMemberType"><a>DOMString</a></span> <span class="idlMemberName"><a href="#widl-JsonLdOptions-base">base</a></span>;</span><span class="idlMember"> <span class="idlMemberType"><a>object or DOMString</a></span> <span class="idlMemberName"><a href="#widl-JsonLdOptions-expandContext">expandContext</a></span> = <span class="idlMemberValue">null</span>;</span><span class="idlMember"> <span class="idlMemberType"><a>boolean</a></span> <span class="idlMemberName"><a href="#widl-JsonLdOptions-compactArrays">compactArrays</a></span> = <span class="idlMemberValue">true</span>;</span><span class="idlMember"> <span class="idlMemberType"><a>boolean</a></span> <span class="idlMemberName"><a href="#widl-JsonLdOptions-optimize">optimize</a></span> = <span class="idlMemberValue">false</span>;</span><span class="idlMember"> <span class="idlMemberType"><a>boolean</a></span> <span class="idlMemberName"><a href="#widl-JsonLdOptions-useRdfType">useRdfType</a></span> = <span class="idlMemberValue">false</span>;</span><span class="idlMember"> <span class="idlMemberType"><a>boolean</a></span> <span class="idlMemberName"><a href="#widl-JsonLdOptions-useNativeTypes">useNativeTypes</a></span> = <span class="idlMemberValue">true</span>;</span><ins class="diff-new">
+};
+</ins></span></pre><section><h5 id="dictionary-jsonldoptions-members"><ins class="diff-new">
+Dictionary
+</ins><a class="idlType" href="#idl-def-JsonLdOptions"><code><ins class="diff-new">
+JsonLdOptions
+</ins></code></a><ins class="diff-new">
+Members
+</ins></h5><dl class="dictionary-members"><dt id="widl-JsonLdOptions-base"><code><ins class="diff-new">
+base
+</ins></code><ins class="diff-new">
+of
+type
+</ins><span class="idlMemberType"><a><ins class="diff-new">
+DOMString
+</ins></a></span></dt><dd><ins class="diff-new">
+The
+Base
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+to
+use
+when
+expanding
+the
+document.
+This
+overrides
+the
+value
+of
+</ins><em><ins class="diff-new">
+input
+</ins></em><ins class="diff-new">
+if
+it
+is
+a
+</ins><a><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr></a>.<ins class="diff-new">
+If
+not
+specified
+and
+</ins><em><ins class="diff-new">
+input
+</ins></em><ins class="diff-new">
+is
+not
+an
+</ins><a><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr></a>,<ins class="diff-new">
+the
+base
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+defaults
+to
+the
+current
+document
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+if
+in
+a
+browser
+context,
+or
+the
+empty
+string
+if
+there
+is
+no
+document
+context.
+</ins></dd><dt id="widl-JsonLdOptions-compactArrays"><code><ins class="diff-new">
+compactArrays
+</ins></code><ins class="diff-new">
+of
+type
+</ins><span class="idlMemberType"><a><ins class="diff-new">
+boolean
+</ins></a></span>,<ins class="diff-new">
+defaulting
+to
+</ins><code><ins class="diff-new">
+true
+</ins></code></dt><dd><ins class="diff-new">
+If
+set
+to
+</ins><code><ins class="diff-new">
+true
+</ins></code>,<ins class="diff-new">
+the
+JSON-LD
+processor
+replaces
+arrays
+with
+just
+one
+element
+with
+that
+element
+during
+compaction.
+If
+set
+to
+</ins><code><ins class="diff-new">
+false
+</ins></code>,<ins class="diff-new">
+all
+arrays
+will
+remain
+arrays
+even
+if
+they
+have
+just
+one
+element.
+</ins></dd><dt id="widl-JsonLdOptions-expandContext"><code><ins class="diff-new">
+expandContext
+</ins></code><ins class="diff-new">
+of
+type
+</ins><span class="idlMemberType"><a><ins class="diff-new">
+object
+or
+DOMString
+</ins></a></span>,<ins class="diff-new">
+defaulting
+to
+</ins><code><ins class="diff-new">
+null
+</ins></code></dt><dd><ins class="diff-new">
+A
+context
+that
+is
+used
+to
+initialize
+the
+active
+context
+when
+expanding
+a
+document.
+</ins></dd><dt id="widl-JsonLdOptions-optimize"><code><ins class="diff-new">
+optimize
+</ins></code><ins class="diff-new">
+of
+type
+</ins><span class="idlMemberType"><a><ins class="diff-new">
+boolean
+</ins></a></span>,<ins class="diff-new">
+defaulting
+to
+</ins><code><ins class="diff-new">
+false
+</ins></code></dt><dd><ins class="diff-new">
+If
+set
+to
+</ins><code><ins class="diff-new">
+true
+</ins></code>,<ins class="diff-new">
+the
+JSON-LD
+processor
+is
+allowed
+to
+optimize
+the
+output
+of
+the
+</ins><a href="#compaction-algorithm"><ins class="diff-new">
+Compaction
+Algorithm
+</ins></a><ins class="diff-new">
+to
+produce
+even
+compacter
+representations.
+The
+algorithm
+for
+compaction
+optimization
+is
+beyond
+the
+scope
+of
+this
+specification
+and
+thus
+not
+defined.
+Consequently,
+different
+implementations
+</ins><em class="rfc2119" title="may"><ins class="diff-new">
+may
+</ins></em><ins class="diff-new">
+implement
+different
+optimization
+algorithms.
+</ins></dd><dt id="widl-JsonLdOptions-useNativeTypes"><code><ins class="diff-new">
+useNativeTypes
+</ins></code><ins class="diff-new">
+of
+type
+</ins><span class="idlMemberType"><a><ins class="diff-new">
+boolean
+</ins></a></span>,<ins class="diff-new">
+defaulting
+to
+</ins><code><ins class="diff-new">
+true
+</ins></code></dt><dd><ins class="diff-new">
+If
+set
+to
+</ins><code><ins class="diff-new">
+true
+</ins></code>,<ins class="diff-new">
+the
+JSON-LD
+processor
+will
+try
+to
+convert
+</ins><a class="tref internalDFN" title="typed_value" href="#dfn-typed_value"><ins class="diff-new">
+typed
+values
+</ins></a><ins class="diff-new">
+to
+JSON
+native
+types
+instead
+of
+using
+the
+expanded
+object
+form
+when
+</ins><a href="#convert-from-rdf-algorithm"><ins class="diff-new">
+converting
+from
+RDF
+</ins></a>.<code><ins class="diff-new">
+xsd:boolean
+</ins></code><ins class="diff-new">
+values
+will
+be
+converted
+to
+</ins><a class="tref internalDFN" title="true" href="#dfn-true"><ins class="diff-new">
+true
+</ins></a><ins class="diff-new">
+or
+</ins><a class="tref internalDFN" title="false" href="#dfn-false"><ins class="diff-new">
+false
+</ins></a>.<code><ins class="diff-new">
+xsd:integer
+</ins></code><ins class="diff-new">
+and
+</ins><code><ins class="diff-new">
+xsd:double
+</ins></code><ins class="diff-new">
+values
+will
+be
+converted
+to
+</ins><a class="tref internalDFN" title="number" href="#dfn-number"><ins class="diff-new">
+JSON
+numbers
+</ins></a>.</dd><dt id="widl-JsonLdOptions-useRdfType"><code><ins class="diff-new">
+useRdfType
+</ins></code><ins class="diff-new">
+of
+type
+</ins><span class="idlMemberType"><a><ins class="diff-new">
+boolean
+</ins></a></span>,<ins class="diff-new">
+defaulting
+to
+</ins><code><ins class="diff-new">
+false
+</ins></code></dt><dd><ins class="diff-new">
+If
+set
+to
+</ins><code><ins class="diff-new">
+true
+</ins></code>,<ins class="diff-new">
+the
+JSON-LD
+processor
+will
+use
+the
+expanded
+</ins><code><ins class="diff-new">
+rdf:type
+</ins></code><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+as
+the
+property
+instead
+of
+</ins><code><ins class="diff-new">
+@type
+</ins></code><ins class="diff-new">
+when
+</ins><a href="#convert-from-rdf-algorithm"><ins class="diff-new">
+converting
+from
+RDF
+</ins></a>.</dd></dl></section></section><section id="jsonldprocessingerror"><h4><span class="secno"><ins class="diff-new">
+6.3.2
+</ins></span><ins class="diff-new">
+JsonLdProcessingError
+</ins></h4><div class="issue"><div class="issue-title"><a href="https://github.com/json-ld/json-ld.org/issues/153"><span><ins class="diff-new">
+Issue
+153
+</ins></span></a></div><p class=""><ins class="diff-new">
+Developers
+should
+note
+that
+the
+details
+of
+error
+handling
+are
+being
+actively
+debated.
+</ins></p>
+</div>
+<p>
+<ins class="diff-new">The
+</ins><a href="#idl-def-JsonLdProcessingError" class="idlType"><code><ins class="diff-new">
+JsonLdProcessingError
+</ins></code></a><ins class="diff-new">
+type
+is
+used
+to
+report
+errors
+to
+a
+</ins><a href="#idl-def-JsonLdCallback" class="idlType"><code><ins class="diff-new">
+JsonLdCallback
+</ins></code></a>.</p> <pre class="idl"><span class="idlDictionary" id="idl-def-JsonLdProcessingError">dictionary <span class="idlDictionaryID">JsonLdProcessingError</span> {<span class="idlMember"> <span class="idlMemberType"><a href="#idl-def-JsonLdErrorCode" class="idlType"><code>JsonLdErrorCode</code></a></span> <span class="idlMemberName"><a href="#widl-JsonLdProcessingError-code">code</a></span>;</span><span class="idlMember"> <span class="idlMemberType"><a>DOMString</a>?</span> <span class="idlMemberName"><a href="#widl-JsonLdProcessingError-message">message</a></span>;</span><ins class="diff-new">
+};
+</ins></span></pre><section><h5 id="dictionary-jsonldprocessingerror-members"><ins class="diff-new">
+Dictionary
+</ins><a class="idlType" href="#idl-def-JsonLdProcessingError"><code><ins class="diff-new">
+JsonLdProcessingError
+</ins></code></a><ins class="diff-new">
+Members
+</ins></h5><dl class="dictionary-members"><dt id="widl-JsonLdProcessingError-code"><code><ins class="diff-new">
+code
+</ins></code><ins class="diff-new">
+of
+type
+</ins><span class="idlMemberType"><a href="#idl-def-JsonLdErrorCode" class="idlType"><code><ins class="diff-new">
+JsonLdErrorCode
+</ins></code></a></span></dt><dd><ins class="diff-new">
+a
+string
+representing
+the
+particular
+error
+type,
+as
+described
+in
+the
+various
+algorithms
+in
+this
+document.
+</ins></dd><dt id="widl-JsonLdProcessingError-message"><code><ins class="diff-new">
+message
+</ins></code><ins class="diff-new">
+of
+type
+</ins><span class="idlMemberType"><a><ins class="diff-new">
+DOMString
+</ins></a></span>,<ins class="diff-new">
+nullable
+</ins></dt><dd><ins class="diff-new">
+an
+optional
+error
+message
+containing
+additional
+debugging
+information.
+The
+specific
+contents
+of
+error
+messages
+are
+outside
+the
+scope
+of
+this
+specification
+and
+thus
+implementation
+dependent.
+</ins></dd></dl></section></section><section id="jsonlderrorcode"><h4><span class="secno"><ins class="diff-new">
+6.3.3
+</ins></span><ins class="diff-new">
+JsonLdErrorCode
+</ins></h4><p><ins class="diff-new">
+The
+JsonLdErrorCode
+represent
+the
+collection
+of
+valid
+JSON-LD
+error
+codes.
+</ins></p> <pre class="idl"><span class="idlEnum" id="idl-def-JsonLdErrorCode">enum <span class="idlEnumID">JsonLdErrorCode</span> {<ins class="diff-new">
+ "<span class="idlEnumItem">INVALID_SYNTAX</span>",
+ "<span class="idlEnumItem">LOAD_ERROR</span>",
+ "<span class="idlEnumItem">LIST_OF_LISTS_DETECTED</span>"
+};
+</ins></span></pre><table class="simple"><tr><th colspan="2"><ins class="diff-new">
+Enumeration
+description
+</ins></th></tr><tr><td><code><ins class="diff-new">
+INVALID_SYNTAX
+</ins></code></td><td><ins class="diff-new">
+A
+violation
+of
+the
+grammar
+as
+defined
+by
+the
+JSON-LD
+syntax
+specification
+[
+</ins><cite><a class="bibref" href="#bib-JSON-LD"><ins class="diff-new">
+JSON-LD
+</ins></a></cite><ins class="diff-new">
+]
+was
+detected.
+</ins></td></tr><tr><td><code><ins class="diff-new">
+LOAD_ERROR
+</ins></code></td><td><ins class="diff-new">
+There
+was
+a
+problem
+encountered
+loading
+a
+remote
+context.
+</ins></td></tr><tr><td><code><ins class="diff-new">
+LIST_OF_LISTS_DETECTED
+</ins></code></td><td><ins class="diff-new">
+A
+list
+of
+lists
+was
+detected.
+List
+of
+lists
+are
+not
+supported
+in
+this
+version
+of
+JSON-LD
+due
+to
+the
+algorithmic
+complexity
+associated
+with
+conversion
+to
+RDF.
+</ins></td></tr></table></section></section>
+</section>
+<section class="appendix" id="acknowledgements">
+<h2>
+<span class="secno">
+A.
+</span>
+Acknowledgements
+</h2>
+<p>
+A
+large
+amount
+of
+thanks
+goes
+out
+to
+the
+JSON-LD
+Community
+Group
+participants
+who
+worked
+through
+many
+of
+the
+technical
+issues
+on
+the
+mailing
+list
+and
+the
+weekly
+telecons
+-
+of
+special
+mention
+are
+Niklas
+Lindström,
+François
+Daoust,
+<ins class="diff-new">Lin
+Clark,
+</ins>
+and
+Zdenko
+'Denny'
+Vrandečić.
+The
+editors
+would
+like
+to
+thank
+Mark
+Birbeck,
+who
+provided
+a
+great
+deal
+of
+the
+initial
+push
+behind
+the
+JSON-LD
+work
+via
+his
+work
+on
+RDFj.
+The
+work
+of
+Dave
+Lehn
+and
+Mike
+Johnson
+are
+appreciated
+for
+reviewing,
+and
+performing
+several
+implementations
+of
+the
+specification.
+Ian
+Davis
+is
+thanked
+for
+<del class="diff-old">this
+</del>
+<ins class="diff-chg">his
+</ins>
+work
+on
+RDF/JSON.
+Thanks
+also
+to
+Nathan
+Rixham,
+Bradley
+P.
+Allen,
+Kingsley
+Idehen,
+Glenn
+McDonald,
+Alexandre
+Passant,
+Danny
+Ayers,
+Ted
+Thibodeau
+Jr.,
+Olivier
+Grisel,
+Josh
+Mandel,
+Eric
+Prud'hommeaux,
+David
+Wood,
+Guus
+Schreiber,
+Pat
+Hayes,
+Sandro
+Hawke,
+and
+Richard
+Cyganiak
+<del class="diff-old">for
+</del>
+<ins class="diff-chg">or
+</ins>
+their
+input
+on
+the
+specification.
+</p>
+</section>
+<section id="references" class="appendix" typeof="bibo:Chapter" resource="#references" rel="bibo:chapter">
+<h2>
+<span class="secno">
+B.
+</span>
+References
+</h2>
+<section id="normative-references" typeof="bibo:Chapter" resource="#normative-references" rel="bibo:chapter">
+<h3>
+<span class="secno">
+B.1
+</span>
+Normative
+references
+</h3>
+<del class="diff-old">[BCP47]
+A.
+Phillips;
+M.
+Davis.
+Tags
+for
+Identifying
+Languages
+September
+2009.
+IETF
+Best
+Current
+Practice.
+URL:
+http://tools.ietf.org/html/bcp47
+</del>
+<dl class="bibliography" about="">
+<dt id="bib-IEEE-754-1985">
+[IEEE-754-1985]
+</dt>
+<dd rel="dcterms:requires">
+IEEE.
+<cite>
+IEEE
+Standard
+for
+Binary
+Floating-Point
+Arithmetic.
+</cite>
+See
+<a href="http://standards.ieee.org/reading/ieee/std_public/description/busarch/754-1985_desc.html">
+http://standards.ieee.org/reading/ieee/std_public/description/busarch/754-1985_desc.html
+</a>
+</dd>
+<dt id="bib-JSON-LD">
+[JSON-LD]
+</dt>
+<dd rel="dcterms:requires">
+<cite>
+<a href="http://json-ld.org/spec/ED/json-ld-syntax/20120522/">
+The
+JSON-LD
+Syntax
+</a>
+</cite>
+Manu
+Sporny,
+Gregg
+Kellogg,
+Markus
+Lanthaler
+Editors.
+World
+Wide
+Web
+Consortium
+(work
+in
+progress).
+22
+May
+2012.
+Editor's
+Draft.
+This
+edition
+of
+the
+JSON-LD
+Syntax
+specification
+is
+http://json-ld.org/spec/ED/json-ld-syntax/20120522/.
+The
+<a href="http://json-ld.org/spec/latest/json-ld-syntax/">
+latest
+edition
+of
+the
+JSON-LD
+Syntax
+</a>
+is
+available
+at
+http://json-ld.org/spec/latest/json-ld-syntax/
+</dd>
+<del class="diff-old">[JSON-POINTER]
+JSON
+Pointer
+P.
+Bryan,
+Ed.
+IETF
+Draft.
+URL:
+http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-02
+</del>
+<dt id="bib-RDF-CONCEPTS">
+[RDF-CONCEPTS]
+</dt>
+<dd rel="dcterms:requires">
+<cite>
+<a href="http://www.w3.org/TR/2011/WD-rdf11-concepts-20110830/">
+RDF
+1.1
+Concepts
+and
+Abstract
+Syntax
+</a>
+</cite>
+Richard
+Cyganiak,
+David
+Wood,
+Editors.
+World
+Wide
+Web
+Consortium
+(work
+in
+progress).
+30
+May
+2012.
+Editor's
+Draft.
+This
+edition
+of
+the
+JSON-LD
+Syntax
+specification
+is
+http://www.w3.org/TR/2011/WD-rdf11-concepts-20110830/.
+The
+<a href="http://www.w3.org/TR/rdf11-concepts/">
+latest
+edition
+of
+the
+JSON-LD
+Syntax
+</a>
+is
+available
+at
+http://www.w3.org/TR/rdf11-concepts/
+</dd>
+<dt id="bib-RDF-SCHEMA">
+[RDF-SCHEMA]
+</dt>
+<dd rel="dcterms:requires">
+Dan
+Brickley;
+Ramanathan
+V.
+Guha.
+<a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">
+<cite>
+RDF
+Vocabulary
+Description
+Language
+1.0:
+RDF
+Schema.
+</cite>
+</a>
+10
+February
+2004.
+W3C
+Recommendation.
+URL:
+<a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">
+http://www.w3.org/TR/2004/REC-rdf-schema-20040210
+</a>
+</dd>
+<dt id="bib-RFC2119">
+<ins class="diff-new">[RFC2119]
+</ins></dt><dd rel="dcterms:requires"><ins class="diff-new">
+S.
+Bradner.
+</ins><a href="http://www.ietf.org/rfc/rfc2119.txt"><cite><ins class="diff-new">
+Key
+words
+for
+use
+in
+RFCs
+to
+Indicate
+Requirement
+Levels.
+</ins></cite></a><ins class="diff-new">
+March
+1997.
+Internet
+RFC
+2119.
+URL:
+</ins><a href="http://www.ietf.org/rfc/rfc2119.txt"><ins class="diff-new">
+http://www.ietf.org/rfc/rfc2119.txt
+</ins></a></dd>
+<dt id="bib-RFC3986">
+[RFC3986]
+</dt>
+<dd rel="dcterms:requires">
+T.
+Berners-Lee;
+R.
+Fielding;
+L.
+Masinter.
+<a href="http://www.ietf.org/rfc/rfc3986.txt">
+<cite>
+Uniform
+Resource
+Identifier
+(URI):
+Generic
+Syntax.
+</cite>
+</a>
+January
+2005.
+Internet
+RFC
+3986.
+URL:
+<a href="http://www.ietf.org/rfc/rfc3986.txt">
+http://www.ietf.org/rfc/rfc3986.txt
+</a>
+</dd>
+<dt id="bib-RFC3987">
+[RFC3987]
+</dt>
+<dd rel="dcterms:requires">
+M.
+Dürst;
+M.
+Suignard.
+<a href="http://www.ietf.org/rfc/rfc3987.txt">
+<cite>
+Internationalized
+Resource
+Identifiers
+(IRIs).
+</cite>
+</a>
+January
+2005.
+Internet
+RFC
+3987.
+URL:
+<a href="http://www.ietf.org/rfc/rfc3987.txt">
+http://www.ietf.org/rfc/rfc3987.txt
+</a>
+</dd>
+<dt id="bib-RFC4627">
+[RFC4627]
+</dt>
+<dd rel="dcterms:requires">
+D.
+Crockford.
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+<cite>
+The
+application/json
+Media
+Type
+for
+JavaScript
+Object
+Notation
+(JSON)
+</cite>
+</a>
+July
+2006.
+Internet
+RFC
+4627.
+URL:
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+http://www.ietf.org/rfc/rfc4627.txt
+</a>
+</dd>
+<dt id="bib-WEBIDL">
+[WEBIDL]
+</dt>
+<dd rel="dcterms:requires">
+<cite>
+<a href="http://www.w3.org/TR/2012/CR-WebIDL-20120419/">
+Web
+IDL
+</a>
+</cite>
+Cameron
+McCormack,
+Editor.
+World
+Wide
+Web
+Consortium.
+19
+April
+2012.
+Candidate
+Recommendataion.
+This
+edition
+of
+Web
+IDL
+is
+http://www.w3.org/TR/2012/CR-WebIDL-20120419/.
+The
+<a href="http://dev.w3.org/2006/webapi/WebIDL/">
+latest
+edition
+of
+Web
+IDL
+</a>
+is
+available
+at
+http://dev.w3.org/2006/webapi/WebIDL/
+</dd>
+<dt id="bib-XMLSCHEMA11-2">
+[XMLSCHEMA11-2]
+</dt>
+<dd rel="dcterms:requires">
+Henry
+S.
+Thompson;
+et
+al.
+<a href="http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/">
+<cite>
+W3C
+XML
+Schema
+Definition
+Language
+(XSD)
+1.1
+Part
+2:
+Datatypes.
+</cite>
+</a>
+5
+April
+2012.
+W3C
+Recommendation
+URL:
+<a href="http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/">
+http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/
+</a>
+</dd>
+</dl>
+</section>
+<section id="informative-references" typeof="bibo:Chapter" resource="#informative-references" rel="bibo:chapter">
+<h3>
+<span class="secno">
+B.2
+</span>
+Informative
+references
+</h3>
+<dl class="bibliography" about="">
+<dt id="bib-BCP47">
+<ins class="diff-chg">[BCP47]
+</ins></dt><dd rel="dcterms:references"><ins class="diff-chg">
+A.
+Phillips;
+M.
+Davis.
+</ins><a href="http://tools.ietf.org/html/bcp47"><cite><ins class="diff-chg">
+Tags
+for
+Identifying
+Languages
+</ins></cite></a><ins class="diff-chg">
+September
+2009.
+IETF
+Best
+Current
+Practice.
+URL:
+</ins><a href="http://tools.ietf.org/html/bcp47"><ins class="diff-chg">
+http://tools.ietf.org/html/bcp47
+</ins></a></dd>
+<dt id="bib-ECMA-262">
+[ECMA-262]
+</dt>
+<dd rel="dcterms:references">
+<a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">
+<cite>
+ECMAScript
+Language
+Specification.
+</cite>
+</a>
+June
+2011.
+URL:
+<a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">
+http://www.ecma-international.org/publications/standards/Ecma-262.htm
+</a>
+</dd>
+<dt id="bib-JSON-LD-TESTS">
+<ins class="diff-new">[JSON-LD-TESTS]
+</ins></dt><dd rel="dcterms:references"><cite><a href="http://dvcs.w3.org/hg/json-ld/raw-file/default/test-suite/"><ins class="diff-new">
+JSON-LD
+Test
+Suite
+</ins></a></cite><ins class="diff-new">
+(work
+in
+progress).
+</ins></dd>
+<dt id="bib-TURTLE-TR">
+[TURTLE-TR]
+</dt>
+<dd rel="dcterms:references">
+Eric
+Prud'hommeaux,
+Gavin
+Carothers.
+<cite>
+<a href="http://www.w3.org/TR/2011/WD-turtle-20110809/">
+Turtle:
+Terse
+RDF
+Triple
+Language.
+</a>
+</cite>
+09
+August
+2011.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/2011/WD-turtle-20110809/">
+http://www.w3.org/TR/2011/WD-turtle-20110809/
+<del class="diff-old">[UNICODE]
+The
+Unicode
+Consortium.
+The
+Unicode
+Standard.
+2003.
+Defined
+by:
+The
+Unicode
+Standard,
+Version
+4.0
+(Boston,
+MA,
+Addison-Wesley,
+ISBN
+0-321-18578-1),
+as
+updated
+from
+time
+to
+time
+by
+the
+publication
+of
+new
+versions
+URL:
+http://www.unicode.org/unicode/standard/versions/enumeratedversions.html
+</del>
+</a>
+</dd>
+</dl>
+</section>
+</section>
+</body>
+</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-api/20121225/index.html Sun Dec 23 13:52:00 2012 -0500
@@ -0,0 +1,2861 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML+RDFa 1.1//EN' 'http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" prefix='bibo: http://purl.org/ontology/bibo/' typeof="bibo:Document">
+<head>
+<title>JSON-LD Algorithms 1.0</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--
+ === NOTA BENE ===
+ For the three scripts below, if your spec resides on dev.w3 you can check them
+ out in the same tree and use relative links so that they'll work offline,
+ -->
+
+
+
+
+<style type="text/css">
+ .diff { font-weight:bold; color:#0a3; }
+</style>
+<style>/*****************************************************************
+ * ReSpec 3 CSS
+ * Robin Berjon - http://berjon.com/
+ *****************************************************************/
+
+/* --- INLINES --- */
+em.rfc2119 {
+ text-transform: lowercase;
+ font-variant: small-caps;
+ font-style: normal;
+ color: #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+ border: none;
+}
+
+dfn {
+ font-weight: bold;
+}
+
+a.internalDFN {
+ color: inherit;
+ border-bottom: 1px solid #99c;
+ text-decoration: none;
+}
+
+a.externalDFN {
+ color: inherit;
+ border-bottom: 1px dotted #ccc;
+ text-decoration: none;
+}
+
+a.bibref {
+ text-decoration: none;
+}
+
+cite .bibref {
+ font-style: normal;
+}
+
+code {
+ color: #ff4500;
+}
+
+
+/* --- --- */
+ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+/* --- TOC --- */
+.toc a, .tof a {
+ text-decoration: none;
+}
+
+a .secno, a .figno {
+ color: #000;
+}
+
+ul.tof, ol.tof {
+ list-style: none outside none;
+}
+
+.caption {
+ margin-top: 0.5em;
+ font-style: italic;
+}
+
+/* --- TABLE --- */
+table.simple {
+ border-spacing: 0;
+ border-collapse: collapse;
+ border-bottom: 3px solid #005a9c;
+}
+
+.simple th {
+ background: #005a9c;
+ color: #fff;
+ padding: 3px 5px;
+ text-align: left;
+}
+
+.simple th[scope="row"] {
+ background: inherit;
+ color: inherit;
+ border-top: 1px solid #ddd;
+}
+
+.simple td {
+ padding: 3px 10px;
+ border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+ background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+ margin-top: 0;
+}
+
+.section dd > p:last-child {
+ margin-bottom: 0;
+}
+
+.section dd {
+ margin-bottom: 1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+ margin-bottom: 0;
+}
+</style><style>/* --- EXAMPLES --- */
+div.example-title {
+ min-width: 7.5em;
+ color: #b9ab2d;
+}
+div.example-title span {
+ text-transform: uppercase;
+}
+aside.example, div.example, div.illegal-example {
+ padding: 0.5em;
+ margin: 1em 0;
+ position: relative;
+ clear: both;
+}
+div.illegal-example { color: red }
+div.illegal-example p { color: black }
+aside.example, div.example {
+ padding: .5em;
+ border-left-width: .5em;
+ border-left-style: solid;
+ border-color: #e0cb52;
+ background: #fcfaee;
+}
+
+aside.example div.example {
+ border-left-width: .1em;
+ border-color: #999;
+ background: #fff;
+}
+aside.example div.example div.example-title {
+ color: #999;
+}
+</style><style>/* --- ISSUES/NOTES --- */
+div.issue-title, div.note-title {
+ padding-right: 1em;
+ min-width: 7.5em;
+ color: #b9ab2d;
+}
+div.issue-title { color: #e05252; }
+div.note-title { color: #52e052; }
+div.issue-title span, div.note-title span {
+ text-transform: uppercase;
+}
+div.note, div.issue {
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+.note > p:first-child, .issue > p:first-child { margin-top: 0 }
+.issue, .note {
+ padding: .5em;
+ border-left-width: .5em;
+ border-left-style: solid;
+}
+div.issue, div.note {
+ padding: 0.5em;
+ margin: 1em 0;
+ position: relative;
+ clear: both;
+}
+span.note, span.issue { padding: .1em .5em .15em; }
+
+.issue {
+ border-color: #e05252;
+ background: #fbe9e9;
+}
+.note {
+ border-color: #52e052;
+ background: #e9fbe9;
+}
+
+
+</style><style>/* --- WEB IDL --- */
+pre.idl {
+ border-top: 1px solid #90b8de;
+ border-bottom: 1px solid #90b8de;
+ padding: 1em;
+ line-height: 120%;
+}
+
+pre.idl::before {
+ content: "WebIDL";
+ display: block;
+ width: 150px;
+ background: #90b8de;
+ color: #fff;
+ font-family: initial;
+ padding: 3px;
+ font-weight: bold;
+ margin: -1em 0 1em -1em;
+}
+
+.idlType {
+ color: #ff4500;
+ font-weight: bold;
+ text-decoration: none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID, .idlDictionaryID, .idlCallbackID, .idlEnumID {
+ font-weight: bold;
+ color: #005a9c;
+}
+
+.idlSuperclass {
+ font-style: italic;
+ color: #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType, .idlMemberType {
+ color: #005a9c;
+}
+.idlAttrName, .idlFieldName, .idlMemberName {
+ color: #ff4500;
+}
+.idlAttrName a, .idlFieldName a, .idlMemberName a {
+ color: #ff4500;
+ border-bottom: 1px dotted #ff4500;
+ text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType, .idlCallbackType {
+ color: #005a9c;
+}
+.idlMethName {
+ color: #ff4500;
+}
+.idlMethName a {
+ color: #ff4500;
+ border-bottom: 1px dotted #ff4500;
+ text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+ color: #005a9c;
+}
+.idlParamName {
+ font-style: italic;
+}
+
+.extAttr {
+ color: #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+ color: #005a9c;
+}
+.idlConstName {
+ color: #ff4500;
+}
+.idlConstName a {
+ color: #ff4500;
+ border-bottom: 1px dotted #ff4500;
+ text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+ font-weight: bold;
+ color: #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+ color: #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+ color: #c00;
+ font-weight: normal;
+}
+
+.excName a {
+ font-family: monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+ border-bottom: 1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+ width: 45px;
+ text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color: #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color: #c00; }
+
+.idlImplements a {
+ font-weight: bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields, dl.dictionary-members {
+ margin-left: 2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt, .dictionary-members dt {
+ font-weight: normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code, .dictionary-members dt code {
+ font-weight: bold;
+ color: #000;
+ font-family: monospace;
+}
+
+.attributes dt code, .fields dt code, .dictionary-members dt code {
+ background: #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code, .dictionary-members dt .idlMemberType code {
+ color: #005a9c;
+ background: transparent;
+ font-family: inherit;
+ font-weight: normal;
+ font-style: italic;
+}
+
+.methods dt code {
+ background: #d9e6f8;
+}
+
+.constants dt code {
+ background: #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd, .dictionary-members dd {
+ margin-bottom: 1em;
+}
+
+table.parameters, table.exceptions {
+ border-spacing: 0;
+ border-collapse: collapse;
+ margin: 0.5em 0;
+ width: 100%;
+}
+table.parameters { border-bottom: 1px solid #90b8de; }
+table.exceptions { border-bottom: 1px solid #deb890; }
+
+.parameters th, .exceptions th {
+ color: #fff;
+ padding: 3px 5px;
+ text-align: left;
+ font-family: initial;
+ font-weight: normal;
+ text-shadow: #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+ padding: 3px 10px;
+ border-top: 1px solid #ddd;
+ vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+ border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+ width: 100px;
+}
+
+.parameters td.prmType {
+ width: 120px;
+}
+
+table.exceptions table {
+ border-spacing: 0;
+ border-collapse: collapse;
+ width: 100%;
+}
+</style><link rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/W3C-ED" />
+<!--[if lt IE 9]><script src='http://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]-->
+</head>
+
+<body><div class="head">
+ <p>
+
+ <a href="http://www.w3.org/"><img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C" /></a>
+
+ </p>
+ <h1 class="title" id="title">JSON-LD Algorithms 1.0</h1>
+
+ <h2 id="subtitle">Algorithms for Processing JSON-LD Documents</h2>
+
+ <h2 id="w3c-editor-s-draft-25-december-2012"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft 25 December 2012</h2>
+ <dl>
+
+ <dt>This version:</dt>
+ <dd><a href="http://dvcs.w3.org/hg/json-ld/file/default/spec/ED/json-ld-api/20121225/index.html">http://dvcs.w3.org/hg/json-ld/file/default/spec/ED/json-ld-api/20121225/index.html</a></dd>
+ <dt>Latest published version:</dt>
+ <dd><a href="http://www.w3.org/TR/json-ld-api/">http://www.w3.org/TR/json-ld-api/</a></dd>
+
+
+ <dt>Latest editor's draft:</dt>
+ <dd><a href="http://dvcs.w3.org/hg/json-ld/raw-file/default/spec/latest/json-ld-api/index.html">http://dvcs.w3.org/hg/json-ld/raw-file/default/spec/latest/json-ld-api/index.html</a></dd>
+
+
+
+
+
+
+
+
+ <dt>Editors:</dt>
+ <dd rel="bibo:editor" inlist=""><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Manu Sporny" href="http://manu.sporny.org/">Manu Sporny</a>, <a rel="foaf:workplaceHomepage" href="http://digitalbazaar.com/">Digital Bazaar</a></span>
+</dd>
+<dd rel="bibo:editor" inlist=""><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Gregg Kellogg" href="http://greggkellogg.net/">Gregg Kellogg</a>, <a rel="foaf:workplaceHomepage" href="http://kellogg-assoc.com/">Kellogg Associates</a></span>
+</dd>
+<dd rel="bibo:editor" inlist=""><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Markus Lanthaler" href="http://www.markus-lanthaler.com/">Markus Lanthaler</a>, <a rel="foaf:workplaceHomepage" href="http://www.tugraz.at/">Graz University of Technology</a></span>
+</dd>
+
+
+ <dt>Authors:</dt>
+ <dd rel="dcterms:contributor"><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Dave Longley" href="http://digitalbazaar.com/">Dave Longley</a>, <a rel="foaf:workplaceHomepage" href="http://digitalbazaar.com/">Digital Bazaar</a></span>
+</dd>
+<dd rel="dcterms:contributor"><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Manu Sporny" href="http://digitalbazaar.com/">Manu Sporny</a>, <a rel="foaf:workplaceHomepage" href="http://digitalbazaar.com/">Digital Bazaar</a></span>
+</dd>
+<dd rel="dcterms:contributor"><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Gregg Kellogg" href="http://greggkellogg.net/">Gregg Kellogg</a>, <a rel="foaf:workplaceHomepage" href="http://kellogg-assoc.com/">Kellogg Associates</a></span>
+</dd>
+<dd rel="dcterms:contributor"><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Markus Lanthaler" href="http://www.markus-lanthaler.com/">Markus Lanthaler</a>, <a rel="foaf:workplaceHomepage" href="http://www.tugraz.at/">Graz University of Technology</a></span>
+</dd>
+
+
+ </dl>
+
+
+ <p>
+
+ This document is also available in this non-normative format:
+
+ <a href="diff-20120930.html">diff to previous version</a>
+ </p>
+
+
+
+
+ <p class="copyright">
+ <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> ©
+ 2010-2012
+
+ <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup>
+ (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>,
+ <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>,
+ <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved.
+ <abbr title="World Wide Web Consortium">W3C</abbr> <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
+ <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and
+ <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.
+ </p>
+
+
+ <hr />
+</div>
+<section id="abstract" class="introductory" property="dcterms:abstract" datatype="" typeof="bibo:Chapter" resource="#abstract" rel="bibo:chapter"><h2>Abstract</h2>
+<p>
+JSON [<cite><a class="bibref" href="#bib-RFC4627">RFC4627</a></cite>] has proven to be a highly useful object serialization and
+messaging format. JSON-LD [<cite><a class="bibref" href="#bib-JSON-LD">JSON-LD</a></cite>] harmonizes the representation of
+Linked Data in JSON by outlining a common JSON representation format for
+expressing directed graphs; mixing both Linked Data and non-Linked Data in
+a single document. This document outlines an Application Programming
+Interface and a set of algorithms for programmatically transforming
+JSON-LD documents in order to make them easier to work with in programming
+environments like JavaScript, Python, and Ruby.
+</p>
+</section><section id="sotd" class="introductory" typeof="bibo:Chapter" resource="#sotd" rel="bibo:chapter"><h2>Status of This Document</h2>
+
+
+
+ <p>
+ <em>This section describes the status of this document at the time of its publication. Other
+ documents may supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and the latest revision
+ of this technical report can be found in the <a href="http://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical reports
+ index</a> at http://www.w3.org/TR/.</em>
+ </p>
+
+<p>This document has been under development for over 18 months in the
+JSON for Linking Data Community Group. The document has recently been
+transferred to the RDF Working Group for review, improvement, and publication
+along the Recommendation track. The specification has undergone significant
+development, review, and changes during the course of the last 18 months.
+</p>
+<p>There are several independent
+<a href="http://json-ld.org/#impl">interoperable implementations</a> of
+this specification. There is
+a <a href="https://github.com/json-ld/json-ld.org/tree/master/test-suite">fairly complete test suite</a>
+and a <a href="http://json-ld.org/playground/">live JSON-LD editor</a>
+that is capable of demonstrating the features described in
+this document. While development on implementations, the test suite
+and the live editor will continue, they are believed to be mature enough
+to be integrated into a non-production system at this point in time with
+the expectation that they could be used in a production system within the
+next year.
+</p>
+<div class="issue"><div class="issue-title"><span>Issue</span></div><p class="">
+It is important for readers to understand that the scope of this document is
+currently under debate and new features may be added to the specification.
+Existing features may be modified heavily or removed entirely from the
+specification upon further review and feedback from the broader community.
+This is a work in progress and publication as a Working Draft
+does not require that all Working Group members agree on the content of the
+document.
+</p></div>
+
+<p>There are a number of ways that one may participate in the development of
+ this specification:</p>
+
+<ul>
+ <li>If you want to make sure that your feedback is formally addressed by
+ the RDF Working Group, you should send it to public-rdf-comments:
+ <a href="http://lists.w3.org/Archives/Public/public-rdf-comments/">public-rdf-comments@w3.org</a></li>
+
+ <li>Ad-hoc technical discussion primarily occurs on the public community mailing list:
+ <a href="http://lists.w3.org/Archives/Public/public-linked-json/">public-linked-json@w3.org</a></li>
+
+ <li><a href="http://json-ld.org/minutes/">Public JSON-LD Community Group teleconferences</a>
+ are held on Tuesdays at 1500UTC every week. Participation is open to the
+ public.</li>
+
+ <li>RDF Working Group teleconferences are held on Wednesdays at 1500UTC
+ every week. Participation is limited to RDF Working Group members.</li>
+
+ <li>Specification bugs and issues should be reported in the
+ <a href="https://github.com/json-ld/json-ld.org/issues">issue tracker</a>
+ if you do not want to send an e-mail to the public-rdf-comments mailing
+ list.</li>
+
+ <li><a href="https://github.com/json-ld/json-ld.org/tree/master/spec">Source code</a>
+ for the specification can be found on Github.</li>
+
+ <li>The <a href="http://webchat.freenode.net/?channels=json-ld">#json-ld</a>
+ IRC channel is available for real-time discussion on irc.freenode.net.</li>
+</ul>
+
+
+ <p>
+ This document was published by the <a href="http://www.w3.org/2011/rdf-wg/">RDF Working Group</a> as an Editor's Draft.
+
+ If you wish to make comments regarding this document, please send them to
+ <a href="mailto:public-rdf-comments@w3.org">public-rdf-comments@w3.org</a>
+ (<a href="mailto:public-rdf-comments-request@w3.org?subject=subscribe">subscribe</a>,
+ <a href="http://lists.w3.org/Archives/Public/public-rdf-comments/">archives</a>).
+
+
+ All feedback is welcome.
+ </p>
+
+ <p>
+ Publication as an Editor's Draft does not imply endorsement by the <abbr title="World Wide Web Consortium">W3C</abbr> Membership.
+ This is a draft document and may be updated, replaced or obsoleted by other documents at
+ any time. It is inappropriate to cite this document as other than work in progress.
+ </p>
+
+
+ <p>
+
+ This document was produced by a group operating under the
+ <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
+
+
+
+
+ <abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a href="http://www.w3.org/2004/01/pp-impl/46168/status" rel="disclosure">public list of any patent disclosures</a>
+
+ made in connection with the deliverables of the group; that page also includes instructions for
+ disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains
+ <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the
+ information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
+ 6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
+
+
+ </p>
+
+
+
+
+</section><section id="toc"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a></li><li class="tocline"><a href="#features" class="tocxref"><span class="secno">2. </span>Features</a><ul class="toc"><li class="tocline"><a href="#expansion" class="tocxref"><span class="secno">2.1 </span>Expansion</a></li><li class="tocline"><a href="#compaction" class="tocxref"><span class="secno">2.2 </span>Compaction</a></li><li class="tocline"><a href="#flattening" class="tocxref"><span class="secno">2.3 </span>Flattening</a></li><li class="tocline"><a href="#rdf-conversion" class="tocxref"><span class="secno">2.4 </span>RDF Conversion</a></li></ul></li><li class="tocline"><a href="#conformance" class="tocxref"><span class="secno">3. </span>Conformance</a></li><li class="tocline"><a href="#general-terminology" class="tocxref"><span class="secno">4. </span>General Terminology</a></li><li class="tocline"><a href="#algorithms" class="tocxref"><span class="secno">5. </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#algorithm-terms" class="tocxref"><span class="secno">5.1 </span>Algorithm Terms</a></li><li class="tocline"><a href="#expansion-algorithm" class="tocxref"><span class="secno">5.2 </span>Expansion Algorithm</a></li><li class="tocline"><a href="#context-processing" class="tocxref"><span class="secno">5.3 </span>Context Processing</a></li><li class="tocline"><a href="#iri-expansion" class="tocxref"><span class="secno">5.4 </span><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion</a></li><li class="tocline"><a href="#value-expansion" class="tocxref"><span class="secno">5.5 </span>Value Expansion</a></li><li class="tocline"><a href="#label-blank-nodes-algorithm" class="tocxref"><span class="secno">5.6 </span>Label Blank Nodes Algorithm</a></li><li class="tocline"><a href="#generate-blank-node-identifier" class="tocxref"><span class="secno">5.7 </span>Generate Blank Node Identifier</a></li><li class="tocline"><a href="#compaction-algorithm" class="tocxref"><span class="secno">5.8 </span>Compaction Algorithm</a></li><li class="tocline"><a href="#iri-compaction-algorithm" class="tocxref"><span class="secno">5.9 </span><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction Algorithm</a></li><li class="tocline"><a href="#inverse-context-creation" class="tocxref"><span class="secno">5.10 </span>Inverse Context Creation</a></li><li class="tocline"><a href="#inverse-context-query-algorithm" class="tocxref"><span class="secno">5.11 </span>Inverse Context Query Algorithm</a></li><li class="tocline"><a href="#value-compaction" class="tocxref"><span class="secno">5.12 </span>Value Compaction</a></li><li class="tocline"><a href="#find-and-remove-property-generator-duplicates" class="tocxref"><span class="secno">5.13 </span>Find and Remove Property Generator Duplicates</a></li><li class="tocline"><a href="#flattening-algorithm" class="tocxref"><span class="secno">5.14 </span>Flattening Algorithm</a></li><li class="tocline"><a href="#node-map-generation" class="tocxref"><span class="secno">5.15 </span>Node Map Generation</a></li><li class="tocline"><a href="#rdf-conversion-algorithms" class="tocxref"><span class="secno">5.16 </span>RDF Conversion Algorithms</a><ul class="toc"><li class="tocline"><a href="#convert-to-rdf-algorithm" class="tocxref"><span class="secno">5.16.1 </span>Convert to RDF Algorithm</a></li><li class="tocline"><a href="#list-conversion" class="tocxref"><span class="secno">5.16.2 </span>List Conversion</a></li><li class="tocline"><a href="#convert-from-rdf-algorithm" class="tocxref"><span class="secno">5.16.3 </span>Convert from RDF Algorithm</a></li><li class="tocline"><a href="#data-round-tripping" class="tocxref"><span class="secno">5.16.4 </span>Data Round Tripping</a></li></ul></li></ul></li><li class="tocline"><a href="#the-application-programming-interface" class="tocxref"><span class="secno">6. </span>The Application Programming Interface</a><ul class="toc"><li class="tocline"><a href="#jsonldprocessor" class="tocxref"><span class="secno">6.1 </span>JsonLdProcessor</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">6.1.1 </span>Methods</a></li></ul></li><li class="tocline"><a href="#callbacks" class="tocxref"><span class="secno">6.2 </span>Callbacks</a><ul class="toc"><li class="tocline"><a href="#jsonldcallback" class="tocxref"><span class="secno">6.2.1 </span>JsonLdCallback</a></li></ul></li><li class="tocline"><a href="#data-structures" class="tocxref"><span class="secno">6.3 </span>Data Structures</a><ul class="toc"><li class="tocline"><a href="#jsonldoptions" class="tocxref"><span class="secno">6.3.1 </span>JsonLdOptions</a></li><li class="tocline"><a href="#jsonldprocessingerror" class="tocxref"><span class="secno">6.3.2 </span>JsonLdProcessingError</a></li><li class="tocline"><a href="#jsonlderrorcode" class="tocxref"><span class="secno">6.3.3 </span>JsonLdErrorCode</a></li></ul></li></ul></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></section>
+
+
+
+<section class="informative" id="introduction">
+
+<!--OddPage-->
+<h2><span class="secno">1. </span>Introduction</h2><p><em>This section is non-normative.</em></p>
+
+<p>
+This document is a detailed specification for an Application Programming
+Interface for the JSON-LD Syntax. The document is primarily intended for
+the following audiences:
+</p>
+
+<ul>
+ <li>Web authors and developers that want a very detailed view of how
+ a JSON-LD processor and the API operates.</li>
+ <li>Software developers that want to implement processors and APIs for
+ JSON-LD.</li>
+</ul>
+
+<p>
+To understand the basics in this specification you must first be familiar with
+JSON, which is detailed in [<cite><a class="bibref" href="#bib-RFC4627">RFC4627</a></cite>]. You must also understand the
+JSON-LD Syntax [<cite><a class="bibref" href="#bib-JSON-LD">JSON-LD</a></cite>], which is the base syntax used by all of the
+algorithms in this document. To understand the API and how it is
+intended to operate in a programming environment, it is useful to have working
+knowledge of the JavaScript programming language [<cite><a class="bibref" href="#bib-ECMA-262">ECMA-262</a></cite>] and
+WebIDL [<cite><a class="bibref" href="#bib-WEBIDL">WEBIDL</a></cite>]. To understand how JSON-LD maps to RDF, it is helpful to be
+familiar with the basic RDF concepts [<cite><a class="bibref" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
+
+</section>
+
+<section class="informative" id="features">
+
+<!--OddPage-->
+<h2><span class="secno">2. </span>Features</h2><p><em>This section is non-normative.</em></p>
+
+<p>The JSON-LD Syntax specification [<cite><a class="bibref" href="#bib-JSON-LD">JSON-LD</a></cite>] outlines a language that may be
+ used to express Linked Data in JSON. Often, it is useful to be able to transform
+ JSON-LD documents so that they may be easily processed in various programming
+ environments.</p>
+
+<p>There are four major types of transformation that are discussed in this document:
+ expansion, compaction, flattening, and RDF conversion.</p>
+
+<section class="informative" id="expansion">
+ <h3><span class="secno">2.1 </span>Expansion</h3><p><em>This section is non-normative.</em></p>
+ <p>Software algorithms are easiest to write when the data that they are processing
+ have a regular form. Since information can be represented by JSON-LD in a
+ variety of different ways, transforming all of these methods into a uniform
+ structure allows the developer to simplify their processing code. For example,
+ note that the following input uses only <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and is fairly
+ compact:</p>
+
+ <div class="example"><div class="example-title"><span>Example 1</span></div><pre class="example">{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ },
+ "@id": "http://me.markus-lanthaler.com/",
+ "name": "Markus Lanthaler",
+ "homepage": "http://www.markus-lanthaler.com/"
+}</pre></div>
+
+ <p>The next input example uses one <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> to express a property, but leaves
+ the rest of the information untouched.</p>
+
+ <div class="example"><div class="example-title"><span>Example 2</span></div><pre class="example">{
+ "@context": {
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ },
+ "@id": "http://me.markus-lanthaler.com/",
+ "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Markus Lanthaler",
+ "homepage": "http://www.markus-lanthaler.com/"
+}</pre></div>
+
+ <p>While both inputs are valid JSON-LD, writing a program to handle every
+ permutation of possible inputs can be difficult, especially when the incoming
+ context could change as well. To ensure that the data can be given a more
+ uniform structure, JSON-LD introduces the notion of expansion. <dfn title="expansion" id="dfn-expansion">Expansion</dfn>
+ performs two important operations. The first is to expand all values that represent
+ <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a> to <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute IRIs</a>.
+ The second is to express all values in <a class="tref internalDFN" title="expanded_form" href="#dfn-expanded_form">expanded form</a>. Running the
+ <a href="#expansion-algorithm">Expansion algorithm</a> against the examples provided
+ above results in the following output:</p>
+
+ <div class="example"><div class="example-title"><span>Example 3</span></div><pre class="example">[
+ {
+ "@id": "http://me.markus-lanthaler.com/",
+ "http://xmlns.com/foaf/0.1/name": [
+ { "@value": "Markus Lanthaler" }
+ ],
+ "http://xmlns.com/foaf/0.1/homepage": [
+ { "@id": "http://www.markus-lanthaler.com/" }
+ ]
+ }
+]</pre></div>
+
+ <p>Note that in the output above all <a class="tref internalDFN" title="context" href="#dfn-context">context</a> definitions have
+ been removed, all <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> and <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefixes</a>
+ have been expanded to absolute <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a>, and all
+ <a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value">JSON-LD values</a> are expressed in <a class="tref internalDFN" title="expanded_form" href="#dfn-expanded_form">expanded form</a>.
+ While the output is more difficult for a human to read, it is easier for a
+ software program to process because of its very regular structure.</p>
+</section>
+
+<section class="informative" id="compaction">
+ <h3><span class="secno">2.2 </span>Compaction</h3><p><em>This section is non-normative.</em></p>
+ <p>While expansion expands a given input as much as possible, compaction performs
+ the opposite operation: it expresses a given input as succinctly as possible. In contrast
+ to expansion which is meant to produce something that is easy to process by software
+ programs, compaction is meant to produce something that is easy to read by software
+ developers. Compaction uses a developer-supplied <a class="tref internalDFN" title="context" href="#dfn-context">context</a> to compress
+ <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a> to <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> or
+ <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact IRIs</a> and <a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value">JSON-LD values</a>
+ expressed in <a class="tref internalDFN" title="expanded_form" href="#dfn-expanded_form">expanded form</a> to simple values such as
+ <a class="tref internalDFN" title="string" href="#dfn-string">strings</a> and <a class="tref internalDFN" title="number" href="#dfn-number">numbers</a>.</p>
+
+ <p>For example, assume the following expanded JSON-LD input document:</p>
+
+ <div class="example"><div class="example-title"><span>Example 4</span></div><pre class="example">[
+ {
+ "@id": "http://me.markus-lanthaler.com/",
+ "http://xmlns.com/foaf/0.1/name": [
+ { "@value": "Markus Lanthaler" }
+ ],
+ "http://xmlns.com/foaf/0.1/homepage": [
+ { "@id": "http://www.markus-lanthaler.com/" }
+ ]
+ }
+]</pre></div>
+
+ <p>Additionally, assume the following developer-supplied JSON-LD <a class="tref internalDFN" title="context" href="#dfn-context">context</a>:</p>
+
+ <div class="example"><div class="example-title"><span>Example 5</span></div><pre class="example">{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ }
+}</pre></div>
+
+ <p>Running the <a href="#compaction-algorithm">Compaction Algorithm</a> given the context
+ supplied above against the JSON-LD input document provided above would result in the
+ following output:</p>
+
+ <div class="example"><div class="example-title"><span>Example 6</span></div><pre class="example">{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ },
+ "@id": "http://me.markus-lanthaler.com/",
+ "name": "Markus Lanthaler",
+ "homepage": "http://www.markus-lanthaler.com/"
+}</pre></div>
+
+ <p>Note that all <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a> have been compacted to
+ <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> as specified in the <a class="tref internalDFN" title="context" href="#dfn-context">context</a>
+ which consequently has been injected into the output. While compacted
+ output is most useful to humans, it can often also be used to generate
+ structures that are easy to program against. Compaction enables developers
+ to map any expanded document into an application-specific compacted document.
+ While the context provided above mapped <code>http://xmlns.com/foaf/0.1/name</code>
+ to <code>name</code>, it could have also have been mapped to any other term
+ provided by the developer.</p>
+
+</section>
+
+<section class="informative" id="flattening">
+ <h3><span class="secno">2.3 </span>Flattening</h3><p><em>This section is non-normative.</em></p>
+ <p>While expansion ensures that a document is in a uniform structure, flattening
+ goes a step further and ensures that also the shape of the data is deterministic.
+ In expanded documents properties of a single <a class="tref internalDFN" title="node" href="#dfn-node">node</a> may still be
+ spread across a number of different <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON objects</a>.
+ By flattening a document, all properties of a <a class="tref internalDFN" title="node" href="#dfn-node">node</a> are collected in a
+ single <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> and all <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank nodes</a>
+ are labeled with a <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifier</a>. Often this drastically
+ simplifies the code to process JSON-LD data.</p>
+
+ <p>For example, assume the following JSON-LD input document:</p>
+
+ <div class="example"><div class="example-title"><span>Example 7</span></div><pre class="example">{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "knows": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "@id": "http://me.markus-lanthaler.com/",
+ "name": "Markus Lanthaler",
+ "knows": [
+ {
+ "name": "Manu Sporny",
+ "knows": {
+ "@id": "http://greggkellogg.net/foaf#me"
+ }
+ },
+ {
+ "@id": "http://greggkellogg.net/foaf#me",
+ "name": "Gregg Kellogg"
+ }
+ ]
+}</pre></div>
+
+ <p>Running the <a href="#flattening-algorithm">Flattening Algorithm</a>
+ with a context set to <a class="tref internalDFN" title="null" href="#dfn-null">null</a> to prevent compaction returns
+ the following document:</p>
+
+ <div class="example"><div class="example-title"><span>Example 8</span></div><pre class="example">[
+ {
+ "@id": "http://me.markus-lanthaler.com/",
+ "http://xmlns.com/foaf/0.1/name": [
+ { "@value": "Markus Lanthaler" }
+ ],
+ "http://xmlns.com/foaf/0.1/knows": [
+ { "@id": "_:t0" },
+ { "@id": "http://greggkellogg.net/foaf#me" }
+ ]
+ },
+ {
+ "@id": "_:t0",
+ "http://xmlns.com/foaf/0.1/name": [
+ { "@value": "Manu Sporny" }
+ ],
+ "http://xmlns.com/foaf/0.1/knows": [
+ { "@id": "http://greggkellogg.net/foaf#me" }
+ ]
+ },
+ {
+ "@id": "http://greggkellogg.net/foaf#me",
+ "http://xmlns.com/foaf/0.1/name": [
+ { "@value": "Gregg Kellogg" }
+ ]
+ }
+]</pre></div>
+
+ <p>Note how in the output above all properties of a <a class="tref internalDFN" title="node" href="#dfn-node">node</a> are collected in a
+ single <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> and how the <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a> representing
+ "Manu Sporny" has been assigned the <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifier</a>
+ <code>_:t0</code>.</p>
+
+ <p>To make it easier for humans to read such a flattened document can be compacted by
+ passing a context. Using the same context as the input document, the flattened
+ and compacted document looks as follows:</p>
+
+ <div class="example"><div class="example-title"><span>Example 9</span></div><pre class="example">{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "knows": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "@graph": [
+ {
+ "@id": "http://me.markus-lanthaler.com/",
+ "name": "Markus Lanthaler",
+ "knows": [
+ { "@id": "_:t0" },
+ { "@id": "http://greggkellogg.net/foaf#me" }
+ ]
+ },
+ {
+ "@id": "_:t0",
+ "name": "Manu Sporny",
+ "knows": {
+ "@id": "http://greggkellogg.net/foaf#me"
+ }
+ },
+ {
+ "@id": "http://greggkellogg.net/foaf#me",
+ "name": "Gregg Kellogg"
+ }
+ ]
+}</pre></div>
+
+ <p>Please note that the flattened and compacted result will always explicitly
+ designate the default by the <code>@graph</code> member in the top-level
+ <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>. <a href="#compaction">Compaction</a> optimizes that
+ member away if its value contains just one item.</p>
+</section>
+
+<section class="informative" id="rdf-conversion">
+ <h3><span class="secno">2.4 </span>RDF Conversion</h3><p><em>This section is non-normative.</em></p>
+ <p>JSON-LD can be used to serialize data expressed in RDF as described in
+ [<cite><a class="bibref" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>]. This ensures that data can be round-tripped from and to
+ any RDF syntax without any loss in the fidelity of the data.</p>
+
+ <p>For example, assume the following RDF input serialized in Turtle [<cite><a class="bibref" href="#bib-TURTLE-TR">TURTLE-TR</a></cite>]:</p>
+
+ <div class="example"><div class="example-title"><span>Example 10</span></div><pre class="example"><http://me.markus-lanthaler.com/> <http://xmlns.com/foaf/0.1/name> "Markus Lanthaler" .
+<http://me.markus-lanthaler.com/> <http://xmlns.com/foaf/0.1/homepage> <http://www.markus-lanthaler.com/> .</pre></div>
+
+ <p>Using the <a href="#convert-from-rdf-algorithm">Convert from RDF Algorithm</a> a
+ developer could transform this document into expanded JSON-LD:</p>
+
+ <div class="example"><div class="example-title"><span>Example 11</span></div><pre class="example">[
+ {
+ "@id": "http://me.markus-lanthaler.com/",
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "Markus Lanthaler"
+ }
+ ],
+ "http://xmlns.com/foaf/0.1/homepage": [
+ {
+ "@id": "http://www.markus-lanthaler.com/"
+ }
+ ]
+ }
+]</pre></div>
+
+ <p>Note that the output above could easily be compacted using the technique outlined
+ in the previous section. It is also possible to transform the JSON-LD document back
+ to RDF using the <a href="#convert-to-rdf-algorithm">Convert to RDF Algorithm</a>.</p>
+ </section>
+
+</section>
+
+<section id="conformance">
+
+<!--OddPage-->
+<h2><span class="secno">3. </span>Conformance</h2>
+
+ <p>All examples and notes as well as sections marked as non-normative in this
+ specification are non-normative. Everything else in this specification is
+ normative.</p>
+
+ <p>The keywords <em class="rfc2119" title="must">must</em>, <em class="rfc2119" title="must not">must not</em>, <em class="rfc2119" title="required">required</em>, <em class="rfc2119" title="should">should</em>, <em class="rfc2119" title="should not">should not</em>, <em class="rfc2119" title="recommended">recommended</em>,
+ <em class="rfc2119" title="may">may</em>, and <em class="rfc2119" title="optional">optional</em> in this specification are to be interpreted as described
+ in [<cite><a class="bibref" href="#bib-RFC2119">RFC2119</a></cite>].</p>
+
+ <p>There are two classes of products that can claim conformance to this
+ specification: <a class="tref internalDFN" title="json-ld_implementation" href="#dfn-json-ld_implementation">JSON-LD Implementations</a>
+ and <a class="tref internalDFN" title="json-ld_processor" href="#dfn-json-ld_processor">JSON-LD Processors</a>.</p>
+
+ <p>A conforming <dfn title="json-ld_implementation" id="dfn-json-ld_implementation">JSON-LD Implementation</dfn> is a system capable of transforming
+ JSON-LD documents according the algorithms defined in this specification.</p>
+
+ <p>A conforming <dfn title="json-ld_processor" id="dfn-json-ld_processor">JSON-LD Processor</dfn> is a conforming <a class="tref internalDFN" title="json-ld_implementation" href="#dfn-json-ld_implementation">JSON-LD Implementation</a>
+ that exposes the application programming interface (API) defined in this specification.</p>
+
+ <p>The algorithms in this specification are generally written with more concern for clarity than
+ over efficiency. Thus, JSON-LD Implementations and Processors may implement the algorithms
+ given in this specification in any way desired, so long as the end result is indistinguishable
+ from the result that would be obtained by the specification's algorithms.</p>
+
+ <p>This specification does not define how JSON-LD Implementations or Processors handle
+ non-conforming input documents. This implies that JSON-LD Implementations or Processors
+ <em class="rfc2119" title="must not">must not</em> attempt to correct malformed IRIs or language tags; however, they <em class="rfc2119" title="may">may</em> issue
+ validation warnings.</p>
+
+ <div class="note"><div class="note-title"><span>Note</span></div><p class="">Implementers can partially check their level of conformance to
+ this specification by successfully passing the test cases of the JSON-LD test
+ suite [<cite><a class="bibref" href="#bib-JSON-LD-TESTS">JSON-LD-TESTS</a></cite>]. Note, however, that passing all the tests in the test
+ suite does not imply complete conformance to this specification. It only implies
+ that the implementation conforms to aspects tested by the test suite.</p></div>
+</section>
+
+<section id="general-terminology">
+
+<!--OddPage-->
+<h2><span class="secno">4. </span>General Terminology</h2>
+
+ <p>This document uses the following terms as defined in JSON [<cite><a class="bibref" href="#bib-RFC4627">RFC4627</a></cite>]. Refer
+ to the <em>JSON Grammar</em> section in [<cite><a class="bibref" href="#bib-RFC4627">RFC4627</a></cite>] for formal definitions.</p>
+
+ <dl>
+ <dt><dfn title="json_object" id="dfn-json_object">JSON object</dfn></dt>
+ <dd>An object structure is represented as a pair of curly brackets
+ surrounding zero or more key-value pairs. A key is a
+ <a class="tref internalDFN" title="string" href="#dfn-string">string</a>. A single colon comes after each key, separating the
+ key from the value. A single comma separates a value from a following
+ key.</dd>
+ <dt><dfn title="array" id="dfn-array">array</dfn></dt>
+ <dd>An array structure is represented as square brackets surrounding zero
+ or more values (or elements). Elements are separated by commas.
+ In JSON, an array is an <em>ordered</em> sequence of zero or more values.
+ While JSON-LD uses the same array representation as JSON,
+ the collection is <em>unordered</em> by default. While order is
+ preserved in regular JSON arrays, it is not in regular JSON-LD arrays
+ unless specific markup is provided (see <a href="#sets-and-lists"></a>).</dd>
+ <dt><dfn title="string" id="dfn-string">string</dfn></dt>
+ <dd>A string is a sequence of zero or more Unicode characters,
+ wrapped in double quotes, using backslash escapes (if necessary). A
+ character is represented as a single character string.</dd>
+ <dt><dfn title="number" id="dfn-number">number</dfn></dt>
+ <dd>A number is similar to that used in most programming languages, except
+ that the octal and hexadecimal formats are not used and that leading
+ zeros are not allowed.</dd>
+ <dt><dfn title="true" id="dfn-true">true</dfn> and <dfn title="false" id="dfn-false">false</dfn></dt>
+ <dd>Values that are used to express one of two possible boolean states.</dd>
+ <dt><dfn title="null" id="dfn-null">null</dfn></dt>
+ <dd>The <a class="tref internalDFN" title="null" href="#dfn-null">null</a> value. A key-value pair in the
+ <code>@context</code> where the value, or the <code>@id</code> of the
+ value, is <a class="tref internalDFN" title="null" href="#dfn-null">null</a> explicitly decouples a term's association
+ with an <abbr title="Internationalized Resource Identifier">IRI</abbr>. A key-value pair in the body of a JSON-LD document whose
+ value is <a class="tref internalDFN" title="null" href="#dfn-null">null</a> has the same meaning as if the key-value pair
+ was not defined. If <code>@value</code>, <code>@list</code>, or
+ <code>@set</code> is set to <a class="tref internalDFN" title="null" href="#dfn-null">null</a> in expanded form, then
+ the entire <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> is ignored.</dd>
+ </dl>
+
+ <p>Furthermore, the following terminology is used throughout this document:</p>
+
+ <dl>
+ <dt><dfn title="keyword" id="dfn-keyword">keyword</dfn></dt>
+ <dd>A JSON key that is specific to JSON-LD, specified in the JSON-LD Syntax specification [<cite><a class="bibref" href="#bib-JSON-LD">JSON-LD</a></cite>]
+ in the section titled <cite><a href="../json-ld-syntax/#syntax-tokens-and-keywords">Syntax Tokens and Keywords</a></cite>.</dd>
+ <dt><dfn title="context" id="dfn-context">context</dfn></dt>
+ <dd>A a set of rules for interpreting a JSON-LD document as specified in
+ <cite><a href="../json-ld-syntax/#the-context">The Context</a></cite> of the [<cite><a class="bibref" href="#bib-JSON-LD">JSON-LD</a></cite>] specification.</dd>
+ <dt><dfn title="json-ld_document" id="dfn-json-ld_document">JSON-LD document</dfn></dt>
+ <dd>A <a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">JSON-LD document</a> is a serialization of a collection of
+ <a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">JSON-LD graphs</a> and comprises exactly one
+ <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> and zero or more <a class="tref internalDFN" title="named_graph" href="#dfn-named_graph">named graphs</a>.</dd>
+ <dt><dfn title="named_graph" id="dfn-named_graph">named graph</dfn></dt>
+ <dd>A named graph is a pair consisting of an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> or <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a>
+ (the <dfn title="graph_name" id="dfn-graph_name">graph name</dfn>) and a <a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">JSON-LD graph</a>.</dd>
+ <dt><dfn title="default_graph" id="dfn-default_graph">default graph</dfn></dt>
+ <dd>The default graph is the only graph in a JSON-LD document which has no <a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">graph name</a>.</dd>
+ <dt><dfn title="json-ld_graph" id="dfn-json-ld_graph">JSON-LD graph</dfn></dt>
+ <dd>A labeled directed graph, i.e., a set of <a class="tref internalDFN" title="node" href="#dfn-node">nodes</a> connected by <a class="tref internalDFN" title="edge" href="#dfn-edge">edges</a>,
+ as specified in the <cite><a href="../json-ld-syntax/#data-model">Data Model</a></cite> section of the JSON-LD syntax
+ specification [<cite><a class="bibref" href="#bib-JSON-LD">JSON-LD</a></cite>].</dd>
+ <dt><dfn title="edge" id="dfn-edge">edge</dfn></dt>
+ <dd>Every <a class="tref internalDFN" title="edge" href="#dfn-edge">edge</a> has a direction associated with it and is labeled with
+ an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> or a <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifier</a>. Within the JSON-LD syntax
+ these edge labels are called <dfn title="property" id="dfn-property">properties</dfn>. Whenever possible, an
+ <a class="tref internalDFN" title="edge" href="#dfn-edge">edge</a> <em class="rfc2119" title="should">should</em> be labeled with an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.</dd>
+ <dt><dfn title="node" id="dfn-node">node</dfn></dt>
+ <dd>Every <a class="tref internalDFN" title="node" href="#dfn-node">node</a> is an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>, a <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a>,
+ a <a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value">JSON-LD value</a>, or a <a class="tref internalDFN" title="list" href="#dfn-list">list</a>.</dd>
+ <dt><dfn title="iri" id="dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></dfn></dt>
+ <dd>An <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> (Internationalized Resource Identifier) is a string that conforms to the syntax
+ defined in [<cite><a class="bibref" href="#bib-RFC3987">RFC3987</a></cite>].</dd>
+ <dt><dfn title="absolute_iri" id="dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></dfn></dt>
+ <dd>An absolute <abbr title="Internationalized Resource Identifier">IRI</abbr> is defined in [<cite><a class="bibref" href="#bib-RFC3987">RFC3987</a></cite>] containing a <em>scheme</em> along with a <em>path</em> and
+ optional <em>query</em> and fragment segments.</dd>
+ <dt><dfn title="relative_iri" id="dfn-relative_iri">relative <abbr title="Internationalized Resource Identifier">IRI</abbr></dfn></dt>
+ <dd>A relative <abbr title="Internationalized Resource Identifier">IRI</abbr> is an <abbr title="Internationalized Resource Identifier">IRI</abbr> that is relative some other <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>;
+ in the case of JSON-LD this is the base location of the document.</dd>
+ <dt><dfn title="blank_node" id="dfn-blank_node">blank node</dfn></dt>
+ <dd>A <a class="tref internalDFN" title="node" href="#dfn-node">node</a> in a <a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">JSON-LD graph</a> that does not contain a de-referenceable
+ identifier because it is either ephemeral in nature or does not contain information that needs to be
+ linked to from outside of the JSON-LD graph.</dd>
+ <dt><dfn title="blank_node_identifier" id="dfn-blank_node_identifier">blank node identifier</dfn></dt>
+ <dd>A blank node identifier is a string that can be used as an identifier for a <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a> within
+ the scope of a JSON-LD document. Blank node identifiers begin with <code>_:</code>.</dd>
+ <dt><dfn title="json-ld_value" id="dfn-json-ld_value">JSON-LD value</dfn></dt>
+ <dd>A <a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value">JSON-LD value</a> is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, a <a class="tref internalDFN" title="number" href="#dfn-number">number</a>,
+ <a class="tref internalDFN" title="true" href="#dfn-true">true</a> or <a class="tref internalDFN" title="false" href="#dfn-false">false</a>, a <a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">typed value</a>, or a
+ <a class="tref internalDFN" title="language-tagged_string" href="#dfn-language-tagged_string">language-tagged string</a>.</dd>
+ <dt><dfn title="typed_value" id="dfn-typed_value">typed value</dfn></dt>
+ <dd>A <a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">typed value</a> consists of a value, which is a string, and a type, which is an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.
+ </dd><dt><dfn title="language-tagged_string" id="dfn-language-tagged_string">language-tagged string</dfn></dt>
+ <dd>A <a class="tref internalDFN" title="language-tagged_string" href="#dfn-language-tagged_string">language-tagged string</a> consists of a string and a non-empty language
+ tag as defined by [<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>]. The language tag must be well-formed according to section
+ <a href="http://tools.ietf.org/html/bcp47#section-2.2.9">2.2.9</a> of [<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>], and <em class="rfc2119" title="must">must</em>
+ be normalized to lowercase.</dd>
+ <dt><dfn title="list" id="dfn-list">list</dfn></dt>
+ <dd>A <a class="tref internalDFN" title="list" href="#dfn-list">list</a> is an ordered sequence of <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a>,
+ <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank nodes</a>, and
+ <a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value">JSON-LD values</a>.</dd>
+ </dl>
+</section>
+
+<section id="algorithms">
+
+<!--OddPage-->
+<h2><span class="secno">5. </span>Algorithms</h2>
+
+<p>All algorithms described in this section are intended to operate on
+ language-native data structures. That is, the serialization to a text-based
+ JSON document isn't required as input or output to any of these algorithms and
+ language-native data structures <em class="rfc2119" title="must">must</em> be used where applicable.</p>
+
+<section id="algorithm-terms">
+ <h3><span class="secno">5.1 </span>Algorithm Terms</h3>
+ <dl>
+ <dt><dfn title="active_graph" id="dfn-active_graph">active graph</dfn></dt>
+ <dd>The name of the currently active graph that the processor should use when
+ processing.</dd>
+ <dt><dfn title="active_subject" id="dfn-active_subject">active subject</dfn></dt>
+ <dd>The currently active subject that the processor should use when
+ processing.</dd>
+ <dt><dfn title="active_property" id="dfn-active_property">active property</dfn></dt>
+ <dd>The currently active property that the processor should use when
+ processing. The active property is represented in the original lexical form, which
+ is used for finding type mappings in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
+ <dt><dfn title="active_object" id="dfn-active_object">active object</dfn></dt>
+ <dd>The currently active object that the processor should use when
+ processing.</dd>
+ <dt><dfn title="active_context" id="dfn-active_context">active context</dfn></dt>
+ <dd>A context that is used to resolve <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s while the processing
+ algorithm is running. The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the context
+ contained within the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</dd>
+ <dt><dfn title="local_context" id="dfn-local_context">local context</dfn></dt>
+ <dd>A context that is specified within a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>,
+ specified via the <code>@context</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>.</dd>
+ <dt><dfn title="processor_state" id="dfn-processor_state">processor state</dfn></dt>
+ <dd>The <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>, which includes the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active
+ context</a>, <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, and
+ <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>. The <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> is managed
+ as a stack with elements from the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>
+ copied into a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> when entering a new
+ <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>.</dd>
+ <dt><dfn title="json-ld_input" id="dfn-json-ld_input">JSON-LD input</dfn></dt>
+ <dd>The JSON-LD data structure that is provided as input to the algorithm.</dd>
+ <dt><dfn title="json-ld_output" id="dfn-json-ld_output">JSON-LD output</dfn></dt>
+ <dd>The JSON-LD data structure that is produced as output by the algorithm.</dd>
+ <dt><dfn title="term" id="dfn-term">term</dfn></dt>
+ <dd>A <a class="tref internalDFN" title="term" href="#dfn-term">term</a> is a short word defined in a context that <em class="rfc2119" title="may">may</em> be expanded to an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a></dd>
+ <dt><dfn title="compact_iri" id="dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></dfn></dt>
+ <dd>A compact <abbr title="Internationalized Resource Identifier">IRI</abbr> is has the form of <dfn title="prefix" id="dfn-prefix">prefix</dfn>:<em>suffix</em> and is used as a way
+ of expressing an <abbr title="Internationalized Resource Identifier">IRI</abbr> without needing to define separate <a class="tref internalDFN" title="term" href="#dfn-term">term</a> definitions for
+ each <abbr title="Internationalized Resource Identifier">IRI</abbr> contained within a common vocabulary identified by <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>.</dd>
+ <dt><dfn title="node_object" id="dfn-node_object">node object</dfn></dt>
+ <dd>A <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> represents zero or more properties of a
+ <a class="tref internalDFN" title="node" href="#dfn-node">node</a> in the <a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">JSON-LD graph</a> serialized by the
+ JSON-LD document. A <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> is a <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a>
+ if it exists outside of the JSON-LD <a class="tref internalDFN" title="context" href="#dfn-context">context</a> and:
+ <ul>
+ <li>it does not contain the <code>@value</code>, <code>@list</code>,
+ or <code>@set</code> keywords, or</li>
+ <li>it is not the top-level <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> in the JSON-LD document containing
+ the <code>@graph</code> keyword.</li>
+ </ul>
+ </dd>
+ <dt><dfn title="list_object" id="dfn-list_object">list object</dfn></dt>
+ <dd>A <a class="tref internalDFN" title="list_object" href="#dfn-list_object">list object</a> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> that has a <code>@list</code>
+ member.</dd>
+ <dt><dfn title="scalar" id="dfn-scalar">scalar</dfn></dt>
+ <dd>A scalar is either a JSON <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, <a class="tref internalDFN" title="number" href="#dfn-number">number</a>, <a class="tref internalDFN" title="true" href="#dfn-true">true</a>,
+ or <a class="tref internalDFN" title="false" href="#dfn-false">false</a>.</dd>
+ <dt><dfn title="quad" id="dfn-quad">quad</dfn></dt>
+ <dd>An <em>RDF triple</em> as specified by [<cite><a class="bibref" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>] augmented with a a fourth component,
+ a <a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">graph name</a>.</dd>
+ </dl>
+</section>
+
+<section id="expansion-algorithm">
+ <h3><span class="secno">5.2 </span>Expansion Algorithm</h3>
+
+ <p>The algorithm takes three input variables: an <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+ an <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>, and an <em>element</em> to be expanded. To
+ begin, the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is set to the result of performing, <a href="#context-processing">Context Processing</a> on the passed
+ <code class="idlMemberName"><a href="#widl-JsonLdOptions-expandContext">expandContext</a></code>,
+ or empty if <code class="idlMemberName"><a href="#widl-JsonLdOptions-expandContext">expandContext</a></code>
+ is <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is set to <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, and
+ <em>element</em> is set to the <a class="tref internalDFN" title="json-ld_input" href="#dfn-json-ld_input">JSON-LD input</a>. This algorithm expects the
+ <a class="tref internalDFN" title="json-ld_input" href="#dfn-json-ld_input">JSON-LD input</a> to be a well-formed JSON-LD document as defined in [<cite><a class="bibref" href="#bib-JSON-LD">JSON-LD</a></cite>].</p>
+
+ <ol class="algorithm">
+ <li>If <em>element</em> is a <a class="tref internalDFN" title="scalar" href="#dfn-scalar">scalar</a>, expand it according to the
+ <a href="#value-expansion">Value Expansion</a> algorithm, passing copies of the
+ <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and return.</li>
+ <li>If <em>element</em> is <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, return.</li>
+ <li>If <em>element</em> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>,
+ <ol class="algorithm">
+ <li>initialize an empty array <em>result</em>.</li>
+ <li>Expand each <em>item</em> by recursively using this algorithm, passing copies of
+ the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
+ <li>If the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property's</a>
+ <a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping">container mapping</a> is set to <code>@list</code> and the expanded
+ <em>item</em> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> or a <a class="tref internalDFN" title="list_object" href="#dfn-list_object">list object</a> trigger
+ a <code class="error">LIST_OF_LISTS_DETECTED</code> error.</li>
+ <li>If the expanded <em>item</em> is <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, drop it.</li>
+ <li>Otherwise, if the expanded <em>item</em> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, merge its
+ entries with <em>result's</em> entries.</li>
+ <li>Otherwise, append <em>item</em> to <em>result</em>.</li>
+ <li>Finally, set <em>element</em> to <em>result</em> and return.</li>
+ </ol>
+ </li>
+ <li>Otherwise, <em>element</em> must be an object.
+ <ol class="algorithm">
+ <li>If <em>element</em> has a <code>@context</code> member, update the
+ <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> according to the steps outlined in
+ <a href="#context-processing">Context Processing</a> and remove the
+ <code>@context</code> member.</li>
+ <li>Initialize an empty <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> <em>result</em> and</li>
+ <li>then process each <em>property</em> and <em>value</em> in <em>element</em>
+ ordered by <em>property</em> as follows:
+ <ol class="algorithm">
+ <li>If the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> contains a <a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">property generator</a> for
+ <em>property</em> set <em>expanded property</em> to its <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a>,
+ otherwise set it to the result of expanding <em>property</em> according to the steps
+ outlined in <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion</a> (passing <code>true</code> for
+ the <em>vocabRelative</em> flag).</li>
+ <li>If <em>expanded property</em> is <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, skip the
+ current <em>property</em>-<em>value</em> pair and continue to the
+ next <em>property</em>-<em>value</em> pair in <em>element</em>.
+ </li>
+ <li>If <em>expanded property</em> is a <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>, process it as
+ follows:
+ <ol class="algorithm">
+ <li>If <em>expanded property</em> equals <code>@id</code>, set the <code>@id</code>
+ member of <em>result</em> to the result of expanding <em>value</em>
+ according the <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion algorithm</a> (passing <code>true</code>
+ for the <em>documentRelative</em> flag). If <em>value</em> is not a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>
+ trigger an <code class="error">INVALID_ID_VALUE</code> error.</li>
+ <li>If <em>expanded property</em> equals <code>@type</code>, set the <code>@type</code>
+ member of <em>result</em> to the result of expanding <em>value</em>
+ according the <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion algorithm</a> (passing <code>true</code>
+ for both the <em>documentRelative</em> and the <em>vocabRelative</em> flag). If <em>value</em>
+ is neither a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> nor an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> of
+ <a class="tref internalDFN" title="string" href="#dfn-string">strings</a> trigger an <code class="error">INVALID_TYPE_VALUE</code>
+ error. Empty <a class="tref internalDFN" title="array" href="#dfn-array">arrays</a> are ignored.</li>
+ <li>If <em>expanded property</em> equals <code>@value</code>, set the <code>@value</code>
+ member of <em>result</em> to <em>value</em>. If <em>value</em> is neither a <a class="tref internalDFN" title="scalar" href="#dfn-scalar">scalar</a>
+ nor <a class="tref internalDFN" title="null" href="#dfn-null">null</a> trigger an <code class="error">INVALID_VALUE_OBJECT_VALUE</code> error.</li>
+ <li>If <em>expanded property</em> equals <code>@language</code>, set the <code>@language</code>
+ member of <em>result</em> to the lowercased <em>value</em>. If <em>value</em> is not
+ a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, trigger an <code class="error">INVALID_LANGUAGE_VALUE</code> error.</li>
+ <li>If <em>expanded property</em> equals <code>@annotation</code>, set the <code>@annotation</code>
+ member of <em>result</em> to <em>value</em>. If <em>value</em> is not a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>
+ trigger an <code class="error">INVALID_ANNOTATION_VALUE</code> error.</li>
+ <li>If <em>expanded property</em> equals <code>@set</code> or <code>@list</code>, set the
+ <em>expanded property</em> member of <em>result</em> to the result of expanding <em>value</em> by
+ recursively using this algorithm, passing copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> and
+ <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
+ <li>If <em>expanded property</em> equals <code>@graph</code>, set the <code>@graph</code>
+ member of <em>result</em> to the result of expanding <em>value</em> by
+ recursively using this algorithm, passing copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> and
+ <code>@graph</code> as <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
+ <li>Continue with the next <em>property</em>-<em>value</em> pair from <em>element</em>.</li>
+ </ol>
+ </li>
+ <li>If <em>expanded property</em> is not an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>,i.e., it doesn't contain a colon,
+ continue with the next member from <em>element</em>.</li>
+ <li>Otherwise, if <em>property's</em> <a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping">container mapping</a> is set to
+ <code>@language</code>
+ <ol class="algorithm">
+ <li>Initialize a new empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a> <em>language map values</em>.</li>
+ <li>Process each <em>key</em>-<em>val</em> pair of <em>value</em> ordered by
+ <em>key</em> as follows:
+ <ol class="algorithm">
+ <li>If <em>val</em> is not an array, transform it to one.</li>
+ <li>For each item of <em>val</em>, construct a new <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>
+ consisting of two members: <code>@value</code> set to the currently
+ processed item and <code>@language</code> set to the lowercased <em>key</em>.
+ If <em>val</em> is not a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, trigger a
+ <code class="error">LANGUAGE_MAP_INVALID_VALUE</code> error. Otherwise append
+ the object to <em>language map values</em>.</li>
+ </ol>
+ </li>
+ <li>Set <em>value</em> to <em>language map values</em>.</li>
+ </ol>
+ </li>
+ <li>Otherwise, if <em>property's</em> <a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping">container mapping</a> is set to
+ <code>@annotation</code>
+ <ol class="algorithm">
+ <li>Initialize a new empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a> <em>annotation map values</em>.</li>
+ <li>Process each <em>key</em>-<em>val</em> pair of <em>value</em> ordered by
+ <em>key</em> as follows:
+ <ol class="algorithm">
+ <li>If <em>val</em> is not an array, transform it to one.</li>
+ <li>Expand <em>val</em> by recursively using this algorithm, passing copies of
+ the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
+ <li>Add to each item of <em>val</em> a member <code>@annotation</code> set to
+ <em>key</em> if no such member exists yet and append the resulting
+ <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> to <em>annotation map values</em>.</li>
+ </ol>
+ </li>
+ <li>Set <em>value</em> to <em>annotation map values</em>.</li>
+ </ol>
+ </li>
+ <li>Otherwise, expand <em>value</em> by recursively using this algorithm, passing
+ copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> and <em>property</em> as
+ <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
+ <li>If the expanded <em>value</em> equals <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, continue with the next
+ <em>property</em>-<em>value</em> pair from <em>element</em>.</li>
+ <li>If <em>property's</em> <a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping">container mapping</a> is set to <code>@list</code> and
+ <em>value</em> is either not an <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> or a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>
+ without an <code>@list</code> member, replace <em>value</em> with a
+ <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> with an <code>@list</code> member whose value is set to
+ <em>value</em> (wrapped in an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> if it is not already one).</li>
+ <li>If <em>expanded property</em> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>,
+ <ol class="algorithm">
+ <li>label all <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank nodes</a> in <em>value</em> with
+ <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifiers</a> by using the
+ <a href="#label-blank-nodes-algorithm">Label Blank Nodes Algorithm</a>.</li>
+ <li>Then, for each <em>iri</em> of <em>expanded property</em> merge a copy
+ of <em>value</em> into the <em>iri</em> member of the <em>result</em>
+ <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>.</li>
+ </ol>
+ </li>
+ <li>Otherwise, merge <em>value</em> into the <em>iri</em> member of the <em>result</em>
+ <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>.</li>
+ </ol>
+ </li>
+ <li>Set <em>element</em> to <em>result</em> and <em>numProperties</em> to the number of members
+ of <em>result</em>.</li>
+ <li>If <em>element</em> has an <code>@annotation</code> member, decrease <em>numProperties</em>
+ by 1.</li>
+ <li>If <em>element</em> has an <code>@value</code> member,
+ <ol class="algorithm">
+ <li>decrease <em>numProperties</em> by 1.</li>
+ <li>If <em>element</em> has an <code>@language</code> member, decrease <em>numProperties</em>
+ by 1 and check that the value of the <code>@value</code> member is a string. If not,
+ trigger an <code class="error">INVALID_LANGUAGE_TAGGED_STRING</code> error.</li>
+ <li>Otherwise, if <em>element</em> has an <code>@type</code> member, decrease
+ <em>numProperties</em> by 1 and check that the value of the <code>@type</code> member is a
+ string. If not, trigger an <code class="error">INVALID_TYPED_VALUE</code> error.</li>
+ <li>If <em>numProperties</em> is greater than 0, trigger an
+ <code class="error">INVALID_VALUE_OBJECT</code> error.</li>
+ <li>If the value of the <code>@value</code> member equals <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, set
+ <em>element</em> to <a class="tref internalDFN" title="null" href="#dfn-null">null</a>.</li>
+ <li>Return.</li>
+ </ol>
+ </li>
+ <li>If <em>element</em> has an <code>@type</code> member whose value is not an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>,
+ transform it to an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.</li>
+ <li>If <em>element</em> has an <code>@list</code> or <code>@set</code> member and
+ <em>numProperties</em> is greater than 1, trigger an
+ <code class="error">INVALID_SET_OR_LIST_OBJECT</code> error.</li>
+ <li>Otherwise, if <em>element</em> has an <code>@set</code> member, set <em>element</em> to
+ the value of that member.</li>
+ <li>Otherwise, if <em>element</em> has just an <code>@language</code> member, set <em>element</em>
+ to null.</li>
+ </ol>
+ </li>
+ </ol>
+
+ <p>If, after the algorithm outlined above is run, the resulting <em>element</em> is an
+ <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> with just a <code>@graph</code> member, <em>element</em> is set to
+ the value of <code>@graph</code>'s value. Finally, if <em>element</em> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>,
+ it is wrapped into an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.</p>
+</section>
+
+<section typeof="bibo:Chapter" resource="#context" rel="bibo:chapter" id="context-processing">
+ <h3 id="context"><span class="secno">5.3 </span>Context Processing</h3>
+
+ <p>Processing of JSON-LD data structure is managed recursively. During processing, each
+ rule is applied using information provided by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</p>
+
+ <p>The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> contains the active <dfn title="term_definition" id="dfn-term_definition">term definitions</dfn>
+ which specify how properties and values have to be interpreted as well as the current
+ <dfn title="vocabulary_mapping" id="dfn-vocabulary_mapping">vocabulary mapping</dfn> and the <dfn title="default_language" id="dfn-default_language">default language</dfn>. Each <a class="tref internalDFN" title="term_definition" href="#dfn-term_definition">term definition</a> consists
+ of an <dfn title="iri_mapping" id="dfn-iri_mapping"><abbr title="Internationalized Resource Identifier">IRI</abbr> mapping</dfn> and optionally a <dfn title="type_mapping" id="dfn-type_mapping">type mapping</dfn> from terms to datatypes or
+ <dfn title="language_mapping" id="dfn-language_mapping">language mapping</dfn> from terms to language codes, and a <dfn title="container_mapping" id="dfn-container_mapping">container mapping</dfn>. If an
+ <a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier">IRI</abbr> mapping</a> maps a term to multiple <tref="iri">IRIs it is said to be a
+ <dfn title="property_generator" id="dfn-property_generator">property generator</dfn>.</tref="iri"></p>
+
+ <p>If a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is encountered, information from the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>
+ is merged into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. A <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is identified within
+ a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> having a <code>@context</code> member with a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>,
+ <a class="tref internalDFN" title="array" href="#dfn-array">array</a> or a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> value.</p>
+
+ <p>This algorithm specifies how the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is updated with a
+ <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>. The algorithm takes three input variables: an <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+ a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>, and an array of already included remote contexts <em>remoteContexts</em>. To
+ begin, <em>remoteContexts</em> is initialized to an empty array.</p>
+
+ <p>All calls of the <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion algorithm</a> pass the value specified in the
+ algorithm along with the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, the currently being processed <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>,
+ and <code>true</code> for the <em>vocabRelative</em> flag.</p>
+
+ <ol class="algorithm">
+ <li>If the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is not an array, transform it to one.</li>
+ <li>Process each item <em>context</em> of the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> as follows:
+ <ol class="algorithm">
+ <li>If <em>context</em> equals <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, reset the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>
+ and continue with the next item.</li>
+ <li>If <em>context</em> is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>:
+ <ol class="algorithm">
+ <li>Expand <em>context</em> according to <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion</a>.</li>
+ <li>If <em>context</em> is in the <em>remoteContexts</em> array, raise an
+ <code class="error">RECURSIVE_CONTEXT_INCLUSION</code> error. Otherwise, add
+ <em>context</em> to <em>remoteContexts</em>.</li>
+ <li>Dereference <em>context</em>.</li>
+ <li>If the resulting document is a JSON document consisting of a top-level
+ <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> that has a <code>@context</code> member recursively invoke
+ this algorithm passing a copy of <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, the value of the
+ <code>@context</code> member as <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>, and a copy of
+ the <em>remoteContexts</em> array. <a class="tref internalDFN" title="relative_iri" href="#dfn-relative_iri">Relative IRIs</a>
+ are expanded using the remote context's <abbr title="Internationalized Resource Identifier">IRI</abbr>. Otherwise raise an
+ <code class="error">INVALID_REMOTE_CONTEXT</code> error.</li>
+ <li>Continue with the next item from <em>context</em>.</li>
+ </ol>
+
+<!--<li-->
+
+ </li><li>If <em>context</em> is not a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>, raise an
+ <code class="error">INVALID_LOCAL_CONTEXT</code> error.</li>
+ <li>Otherwise, if <em>context</em> is an <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>, perform the following steps:
+ <ol class="algorithm">
+ <li>If <em>context</em> has a <code>@vocab</code> member: if its value is neither
+ an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>, i.e., it does not contain a colon (<code>:</code>),
+ nor <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, trigger an <code class="error">INVALID_VOCAB_MAPPING</code>
+ error; otherwise set the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context's</a>
+ <a class="tref internalDFN" title="vocabulary_mapping" href="#dfn-vocabulary_mapping">vocabulary mapping</a> to its value and remove the <code>@vocab</code>
+ member from <em>context</em>.</li>
+ <li>If <em>context</em> has a <code>@language</code> member: if its value is neither
+ a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> nor <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, trigger an
+ <code class="error">INVALID_DEFAULT_LANGUAGE</code> error; otherwise set the
+ <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context's</a> <a class="tref internalDFN" title="default_language" href="#dfn-default_language">default language</a> to
+ its value and remove the <code>@language</code> member from <em>context</em>.</li>
+ <li>For each other <em>key</em>-<em>value</em> pair in <em>context</em> perform the
+ following steps:
+ <ol class="algorithm">
+ <li>Remove the <em>key</em>-<em>value</em> pair from <em>context</em>.</li>
+ <li>If <em>key</em> is a JSON-LD <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>, continue with the next
+ <em>key</em>-<em>value</em> pair.</li>
+ <li>If <em>value</em> equals <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, replace the <a class="tref internalDFN" title="term_definition" href="#dfn-term_definition">term definition</a>
+ for <em>key</em> in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> with an <a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier">IRI</abbr> mapping</a>
+ set to <a class="tref internalDFN" title="null" href="#dfn-null">null</a> and continue with the next <em>key</em>-<em>value</em> pair.</li>
+ <li>If <em>value</em> is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, expand it according to the
+ <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion algorithm</a> and replace the
+ <a class="tref internalDFN" title="term_definition" href="#dfn-term_definition">term definition</a> for <em>key</em> in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> with
+ an <a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier">IRI</abbr> mapping</a> set to the expanded <em>value</em>. Continue with
+ the next <em>key</em>-<em>value</em> pair.</li>
+ <li>If <em>value</em> is not a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>, trigger an
+ <code class="error">INVALID_TERM_DEFINITION</code> error</li>
+ <li>If <a class="tref internalDFN" title="term_definition" href="#dfn-term_definition">term definition</a> for <em>key</em> exists in the
+ <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, remove it.</li>
+ <li>Initialize a new, empty <a class="tref internalDFN" title="term_definition" href="#dfn-term_definition">term definition</a> <em>definition</em>.</li>
+ <li>If <em>value</em> has an <code>@id</code> member with a value <em>val</em>:
+ <ol class="algorithm">
+ <li>if <em>val</em> is <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, set
+ <em>definition</em> to <em>val</em>.
+ </li><li>if <em>val</em> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, process each
+ <em>item</em> in the array:
+ <ol class="algorithm">
+ <li>if <em>item</em> is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> expand it
+ according the <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion algorithm</a>.
+ </li>
+ <li>otherwise, raise an
+ <code class="error">INVALID_PROPERTY_GENERATOR</code>
+ error.
+ </li>
+ </ol>
+ </li><li>if <em>val</em> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>,
+ lexicographically sort <em>val</em> and set
+ <em>definition</em> to <em>val</em>.</li>
+ <li>Otherwise, if <em>val</em> is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>,
+ expand it according the
+ <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion algorithm</a> and
+ set <em>definition</em> to <em>val</em>.
+ </li>
+ </ol>
+ </li>
+ <li>If the <a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier">IRI</abbr> mapping</a> of <em>definition</em> is set to <a class="tref internalDFN" title="null" href="#dfn-null">null</a> or a
+ <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>, store the <em>definition</em> as the <a class="tref internalDFN" title="term_definition" href="#dfn-term_definition">term definition</a>
+ for <em>key</em> in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> and continue with the next
+ <em>key</em>-<em>value</em> pair from <em>context</em>.</li>
+ <li>Otherwise, set the <a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier">IRI</abbr> mapping</a> of <em>definition</em> to the result of
+ expanding <em>key</em> according the <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion algorithm</a>.</li>
+ <li>If <em>value</em> has an <code>@type</code> member with a value <em>val</em> and <em>val</em>
+ is not a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> or does not expand to an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a> using the
+ <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion algorithm</a>, raise an
+ <code class="error">INVALID_TYPE_MAPPING</code> error. Otherwise set the
+ <a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier">IRI</abbr> mapping</a> of <em>definition</em> to the expanded <em>val</em>.</li>
+ <li>Otherwise, if <em>value</em> has an <code>@language</code> member with a value <em>val</em>
+ that is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> or <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, set the <a class="tref internalDFN" title="language_mapping" href="#dfn-language_mapping">language mapping</a> of
+ <em>definition</em> to the lowercased <em>val</em>. If <em>val</em> is neither a
+ <a class="tref internalDFN" title="string" href="#dfn-string">string</a> nor <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, raise an
+ <code class="error">INVALID_LANGUAGE_MAPPING</code> error.</li>
+ <li>f <em>value</em> has an <code>@container</code> member with a value <em>val</em> that
+ equals <code>@list</code>, <code>@set</code>, or <code>@annotation</code>, set the
+ <a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping">container mapping</a> of <em>definition</em> to <em>val</em>.
+ If <em>val</em> is not one of those values, raise an
+ <code class="error">INVALID_CONTAINER_MAPPING</code> error.</li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ </ol>
+</section>
+
+<section id="iri-expansion">
+ <h3><span class="secno">5.4 </span><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion</h3>
+
+ <p>In JSON-LD documents keys and some values are evaluated to produce an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.
+ This section defines an algorithm for transforming strings representing an <abbr title="Internationalized Resource Identifier">IRI</abbr> into an
+ <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>. If <abbr title="Internationalized Resource Identifier">IRI</abbr> expansion occurs during context processing, the
+ <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> that is being processed is passed to this algorithm.
+ After application of this algorithm, values processed by this algorithm are said to be
+ in <dfn title="expanded_iri_form" id="dfn-expanded_iri_form">expanded <abbr title="Internationalized Resource Identifier">IRI</abbr> form</dfn>, although this may also include
+ <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifiers</a> and
+ JSON-LD <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keywords</a>.</p>
+
+ <p>The algorithm takes two mandatory and four optional input variables: a <em>value</em>
+ to be expanded, an <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, two flags <em>documentRelative</em> and
+ <em>vocabRelative</em> specifying whether <em>value</em> should be interpreted as
+ <a class="tref internalDFN" title="relative_iri" href="#dfn-relative_iri">relative <abbr title="Internationalized Resource Identifier">IRI</abbr></a> against the document's base <abbr title="Internationalized Resource Identifier">IRI</abbr> or the
+ <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context's</a> <a class="tref internalDFN" title="vocabulary_mapping" href="#dfn-vocabulary_mapping">vocabulary mapping</a>,
+ along with an <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> passed when this algorithm is used in
+ <a href="#context-processing">Context Processing</a>, and finally an array
+ <em>path</em> which is used to detect cyclic <a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier">IRI</abbr> mappings</a>.
+ If not passed, the two flags are set to <code>false</code> and <em>path</em> is
+ initialized to an empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a> by default.</p>
+
+ <p>The algorithm for generating an <abbr title="Internationalized Resource Identifier">IRI</abbr> is:</p>
+
+ <ol class="algorithm">
+ <li>If <em>value</em> is <a class="tref internalDFN" title="null" href="#dfn-null">null</a> or a JSON-LD <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>, return
+ <em>value</em> as is.</li>
+ <li>If a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> has been passed
+ <ol class="algorithm">
+ <li>and <em>value</em> is in the <em>path</em> array, raise a
+ <code class="error">CYCLIC_IRI_MAPPING</code> error. Otherwise append <em>value</em>
+ to <em>path</em>.</li>
+ <li>If <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> contains an <a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier">IRI</abbr> mapping</a> for <em>value</em>
+ that is not a <a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">property generator</a> return the result of recursively calling
+ this algorithm passing the <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> of the <a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier">IRI</abbr> mapping</a> as new
+ <em>value</em>, the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> and <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>,
+ <em>path</em>, and <code>true</code> for the <em>vocabRelative</em> flag. If the result
+ is a <a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">property generator</a>, raise an
+ <code class="error">PROPERTY_GENERATOR_IN_TERM_DEFINITION</code> error.</li>
+ </ol>
+ </li>
+ <li>If an <a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier">IRI</abbr> mapping</a> exists for <em>value</em> in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>
+ that is not a <a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">property generator</a> return the value of the
+ <a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier">IRI</abbr> mapping</a>.</li>
+ <li>If <em>value</em> contains a colon (<code>:</code>), perform the following steps:
+ <ol class="algorithm">
+ <li>Split <em>value</em> into a <em>prefix</em> and <em>suffix</em> at the first occurrence of
+ a colon (<code>:</code>).</li>
+ <li>If <em>suffix</em> begins with <code>//</code> or <em>prefix</em> equals <code>_</code>,
+ return <em>value</em> as is.</li>
+ <li>If a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> has been passed, expand <em>prefix</em> by recursively
+ invoking this algorithm passing <em>prefix</em> as <em>value</em>, the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>
+ and <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>, <em>path</em>, and <code>true</code> for the
+ <em>vocabRelative</em> flag. If the expanded <em>prefix</em> contains a colon (<code>:</code>)
+ generate and return an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> by prepending the expanded <em>prefix</em> to the
+ (possibly empty) <em>suffix</em> using textual concatenation.</li>
+ <li>Otherwise, if the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> contains an <a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier">IRI</abbr> mapping</a> for
+ <em>prefix</em> that is not a <a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">property generator</a>, generate and return an
+ <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> by prepending the <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> mapped to <em>prefix</em> to the
+ (possibly empty) <em>suffix</em> using textual concatenation.</li>
+ </ol>
+ </li>
+ <li>Otherwise, if the <em>vocabRelative</em> flag is set to <code>true</code> and the
+ <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> contains a <a class="tref internalDFN" title="vocabulary_mapping" href="#dfn-vocabulary_mapping">vocabulary mapping</a>, generate and return an
+ <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> by prepending the <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> of the <a class="tref internalDFN" title="vocabulary_mapping" href="#dfn-vocabulary_mapping">vocabulary mapping</a>
+ to the <em>value</em> using textual concatenation.</li>
+ <li>Otherwise, if the <em>documentRelative</em> flag is set to <code>true</code>, resolve <em>value</em>
+ against the base <abbr title="Internationalized Resource Identifier">IRI</abbr> as per [<cite><a class="bibref" href="#bib-RFC3986">RFC3986</a></cite>] and return the resulting <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>. Only the basic
+ algorithm in section 5.2 of [<cite><a class="bibref" href="#bib-RFC3986">RFC3986</a></cite>] is used; neither <em>Syntax-Based Normalization</em>
+ nor <em>Scheme-Based Normalization</em> (as described in sections 6.2.2 and 6.2.3 of [<cite><a class="bibref" href="#bib-RFC3986">RFC3986</a></cite>])
+ are performed. Characters additionally allowed in <abbr title="Internationalized Resource Identifier">IRI</abbr> references are treated in the same way that
+ unreserved characters are treated in URI references, per section 6.5 of [<cite><a class="bibref" href="#bib-RFC3987">RFC3987</a></cite>]</li>
+ <li>Otherwise return <em>value</em> as is.</li>
+ </ol>
+
+ <p>If the result of the algorithm above is a <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifier</a>, i.e., a string that begins with
+ <code>_:</code>, and no <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> has been passed,
+ <a href="#generate-blank-node-identifier">generated a new blank node identifier</a> before returning the
+ final result.</p>
+</section>
+
+<section id="value-expansion">
+ <h3><span class="secno">5.5 </span>Value Expansion</h3>
+
+ <p>Some values in JSON-LD can be expressed in a <a class="tref internalDFN" title="compacted_form" href="#dfn-compacted_form">compacted form</a>. These values
+ are required to be expanded at times when processing JSON-LD documents.
+ A value is said to be in <dfn title="expanded_form" id="dfn-expanded_form">expanded form</dfn> after
+ the application of this algorithm.</p>
+
+ <p>The algorithm for expanding a <em>value</em> takes an <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+ and <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. It is implemented as follows:</p>
+
+ <ol class="algorithm">
+ <li>If <em>value</em> is <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, return <a class="tref internalDFN" title="null" href="#dfn-null">null</a>.</li>
+ <li>Initialize an empty object <em>result</em>.</li>
+ <li>If <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is <code>@graph</code> or the
+ <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property's</a> <a class="tref internalDFN" title="type_mapping" href="#dfn-type_mapping">type mapping</a> is set to
+ <code>@id</code>, add a key-value pair to <em>result</em> where the key is <code>@id</code>
+ and the value is the result of expanding <em>value</em> according to the
+ <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion algorithm</a> passing <code>true</code> for the
+ <em>documentRelative</em> flag. Then return <em>result</em>.</li>
+ <li>Add a key-value pair to <em>result</em> where the key is <code>@value</code>
+ and the value is <em>value</em>.</li>
+ <li>If the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> has a <a class="tref internalDFN" title="type_mapping" href="#dfn-type_mapping">type mapping</a>, add a key-value
+ pair to <em>result</em> where the key is <code>@type</code> and the value is the
+ <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> associated with the <a class="tref internalDFN" title="type_mapping" href="#dfn-type_mapping">type mapping</a> or a newly
+ <a href="#generate-blank-node-identifier">generated blank node identifier</a> if the
+ <a class="tref internalDFN" title="type_mapping" href="#dfn-type_mapping">type mapping</a> is set to a <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifier</a>.</li>
+ <li>Otherwise, if <em>value</em> is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> and the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> has a
+ <a class="tref internalDFN" title="language_mapping" href="#dfn-language_mapping">language mapping</a> or an <a class="tref internalDFN" title="default_language" href="#dfn-default_language">default language</a> is set in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+ add a key-value pair to <em>result</em> where the key is <code>@language</code> and the value is the
+ language tag associated with the <a class="tref internalDFN" title="language_mapping" href="#dfn-language_mapping">language mapping</a> or the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> or the
+ <a class="tref internalDFN" title="default_language" href="#dfn-default_language">default language</a>.</li>
+ <li>Return <em>result</em>.</li>
+ </ol>
+</section>
+
+<section id="label-blank-nodes-algorithm">
+ <h3><span class="secno">5.6 </span>Label Blank Nodes Algorithm</h3>
+
+ <p>The algorithm takes a single input variable: an <em>element</em> to be labeled with
+ <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifiers</a>.</p>
+
+ <ol class="algorithm">
+ <li>If <em>element</em> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, recursively apply this
+ algorithm to all its items.</li>
+ <li>Otherwise, if <em>element</em> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> with a
+ <code>@list</code> member, recursively apply this algorithm to all items
+ of the <code>@list</code> member's value.</li>
+ <li>Otherwise, if <em>element</em> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>
+ <ol class="algorithm">
+ <li>For each <em>key</em>-<em>value</em> pair ordered by <em>key</em>
+ recursively apply this algorithm to <em>value</em>.</li>
+ <li>If <em>element</em> is a <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> without an <code>@id</code> member,
+ create a new <code>@id</code> member and assign it a new
+ <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifier</a> according the
+ <a href="#generate-blank-node-identifier">Generate Blank Node Identifier</a> algorithm.</li>
+ </ol>
+ </li>
+ </ol>
+</section>
+
+<section id="generate-blank-node-identifier">
+ <h3><span class="secno">5.7 </span>Generate Blank Node Identifier</h3>
+
+ <p>This algorithm is used to generate new
+ <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifiers</a> or to relabel existing
+ <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifiers</a> with a new one to avoid
+ collision by the introduction of new ones. It needs to keep an <em>identifier map</em>,
+ a <em>counter</em>, and a <em>prefix</em> between its executions to be able to generate new
+ <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifiers</a>. The <em>counter</em>
+ is initialized to <code>0</code> and <em>prefix</em> is set to <code>_:t</code> by default.</p>
+
+ <p>The algorithm takes a single input variable <em>identifier</em> which might be
+ <a class="tref internalDFN" title="null" href="#dfn-null">null</a>.</p>
+
+ <ol class="algorithm">
+ <li>If the <em>identifier</em> is not <a class="tref internalDFN" title="null" href="#dfn-null">null</a> and is in the <em>identifier map</em>,
+ return the mapped identifier.</li>
+ <li>Otherwise, generate a new <em>blankNodeIdentifier</em> by concatenating <em>prefix</em>
+ and <em>counter</em>.</li>
+ <li>Increment <em>counter</em> by <code>1</code>.</li>
+ <li>If <em>identifier</em> is not <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, create a new entry in
+ <em>identifier map</em> set to <em>blankNodeIdentifer</em>.</li>
+ <li>Return <em>blankNodeIdentifier</em>.</li>
+ </ol>
+</section>
+
+<section id="compaction-algorithm">
+ <h3><span class="secno">5.8 </span>Compaction Algorithm</h3>
+
+ <p>The algorithm takes four input variables: an <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+ an <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a>, an <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>, and an <em>element</em>
+ to be compacted. To begin, the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is set to the result of performing
+ <a href="#context-processing">Context Processing</a> on the passed <em>context</em>,
+ <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a> is set to the result of
+ <a href="#context-processing">creating an inverse context</a> from the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+ <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is set to <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, and <em>element</em> is set to
+ the result of performing the <a href="#expansion-algorithm">Expansion Algorithm</a>
+ on the <a class="tref internalDFN" title="json-ld_input" href="#dfn-json-ld_input">JSON-LD input</a>.</p>
+
+ <ol class="algorithm">
+ <li>If <em>element</em> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>,
+ <ol class="algorithm">
+ <li>Initialize a new empty array <em>result</em>.</li>
+ <li>Process each item in <em>element</em> recursively using this algorithm,
+ passing a copy of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a>,
+ and the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>. Add each compacted item to <em>result</em>
+ unless it is <a class="tref internalDFN" title="null" href="#dfn-null">null</a>.</li>
+ <li>If <em>result</em> has a single item and the
+ <code class="idlMemberName"><a href="#widl-JsonLdOptions-compactArrays">compactArrays</a></code>
+ option is set to <code>true</code>, return that item; otherwise return
+ <em>result</em>.</li>
+ </ol>
+ </li>
+ <li>If <em>element</em> is not a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> it is already in
+ compact form, return it as is.</li>
+ <li>If <em>element</em> has an <code>@value</code> or <code>@id</code> member,
+ replace <em>element</em> with the result of the
+ <a href="#value-compaction">Value Compaction algorithm</a>. If the updated
+ <em>element</em> is a <a class="tref internalDFN" title="scalar" href="#dfn-scalar">scalar</a>, return it as it cannot be further
+ compacted.</li>
+ <li>Initialize a new empty <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> result.</li>
+ <li>Process each <em>property</em> and <em>value</em> in <em>element</em> ordered
+ by <em>property</em> as follows:
+ <ol class="algorithm">
+ <li>If <em>property</em> is a JSON-LD <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>
+ <ol class="algorithm">
+ <li>and <em>property</em> equals <code>@id</code>, compact <em>value</em>
+ according the rules of the <a href="#iri-compaction-algorithm"><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction algorithm</a>.</li>
+ <li>Otherwise, if <em>property</em> equals <code>@type</code>, compact <em>value</em>
+ (or each item of <em>value</em> if it is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>) according the rules of the
+ <a href="#iri-compaction-algorithm"><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction algorithm</a> with the
+ <em>vocabRelative</em> flag set to <code>true</code>. If <em>value</em> is an
+ <a class="tref internalDFN" title="array" href="#dfn-array">array</a> consisting of just one item, replace <em>value</em> with that item.</li>
+ <li>Otherwise, if <em>property</em> equals <code>@graph</code>, compact <em>value</em>
+ by recursively invoking this algorithm, passing a copy of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+ <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a>, and <em>property</em> as <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+ ensuring that the result is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.</li>
+ <li>Set <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> to the result of performing
+ <a href="#iri-compaction-algorithm"><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction</a> on <em>property</em>.</li>
+ <li>Set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> member of <em>result</em> to <em>value</em>.</li>
+ <li>Continue with the next <em>property</em>-<em>value</em> pair from <em>element</em>.</li>
+
+ </ol>
+ </li>
+ <li>If <em>value</em> is an empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a>,
+ <ol class="algorithm">
+ <li>set <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> to the result of performing
+ <a href="#iri-compaction-algorithm"><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction</a> on <em>property</em> with the
+ <em>vocabRelative</em> flag set to <code>true</code>.</li>
+ <li>If <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>, i.e., it is a
+ <a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">property generator</a>, set <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> to the result of performing the
+ <a href="#find-and-remove-property-generator-duplicates">Find and Remove Property Generator Duplicates</a>
+ algorithm passing <em>element</em>, <em>property</em>, <a class="tref internalDFN" title="null" href="#dfn-null">null</a> for value, the
+ <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
+ <li>Ensure that <em>result</em> has an <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> member; if not create it
+ and set its value to an empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.</li>
+ <li>Continue with the next <em>property</em>-<em>value</em> pair from <em>element</em>.</li>
+ </ol>
+ </li>
+ <li>Otherwise perform the following steps for each <em>item</em> of <em>value</em>:
+ <ol class="algorithm">
+ <li>Set <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> to the result of performing
+ <a href="#iri-compaction-algorithm"><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction</a> on <em>property</em> with the
+ <em>vocabRelative</em> flag set to <code>true</code>.</li>
+ <li>If <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>, i.e., it is a
+ <a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">property generator</a>, set <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> to the result of performing the
+ <a href="#find-and-remove-property-generator-duplicates">Find and Remove Property Generator Duplicates</a>
+ algorithm passing <em>element</em>, <em>property</em>, <em>item</em>, the
+ <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
+
+ <li>If the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property's</a> <a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping">container mapping</a>
+ is set to <code>@language</code> or <code>@annotation</code>
+ <ol class="algorithm">
+ <li>Unless <em>result</em> has already an <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> member, create one and
+ initialize its value to an empty <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>. This object is called <em>mapObject</em>.</li>
+ <li>Set <em>index</em> to the value of the <code>@language</code> or
+ <code>@annotation</code> member of <em>item</em> (depending on the value of the
+ <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property's</a> <a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping">container mapping</a>).</li>
+ <li>First compact <em>item</em> using the <a href="#value-compaction">Value Compaction algorithm</a>
+ passing <em>index</em> as <em>containerValue</em>, then compact it by recursively invoking this
+ algorithm passing a copy of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a>, and the
+ <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
+ <li>If no <em>index</em> member exists in the <em>mapObject</em> create one and set its value
+ to <em>item</em>; otherwise append <em>item</em> to the <em>index</em> member (converting it to
+ an array if it is not one already).</li>
+ <li>Continue with the next <em>property</em>-<em>value</em> pair from <em>element</em>.</li>
+ </ol>
+ </li>
+ <li>If <em>item</em> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> having a <code>@list</code> member,
+ <ol class="algorithm">
+ <li>compact the value of that member by recursively invoking this algorithm passing
+ a copy of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a>, and the
+ <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> ensuring that the result is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.</li>
+ <li>If the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property's</a> <a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping">container mapping</a>
+ is set to <code>@list</code>, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> member of <em>result</em>
+ to the value of <em>item's</em> <code>@list</code> member. If such an member already exists
+ in result, raise an <code class="error">COMPACTION_TO_LIST_OF_LISTS</code> error; otherwise
+ continue with the next <em>property</em>-<em>value</em> pair from <em>element</em>.</li>
+ </ol>
+ </li>
+ <li>If <em>item</em> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>, compact it by recursively
+ invoking this algorithm passing a copy of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+ <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a>, and the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
+ <li>If no <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> member exists in <em>result</em> create one and set its value
+ to <em>item</em>; otherwise append <em>item</em> to the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> member
+ (converting it to an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> if it is not one already).</li>
+ <li>If the <code class="idlMemberName"><a href="#widl-JsonLdOptions-compactArrays">compactArrays</a></code>
+ option is set to <code>false</code> or the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property's</a>
+ <a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping">container mapping</a> is set to <code>@list</code> or <code>@set</code>, convert the
+ value of the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> member of <em>result</em> to an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> if
+ it is not one already.</li>
+ </ol>
+ </li>
+ </ol>
+
+ <p>If, after the algorithm outlined above is run, the resulting <em>element</em> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>
+ replace it with a new <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> with a single member whose name is the result of
+ compacting the value <code>@graph</code> with the <a href="#iri-compaction-algorithm"><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction algorithm</a>
+ and whose value is <em>element</em>. Finally, add a <code>@context</code> property to <em>element</em>
+ and set it to the initially passed <em>context</em>.</p>
+</li></ol></section>
+
+<section id="iri-compaction-algorithm">
+ <h3><span class="secno">5.9 </span><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction Algorithm</h3>
+
+ <p>This section defines an algorithm for transforming an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> to a
+ <a class="tref internalDFN" title="term" href="#dfn-term">term</a> or <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a>. If a <em>value</em> is passed
+ it is used to choose the best matching <a class="tref internalDFN" title="term" href="#dfn-term">term</a>.</p>
+
+ <p>This algorithm takes three mandatory and two optional parameters. The mandatory
+ parameters are the <em>iri</em> to be compacted, an <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+ and an <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a>. Optionally it is possible to pass a <em>value</em>
+ and a <em>vocabRelative</em> flag which specifies whether the passed <em>iri</em>
+ should be compacted using the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context's</a>
+ <a class="tref internalDFN" title="vocabulary_mapping" href="#dfn-vocabulary_mapping">vocabulary mapping</a>. If the <em>vocabRelative</em> flag is not set
+ it defaults to <code>false</code>.</p>
+
+ <p>The algorithm for generating a <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> is:</p>
+
+ <ol class="algorithm">
+ <li>Initialize a variable <em>result</em> to <a class="tref internalDFN" title="null" href="#dfn-null">null</a>.</li>
+ <li>If an entry for <em>iri</em> exists in the <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a>,
+ perform the following steps:
+ <ol class="algorithm">
+ <li>If a <em>value</em> has been passed, perform the following steps:
+ <ol class="algorithm">
+ <li>Initialize <em>queryPath</em>, which will be used to query the
+ <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a>, to an empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a></li>
+ <li id="calculate-value-profile-algorithm">Initialize <em>container</em>
+ to <code>@set</code>, <em>typeOrLanguage</em>, and <em>typeLanguageValue</em>
+ to <a class="tref internalDFN" title="null" href="#dfn-null">null</a>.</li>
+ <li>If <em>value</em> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>
+ <ol class="algorithm">
+ <li>and it has an <code>@annotation</code> member, set <em>container</em> to
+ <code>@annotation</code>.</li>
+ <li>If <em>value</em> has an <code>@id</code> member, set
+ <em>typeOrLanguage</em> to <code>@type</code> and <em>typeLanguageValue</em>
+ to <code>@id</code>.</li>
+ <li>Otherwise, if <em>value</em> has an <code>@value</code> member,
+ <ol class="algorithm">
+ <li>and an <code>@type</code> member, set <em>typeOrLanguage</em> to
+ <code>@type</code> and <em>typeLanguageValue</em> to the value of the
+ <code>@type</code> member of <em>value</em>.</li>
+ <li>Otherwise, if it has an <code>@language</code> member, set
+ <em>typeOrLanguage</em> to <code>@language</code> and
+ <em>typeLanguageValue</em> to the value of the <code>@language</code>
+ member of <em>value</em>. If <em>value</em> has no <code>@annotation</code>
+ member, set <em>container</em> to <code>@language</code></li>
+ <li>Otherwise, if the value of <em>value's</em> <code>@value</code>
+ member is is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, set <em>typeOrLanguage</em> to
+ <code>@language</code> and <em>typeLanguageValue</em> to
+ <code>@null</code>.</li>
+ </ol>
+ </li>
+ <li>Otherwise, if <em>value</em> has an <code>@list</code> member,
+ <ol class="algorithm">
+ <li>If the <code>@list</code> member has at least one item, update
+ <em>container</em>, <em>typeOrLanguage</em>, and
+ <em>typeLanguageValue</em> by recursively running the steps
+ <a href="#calculate-value-profile-algorithm">2.1.2</a> to
+ 2.1.3.4 (which will never be true since list of lists are not
+ allowed) of this algorithm passing the first item of <em>value's</em>
+ <code>@list</code> member as new <em>value</em>.</li>
+ <li>If <em>value</em> has no <code>@annotation</code> member, set
+ <em>container</em> to <code>@list</code>.</li>
+ <li>Starting from the second item of <em>value's</em> <code>@list</code>
+ member, recursively run the steps
+ <a href="#calculate-value-profile-algorithm">2.1.2</a> to
+ 2.1.3.4 (which will never be true since list of lists are not
+ allowed) of this algorithm passing the item as new <em>value</em>. If
+ the resulting <em>typeOrLanguage</em> or <em>typeLanguageValue</em>
+ differ from the current value of <em>typeOrLanguage</em> or
+ <em>typeLanguageValue</em>, set both to <a class="tref internalDFN" title="null" href="#dfn-null">null</a> and stop
+ processing the <code>@list</code> items.</li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ <li>If the <em>container</em> equals <code>@list</code>, set the first item of
+ <em>queryPath</em> to an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> consisting of the two elements
+ <code>@list</code> and <code>null</code>; otherwise set it to an array
+ consisting of three elements where the first element is the value of <em>container</em>
+ and the other two elements are <code>@set</code> and <code>@null</code>.</li>
+ <li>If <em>typeOrLanguage</em> is <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, set the second and the the
+ third item of <em>queryPath</em> to an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> consisting of a
+ single element <code>@null</code>.</li>
+ <li>Otherwise, set the second item of <em>queryPath</em> to an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>
+ consisting of two elements where the first element is the value of
+ <em>typeOrLanguage</em> and the second element is <code>@null</code>. Set the
+ third item of <em>queryPath</em> to an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> whose first element
+ <em>typeLanguageValue</em> and whose second element is <code>@null</code>.</li>
+ <li><a href="#inverse-context-query-algorithm">Query the inverse context</a> and
+ store the result in <em>result</em>.</li>
+ <li>If <em>result</em> is a a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> or a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> with a
+ <code>term</code> member, return <em>result</em>.</li>
+ </ol>
+ </li>
+ <li>Otherwise, if the entry for <em>iri</em> in the <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a>
+ has a <code>term</code> member, return its value.</li>
+ </ol>
+ </li>
+ <li>For each <em>termIri</em>-<em>termDefinition</em> pair in <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a>
+ sorted in reverse order by <em>termIri</em> the (longest <em>termIri</em> comes first),
+ perform the following steps:
+ <ol class="algorithm">
+ <li>If <em>termDefinition</em> does not have a <code>term</code> member, i.e., it is
+ a property generator, continue with the next <em>termIri</em>-<em>termDefinition</em>
+ pair from <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a>.</li>
+ <li>Otherwise, if <em>iri</em> begins with <em>termIri</em> and is longer than
+ <em>termIri</em>, generate a <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> by concatenating the value
+ of the <code>term</code> member of <em>termDefinition</em> with a colon
+ (<code>:</code>) character and the unmatched part of <em>iri</em>.</li>
+ <li>If the resulting <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> has an entry in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+ continue with the next <em>termIri</em>-<em>termDefinition</em> pair from
+ <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a> as the <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> cannot be used.</li>
+ <li>Otherwise, if result is <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, return the <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a>; if it is
+ not null, set the <code>term</code> member of <em>result</em> to the <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a>
+ and return <em>result</em>.</li>
+ </ol>
+ </li>
+ <li>If the <em>vocabRelative</em> flag is set to <code>true</code>, the
+ <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> has a <a class="tref internalDFN" title="vocabulary_mapping" href="#dfn-vocabulary_mapping">vocabulary mapping</a>, and <em>iri</em>
+ begins with the <abbr title="Internationalized Resource Identifier">IRI</abbr> of the <a class="tref internalDFN" title="vocabulary_mapping" href="#dfn-vocabulary_mapping">vocabulary mapping</a> but is longer
+ <ol class="algorithm">
+ <li>Set <em>vocabIri</em> to the unmatched part of <em>iri</em>.</li>
+ <li>If there does not exist an entry for <em>vocabIri</em> in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+ return <em>vocabIri</em> if <em>result</em> is <a class="tref internalDFN" title="null" href="#dfn-null">null</a>; if it is not
+ <a class="tref internalDFN" title="null" href="#dfn-null">null</a> set the <code>term</code> member of <em>result</em> to
+ <em>vocabIri</em> and return <em>result</em>.</li>
+ </ol>
+ </li>
+ <li>If <em>result</em> is <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, return <em>iri</em> as is.</li>
+ <li>Otherwise set the <code>term</code> member of <em>result</em> to <em>iri</em> and
+ return <em>result</em>.</li>
+ </ol>
+</section>
+
+<section id="inverse-context-creation">
+ <h3><span class="secno">5.10 </span>Inverse Context Creation</h3>
+
+ <p>An <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> as produced by the
+ <a href="#context-processing">Context Processing</a> algorithm is very
+ efficient for <a href="#iri-expansion">expanding</a>
+ <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> and <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact IRIs</a>
+ to <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a> but is of limited use for the opposite
+ operation: <a href="#iri-compaction-algorithm"><abbr title="Internationalized Resource Identifier">IRI</abbr> compaction</a>. Hence,
+ this algorithm introduces the notion of an <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a>
+ which brings the same efficiency to <a href="#iri-compaction-algorithm"><abbr title="Internationalized Resource Identifier">IRI</abbr> compaction</a>.
+ An <dfn title="inverse_context" id="dfn-inverse_context">inverse context</dfn> a tree of <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON objects</a>
+ which allow to efficiently select a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> for a <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>-value
+ pair.</p>
+
+ <p>The value takes an <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> and returns the corresponding
+ <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a>.</p>
+
+ <ol class="algorithm">
+ <li>Set <em>defaultLanguage</em> to <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context's</a>default language if there is one; otherwise set it to <code>@null</code>.</li>
+ <li>For each <a class="tref internalDFN" title="term_definition" href="#dfn-term_definition">term definition</a> in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>
+ perform the following steps:
+ <ol class="algorithm">
+ <li>If the <a class="tref internalDFN" title="term" href="#dfn-term">term's</a> <a class="tref internalDFN" title="iri_mapping" href="#dfn-iri_mapping"><abbr title="Internationalized Resource Identifier">IRI</abbr> mapping</a> is set to
+ <a class="tref internalDFN" title="null" href="#dfn-null">null</a> continue with the next <a class="tref internalDFN" title="term_definition" href="#dfn-term_definition">term definition</a>.</li>
+ <li>Set <em>container</em> to the value of the <a class="tref internalDFN" title="term" href="#dfn-term">term's</a>
+ <a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping">container mapping</a> or <code>@null</code> if no such mapping exists.</li>
+ <li>If the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> is a <a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">property generator</a>, set <em>termType</em>
+ to <code>propertyGenerators</code>.</li>
+ <li>Otherwise set set <em>termType</em> to <code>term</code> and append the
+ <a class="tref internalDFN" title="term" href="#dfn-term">term</a> to the <code>term</code> member of the <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> for
+ the <a class="tref internalDFN" title="term" href="#dfn-term">term's</a> <abbr title="Internationalized Resource Identifier">IRI</abbr> in <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a>
+ (append <em>term</em> to <code>inverseContext[iri]['term']</code>).</li>
+ <li>For each <em>iri</em> mapped to the <a class="tref internalDFN" title="term" href="#dfn-term">term</a>, perform the following steps:
+ <ol class="algorithm">
+ <li>If the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> has a <a class="tref internalDFN" title="type_mapping" href="#dfn-type_mapping">type mapping</a> to <em>type</em>,
+ append the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> to
+ <code>inverseContext[iri][container]['@type'][type][termType]</code>, e.g.,
+ <code>inverseContext['http://...']['@list']['@type']['http://...']['term']</code>.</li>
+ <li>Otherwise, if the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> has a <a class="tref internalDFN" title="language_mapping" href="#dfn-language_mapping">language mapping</a> store the
+ associated language in <em>language</em>, replacing <a class="tref internalDFN" title="null" href="#dfn-null">null</a> with
+ <code>@null</code>. Then append the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> to
+ <code>inverseContext[iri][container]['@language'][language][termType]</code>, e.g.,
+ <code>inverseContext['http://...']['@list']['@language']['de']['term']</code>.</li>
+ <li>Otherwise append the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> to
+ <code>inverseContext[iri][container]['@null']['@null'][termType]</code> as well as
+ <code>inverseContext[iri][container]['@language'][defaultLanguage][termType]</code>
+ to take the <a class="tref internalDFN" title="default_language" href="#dfn-default_language">default language</a> into consideration for terms without
+ explicit <a class="tref internalDFN" title="language_mapping" href="#dfn-language_mapping">language mapping</a>.</li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ <li>Remove all but the shortest and lexicographically least <a class="tref internalDFN" title="term" href="#dfn-term">term</a> in each
+ <code>term</code> member in <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a>. The result is thus a single
+ <a class="tref internalDFN" title="string" href="#dfn-string">string</a> value.</li>
+ <li>Finally, sort the <a class="tref internalDFN" title="array" href="#dfn-array">array</a> associated with every <code>propertyGenerators</code> member in
+ <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a> lexicographically (shortest <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> come
+ first).</li>
+ </ol>
+</section>
+
+<section id="inverse-context-query-algorithm">
+ <h3><span class="secno">5.11 </span>Inverse Context Query Algorithm</h3>
+
+ <p>It is possible that multiple <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> that differ
+ in their <a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping">container</a>,
+ <a class="tref internalDFN" title="type_mapping" href="#dfn-type_mapping">type</a>, or <a class="tref internalDFN" title="language_mapping" href="#dfn-language_mapping">language mapping</a> are
+ mapped to the same <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>. The purpose of this algorithm is to query
+ the <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a> to return either the best matching <a class="tref internalDFN" title="term" href="#dfn-term">term</a>,
+ or a list of potential <a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">property generators</a>
+ along with a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> to fall back to if none of the
+ <a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">property generators</a> can be applied.</p>
+
+ <p>This algorithm takes an <em>inverseContextSubtree</em>, a <em>queryPath</em>
+ as generated by the <a href="#iri-compaction-algorithm"><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction algorithm</a>
+ and a <em>level</em> parameter which is initialized to <code>0</code> if nothing else
+ is passed. The algorithm returns either a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> representing the best matching
+ <a class="tref internalDFN" title="term" href="#dfn-term">term</a> or a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> consisting of a
+ <code>propertyGenerators</code> member, containing a sorted <a class="tref internalDFN" title="array" href="#dfn-array">array</a> of
+ potential <a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">property generators</a>,
+ and an optional <code>term</code> member containing a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> to fall back
+ to if none of the <a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">property generators</a>
+ can be applied.</p>
+
+ <ol class="algorithm">
+ <li>Initialize <em>result</em> to <a class="tref internalDFN" title="null" href="#dfn-null">null</a>.</li>
+ <li>If <em>level</em> equals <code>3</code>, i.e., the deepest nested
+ <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> in the <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a> has been reached,
+ perform the following steps:
+ <ol class="algorithm">
+ <li>If <em>inverseContextSubtree</em> has a <code>propertyGenerators</code> member,
+ copy that member into a new <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> and store that object in
+ <em>result</em>.</li>
+ <li>If <em>inverseContextSubtree</em> has a <code>term</code> member and
+ <em>result</em> is <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, return the value of that member;
+ otherwise <em>result</em> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>, copy the <code>term</code>
+ member into <em>result</em> and return <em>result</em>.</li>
+ </ol>
+ </li>
+ <li>Otherwise, for each <em>entry</em> of the <a class="tref internalDFN" title="array" href="#dfn-array">array</a> in <em>queryPath's</em>
+ <em>level'd</em> position (<code>queryPath[level]</code>), perform the following steps:
+ <ol class="algorithm">
+ <li>If <em>inverseContextSubtree</em> has no <em>entry</em> member, continue with
+ the next <em>entry</em>.</li>
+ <li>Otherwise set <em>tmpResult</em> to the result of recursively invoking this
+ algorithm passing the <em>entry</em> member of <em>inverseContextSubtree</em> as
+ new <em>inverseContextSubtree</em>, <em>queryPath</em>, and <em>level</em> + <code>1</code>
+ as new <em>level</em>.</li>
+ <li>If <em>tmpResult</em> is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> and <em>result</em> is
+ <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, return <em>tmpResult</em>; otherwise, if <em>result</em> is
+ not <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, transform <em>tmpResult</em> to a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>
+ whose <code>propertyGenerators</code> member is set to an empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a>
+ and whose <code>term</code> member is set to <em>tmpResult</em>.</li>
+ <li>If <em>result</em> is <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, replace it with <em>tmpResult</em>.</li>
+ <li>Otherwise, append each item of the <code>propertyGenerator</code> member of
+ <em>tmpResult</em> to the <code>propertyGenerator</code> member of <em>result</em>
+ unless it is already in <em>result's</em> member. If <em>result</em> has no
+ <code>term</code> member but <em>tmpResult</em> does, copy <em>tmpResult's</em>
+ <code>term</code> member into <em>result</em>.</li>
+ </ol>
+ </li>
+ <li>Return <em>result</em>.</li>
+ </ol>
+</section>
+
+<section id="value-compaction">
+ <h3><span class="secno">5.12 </span>Value Compaction</h3>
+
+ <p>Expansion transforms all values into <a class="tref internalDFN" title="expanded_form" href="#dfn-expanded_form">expanded form</a>in JSON-LD. This algorithm
+ does the opposite, it compacts an algorithm according the <a class="tref internalDFN" title="term_definition" href="#dfn-term_definition">term definition</a>
+ of the passed <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>. After the application of this algorithm a value
+ is said to be in <dfn title="compacted_form" id="dfn-compacted_form">compacted form</dfn>.</p>
+
+ <p>This algorithm takes a <em>value</em>, an <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, an
+ <a class="tref internalDFN" title="inverse_context" href="#dfn-inverse_context">inverse context</a>, an <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>, and an optional
+ <em>containerValue</em>.</p>
+
+ <ol class="algorithm">
+ <li>If a <em>containerValue</em> has been passed, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> has a
+ <a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping">container mapping</a> set to <code>@annotation</code> and <em>value</em>
+ has an <code>@annotation</code> member which equals <em>containerValue</em>, remove that member.</li>
+ <li>If <em>value</em> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> having a single member <code>@id</code>,
+ return the result of performing <a href="#iri-compaction-algorithm"><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction</a> on that
+ member's value.</li>
+ <li>Otherwise, if <em>value</em> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> having a <code>@value</code>
+ member, perform the following steps:
+ <ol class="algorithm">
+ <li>If the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> has a <a class="tref internalDFN" title="type_mapping" href="#dfn-type_mapping">type mapping</a> and <em>value</em>
+ has a corresponding <code>@type</code> member, remove the <code>@type</code> member
+ from <em>value</em>.</li>
+ <li>Otherwise, if the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> has a <a class="tref internalDFN" title="language_mapping" href="#dfn-language_mapping">language mapping</a> and
+ <em>value</em> has a corresponding <code>@language</code> member, remove the
+ <code>@language</code> member from <em>value</em>.</li>
+ <li>Otherwise, if a <em>containerValue</em> has been passed, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+ has a <a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping">container mapping</a> set to <code>@language</code>, and <em>value</em> has
+ a <code>@language</code> member which equals <em>containerValue</em>, remove the
+ <code>@language</code> member from <em>value</em>.</li>
+ <li>Otherwise, if the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> has a <a class="tref internalDFN" title="default_language" href="#dfn-default_language">default language</a>
+ <ol class="algorithm">
+ <li>and the <em>value</em> has a corresponding <code>@language</code> member, remove the
+ <code>@language</code> member from <em>value</em>.</li>
+ <li>Otherwise, or if the value of <em>value's</em> <code>@value</code> member is a
+ <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, return <em>value</em>.</li>
+ </ol>
+ </li>
+ <li>If <em>value</em> has just a <code>@value</code> member, return the value of that
+ member.</li>
+ </ol>
+ </li>
+ <li>Return <em>value</em> as is.</li>
+ </ol>
+</section>
+
+<section id="find-and-remove-property-generator-duplicates">
+ <h3><span class="secno">5.13 </span>Find and Remove Property Generator Duplicates</h3>
+
+ <p>This algorithm checks if a specific value exists for all <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a>
+ associated with a <a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">property generator</a> and if so, it removes them. The
+ algorithm takes five parameters: <em>element</em>, <em>property</em>, <em>value</em>,
+ <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</p>
+
+ <ol class="algorithm">
+ <li>For each item <em>propertyGenerator</em> of the <a class="tref internalDFN" title="array" href="#dfn-array">array</a> which is the
+ value of the <code>propertyGenerators</code> member of <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> perform
+ the following steps:
+ <ol class="algorithm">
+ <li>Check that a member exists for each <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> associated with the
+ <em>propertyGenerator</em>. If <em>value</em> is not <a class="tref internalDFN" title="null" href="#dfn-null">null</a> also check
+ whether each of those members that contains <em>value</em>. Values are considered to be equal
+ if they are of the same type and have the same value(s); <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node objects</a>
+ are considered to be equal if all members match, except if no <code>@id</code> member exists (i.e., it is
+ an unlabeled <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a>, in that case <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node objects</a> are never
+ considered to be equal.
+ </li>
+ <li>If that's not the case, continue with the next <em>propertyGenerator</em>.</li>
+ <li>Otherwise, remove <em>value</em> from every member. If the resulting value
+ of a member is an empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, remove the member altogether
+ from <em>element</em>.</li>
+ <li>Return <em>propertyGenerator</em>.</li>
+ </ol>
+ </li>
+ <li>Return the value of the <code>term</code> member of <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+ since no matching <a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">property generator</a> has been found.</li>
+ </ol>
+</section>
+
+<section id="flattening-algorithm">
+ <h3><span class="secno">5.14 </span>Flattening Algorithm</h3>
+
+ <p>The algorithm takes two input variables, an <em>element</em> to flatten and a
+ <em>context</em> used to compact the flattened document.</p>
+
+ <ol class="algorithm">
+ <li>Expand <em>element</em> according the
+ <a href="#expansion-algorithm">Expansion algorithm</a>.</li>
+ <li>Generate a <em>nodeMap</em> according the
+ <a href="#node-map-generation">Node Map Generation algorithm</a>.</li>
+ <li>Let <em>defaultGraph</em> be the value of the <code>@default</code> member of
+ <em>nodeMap</em>; a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> representing the <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a>.</li>
+ <li>For each other <em>graphName</em>-<em>graph</em> pair in <em>nodeMap</em>
+ perform the following steps:
+ <ol class="algorithm">
+ <li>If <em>defaultGraph</em> does not have a <em>graphName</em> member, create
+ one and initialize its value to a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> consisting of an
+ <code>@id</code> member whose value is set to <em>graphName</em>.</li>
+ <li>Add a <code>@graph</code> member set to an empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a>
+ (referred to as <em>nodes</em>) to the <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> which is the
+ value of the <em>graphName</em> member of <em>nodeMap</em>.</li>
+ <li>For each <em>id</em>-<em>node</em> pair in <em>graph</em> ordered by <em>id</em>,
+ add <em>node</em> to the <em>nodes</em> <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.</li>
+ </ol>
+ </li>
+ <li>Initialize an empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a> flattened.</li>
+ <li>For each <em>id</em>-<em>node</em> pair in <em>defaultGraph</em> ordered by <em>id</em>,
+ add <em>node</em> to <em>flattened</em>.</li>
+ <li>If <em>context</em> equals <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, return <em>flattened</em>.</li>
+ <li>Otherwise, return the result of compacting <em>flattened</em> according the
+ <a href="#compaction-algorithm">Compaction algorithm</a> passing <em>context</em>
+ ensuring that the compaction result uses the <code>@graph</code> keyword (or its alias)
+ at the top-level, even if the context is empty or if there is only one element to
+ put in the <code>@graph</code> <a class="tref internalDFN" title="array" href="#dfn-array">array</a>. This ensures that the returned
+ document has a deterministic structure.</li>
+ </ol>
+</section>
+
+<section id="node-map-generation">
+ <h3><span class="secno">5.15 </span>Node Map Generation</h3>
+
+ <p>This algorithm creates a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> <em>nodeMap</em> holding an indexed
+ representation of the <a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">graphs</a> and <a class="tref internalDFN" title="node" href="#dfn-node">nodes</a>
+ represented in the passed, expanded document. All <a class="tref internalDFN" title="node" href="#dfn-node">nodes</a> that are not
+ uniquely identified by an <abbr title="Internationalized Resource Identifier">IRI</abbr> get assigned a (new) <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifier</a>.
+ The resulting <em>nodeMap</em> will have a member for every graph in the document whose
+ value is another object with a member for every <a class="tref internalDFN" title="node" href="#dfn-node">node</a> represented in the document.
+ The default graph is stored under the <code>@default</code> member, all other graphs are
+ stored under their graph name.</p>
+
+ <p>The algorithm takes as input an expanded JSON-LD document <em>element</em> and a reference to
+ a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> <em>nodeMap</em>. Furthermore it has the optional parameters
+ <a class="tref internalDFN" title="active_graph" href="#dfn-active_graph">active graph</a> (which defaults to <code>@default</code>), an <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>,
+ <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>, and a reference to a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> <em>list</em>. The
+ <em>nodeMap</em> must be initialized to a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> consisting of a single member
+ whose name corresponds with <a class="tref internalDFN" title="active_graph" href="#dfn-active_graph">active graph</a> and whose value is an empty <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>.</p>
+
+ <ol class="algorithm">
+ <li>If <em>element</em> is an array, process each entry in <em>element</em> recursively, using this algorithm
+ and return.</li>
+ <li>Otherwise <em>element</em> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>. Let <em>activeGraph</em> be the
+ <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> which is the value of the <a class="tref internalDFN" title="active_graph" href="#dfn-active_graph">active graph</a> member of
+ <em>nodeMap</em>.</li>
+ <li>If it has a <code>@type</code> member, perform for each <em>item</em> the following
+ steps:
+ <ol class="algorithm">
+ <li>If <em>item</em> is a <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifier</a>, replace it with a
+ <a href="#generate-blank-node-identifier">new blank node identifier</a>.</li>
+ <li>If <em>activeGraph</em> has no member <em>item</em>, create it and initialize its
+ value to a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> consisting of a single member <code>@id</code>
+ with the value <em>item</em>.</li>
+ </ol>
+ </li>
+ <li>If <em>element</em> has an <code>@value</code> member, perform the following steps:
+ <ol class="algorithm">
+ <li>If <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is <a class="tref internalDFN" title="null" href="#dfn-null">null</a>,
+ <a href="#generate-blank-node-identifier">generate a blank node identifier</a> <em>id</em>
+ and store <em>element</em> as value of the member <em>id</em> in <em>activeGraph</em>.
+ <div class="issue"><div class="issue-title"><a href="https://github.com/json-ld/json-ld.org/issues/207"><span>Issue 207</span></a></div><p class="">Handling of free-floating values is still being discussed.</p></div></li>
+ <li>Otherwise, if no <em>list</em> has been passed, merge <em>element</em> into the
+ <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> member of the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> in
+ <em>activeGraph</em>.</li>
+ <li>Otherwise, append <em>element</em> to the <code>@list</code> member of <em>list</em>.</li>
+ </ol>
+ </li>
+ <li>Otherwise, if <em>element</em> has an <code>@list</code> member, perform
+ the following steps:
+ <ol class="algorithm">
+ <li>Initialize a new <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> <em>result</em> having a single member
+ <code>@list</code> whose value is initialized to an empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.</li>
+ <li>Recursively call this algorithm passing the value of <em>element's</em>
+ <code>@list</code> member as new <em>element</em> and <em>result</em> as <em>list</em>.</li>
+ <li>If <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is <a class="tref internalDFN" title="null" href="#dfn-null">null</a>,
+ <a href="#generate-blank-node-identifier">generate a blank node identifier</a> <em>id</em>
+ and store <em>result</em> as value of the member <em>id</em> in <em>activeGraph</em>.
+ <div class="issue"><div class="issue-title"><a href="https://github.com/json-ld/json-ld.org/issues/207"><span>Issue 207</span></a></div><p class="">Handling of free-floating values is still being discussed.</p></div></li>
+ <li>Otherwise, add <em>result</em> to the the value of the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> member
+ of the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> in <em>activeGraph</em>.</li>
+ </ol>
+ </li>
+ <li>Otherwise <em>element</em> is a <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a>, perform the following
+ steps:
+ <ol class="algorithm">
+ <li>If <em>element</em> has an <code>@id</code> member, store its value in <em>id</em> and remove
+ the member from <em>element</em>. If <em>id</em> is a <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifier</a>, replace it with
+ <a href="#generate-blank-node-identifier">a new blank node identifier</a>.</li>
+ <li>Otherwise <a href="#generate-blank-node-identifier">generate a new blank node identifier</a>
+ and store it as <em>id</em>.</li>
+ <li>If <em>activeGraph</em> does not contain a member <em>id</em>, create one and initialize
+ it to a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> consisting of a single member <code>@id</code> whose
+ value is set to <em>id</em>.</li>
+ <li>If <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is not <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, perform the following steps:
+ <ol class="algorithm">
+ <li>Create a new <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> <em>reference</em> consisting of a single member
+ <code>@id</code> whose value is <em>id</em>.</li>
+ <li>If no <em>list</em> has been passed, merge <em>element</em> into the
+ <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> member of the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> in
+ <em>activeGraph</em>.</li>
+ <li>Otherwise, append <em>element</em> to the <code>@list</code> member of <em>list</em>.</li>
+ </ol>
+ </li>
+ <li>If <em>element</em> has an <code>@type</code> member, merge each value into the <code>@type</code>
+ of <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> in <em>activeGraph</em>. Then remove the <code>@type</code> member
+ from <em>element</em>.</li>
+ <li>If <em>element</em> has an <code>@annotation</code> member, set the <code>@annotation</code>
+ of <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> in <em>activeGraph</em> to its value. If such a member already
+ exists in <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and has a different value, raise a
+ <code class="error">CONFLICTING_ANNOTATION</code> error. Otherwise continue and remove the
+ <code>@annotation</code> from <em>element</em>.</li>
+ <li>If <em>element</em> has an <code>@graph</code> member, recursively invoke this algorithm passing
+ the value of the <code>@graph</code> member as new <em>element</em> and <em>id</em> as new
+ <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>. Then remove the <code>@graph</code> member from <em>element</em>.</li>
+ <li>Finally for each <em>property</em>-<em>value</em> pair in <em>element</em> ordered by
+ <em>property</em> perform the following steps:
+ <ol class="algorithm">
+ <li>If no <em>property</em> member exists in the <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> which is the
+ value of the <em>id</em> member of <em>activeGraph</em> create the member and initialize
+ its value to an empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.</li>
+ <li>Recursively invoke this algorithm passing <em>value</em> as new <em>element</em>, <em>id</em>
+ as new <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, and <em>property</em> as new <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ </ol>
+</section>
+
+ <section id="rdf-conversion-algorithms">
+ <h3><span class="secno">5.16 </span>RDF Conversion Algorithms</h3>
+
+ <p>This specification describes algorithms to transform JSON-LD documents to an array of
+ RDF <a class="tref internalDFN" title="quad" href="#dfn-quad">quads</a> and vice-versa. Note that many uses of JSON-LD
+ may not require generation of RDF.</p>
+
+ <p>The processing algorithms described in this section are provided in order to demonstrate
+ how one might implement a JSON-LD to RDF processor. Conformant implementations are only
+ required to produce the same type and number of <a class="tref internalDFN" title="quad" href="#dfn-quad">quads</a> but are
+ not required to implement the algorithm exactly as described.</p>
+
+ <div class="issue"><div class="issue-title"><span>Issue</span></div><p class="">This algorithm hasn't been updated yet.</p></div>
+
+ <section id="convert-to-rdf-algorithm">
+ <h4><span class="secno">5.16.1 </span>Convert to RDF Algorithm</h4>
+ <p>
+ The algorithm below is designed for in-memory implementations with random access to <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> elements.
+ </p>
+ <p>
+ A conforming JSON-LD processor implementing RDF conversion <em class="rfc2119" title="must">must</em> implement a
+ processing algorithm that results in the same set of RDF <a class="tref internalDFN" title="quad" href="#dfn-quad">quads</a> that the following
+ algorithm generates:
+ </p>
+
+ <p>The algorithm takes four input variables: a <em>element</em> to be converted, an
+ <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and <a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">graph name</a>.
+ To begin, the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and <a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">graph name</a>
+ are set to <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, and <em>element</em> is
+ set to the result of performing the <a href="#expansion-algorithm">Expansion Algorithm</a> on
+ the <a class="tref internalDFN" title="json-ld_input" href="#dfn-json-ld_input">JSON-LD input</a> which is expected to be a a well-formed JSON-LD document as defined in [<cite><a class="bibref" href="#bib-JSON-LD">JSON-LD</a></cite>].
+ This removes any existing context to allow the given context to be cleanly applied.</p>
+
+ <ol class="algorithm">
+ <li id="processing-step-associative">
+ If <em>element</em> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>, perform the following steps:
+ <ol class="algorithm">
+ <li>Set <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to <a class="tref internalDFN" title="null" href="#dfn-null">null</a>.</li>
+ <li>
+ If <em>element</em> has a <code>@value</code> property:
+ <ol class="algorithm">
+ <li>If the value of <code>@value</code> is a <a class="tref internalDFN" title="number" href="#dfn-number">number</a>, set the
+ <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to a <a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">typed value</a> using a <a class="tref internalDFN" title="canonical_lexical_form" href="#dfn-canonical_lexical_form">canonical lexical form</a>
+ of the value as defined in the section <a href="#data-round-tripping">Data Round Tripping</a>.
+ Set datatype to the value of the <code>@type</code> property if it exists, otherwise
+ either <code>xsd:integer</code> or <code>xsd:double</code>, depending
+ on if the value contains a fractional and/or an exponential component.</li>
+ <li>Otherwise, if the value of <code>@value</code> is <strong>true</strong> or <strong>false</strong>,
+ set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to a <a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">typed value</a> created from the
+ <a class="tref internalDFN" title="canonical_lexical_form" href="#dfn-canonical_lexical_form">canonical lexical form</a> of the value. Set datatype to the value of the <code>@type</code>
+ property if it exists, otherwise <code>xsd:boolean</code>.</li>
+ <li>
+ Otherwise, if <em>element</em> contains a <code>@type</code> property, set the
+ <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to a <a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">typed value</a>.
+ </li>
+ <li>
+ Otherwise, if <em>element</em> contains a <code>@language</code> property, set the
+ <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to a <a class="tref internalDFN" title="language-tagged_string" href="#dfn-language-tagged_string">language-tagged string</a>.
+ </li>
+ <li>
+ Otherwise, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to a <a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">typed value</a>
+ using <code>xsd:string</code> as the datatype.
+ </li>
+ </ol>
+ </li>
+ <li>
+ If <em>element</em> has a <code>@list</code> property the value <em class="rfc2119" title="must">must</em> be an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.
+ Process its value as a list as described in <a href="#list-conversion">List Conversion</a> using
+ the return value as the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
+ </li>
+ <li>If <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> is not <a class="tref internalDFN" title="null" href="#dfn-null">null</a>:
+ <ol class="algorithm">
+ <li>If neither <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> nor <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> are <a class="tref internalDFN" title="null" href="#dfn-null">null</a>,
+ generate a <a class="tref internalDFN" title="quad" href="#dfn-quad">Quad</a>
+ representing <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>,
+ <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>, and <a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">graph name</a>.</li>
+ <li>Return <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.</li>
+ </ol>
+ </li>
+ <li id="processing-step-subject">If <em>element</em> has a <code>@id</code> property,
+ the value <em class="rfc2119" title="must">must</em> be a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the previously
+ expanded value (either a <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a> or an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>).</li>
+ <li>
+ Otherwise, if <em>element</em> does not have a <code>@id</code> property, set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active
+ subject</a> to newly generated <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a>.</li>
+ <li>
+ Process each <em>property</em> and <em>value</em> in <em>element</em>, ordered by
+ <em>property</em>, as follows:
+ <ol class="algorithm">
+ <li>
+ If <em>property</em> is <code>@type</code>, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+ to <code>rdf:type</code>.
+ </li>
+ <li>Otherwise, if <em>property</em> is <code>@graph</code>,
+ process <em>value</em> algorithm recursively, using <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> as <a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">graph name</a>
+ and null values for <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and then
+ proceed to next property.</li>
+ <li>Otherwise, if <em>property</em> is a <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>, skip this step.</li>
+ <li>Otherwise, set <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> to the <a class="tref internalDFN" title="expanded_iri_form" href="#dfn-expanded_iri_form">expanded <abbr title="Internationalized Resource Identifier">IRI</abbr> form</a> of <em>property</em>.</li>
+ <li>Process <em>value</em> recursively using this algorithm, passing copies of
+ <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and <a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">graph name</a>.
+ </li>
+ </ol>
+ </li>
+ <li>
+ Set <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>.
+ </li>
+ </ol>
+ </li>
+
+ <li>Otherwise, if <em>element</em> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, process each value in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a>
+ as follows, process <em>element</em> recursively using this algorithm, using copies of
+ <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>, and <a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">graph name</a>.</li>
+
+ <li>Otherwise, if <em>element</em> is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, then the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+ must be <code>rdf:type</code> so set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.</li>
+
+ <li>If any of these steps created an <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> and neither <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>
+ nor <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> are <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, generate a <a class="tref internalDFN" title="quad" href="#dfn-quad">Quad</a> using
+ <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>,<a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>, <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> and
+ <a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">graph name</a>.
+ </li>
+ <li>Return <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.</li>
+ </ol>
+ </section>
+
+ <section id="list-conversion" typeof="bibo:Chapter" resource="#list-conversion" rel="bibo:chapter">
+ <h4><span class="secno">5.16.2 </span>List Conversion</h4>
+
+ <p>List Conversion is the process of taking an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> of values and adding them to a newly
+ created <cite><a href="http://www.w3.org/TR/rdf-schema/#ch_collectionvocab">RDF Collection</a></cite> (see
+ [<cite><a class="bibref" href="#bib-RDF-SCHEMA">RDF-SCHEMA</a></cite>]) by linking each element of the list using <code>rdf:first</code> and <code>rdf:next</code>,
+ terminating the list with <code>rdf:nil</code> using the following sequence:</p>
+ <p>The algorithm is invoked with an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> <em>array</em>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+ and returns a value to be used as an <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> in the calling location.</p>
+ <div class="note"><div class="note-title"><span>Note</span></div><div class="">This algorithm does not support lists containing lists.</div></div>
+
+ <div class="issue"><div class="issue-title"><span>Issue</span></div><p class="">This algorithm hasn't been updated yet.</p></div>
+
+ <ol class="algorithm">
+ <li>
+ If <em>array</em> is empty return <code>rdf:nil</code>.
+ </li>
+ <li>
+ Otherwise, generate a <a class="tref internalDFN" title="quad" href="#dfn-quad">Quad</a> using using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+ and a newly generated <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a> identified as <em>first <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a></em>.
+ </li>
+ <li>
+ For each element in <em>array</em> other than the last element:
+ <ol class="algorithm">
+ <li>Create a processor state using
+ <em>first blank node</em> as the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, and
+ <code>rdf:first</code> as the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.
+ <ol class="algorithm">
+ <li>Process the value starting at <a href="#processing-step-associative">Step 1</a>.</li>
+ <li>Proceed using the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
+ </ol>
+ </li>
+ <li>Unless this is the last element in <em>array</em>, generate a new <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a> identified as
+ <em>rest blank node</em>, otherwise use <code>rdf:nil</code>.</li>
+ <li>Generate a new <a class="tref internalDFN" title="quad" href="#dfn-quad">Quad</a> using <em>first blank node</em>,
+ <code>rdf:rest</code> and <em>rest blank node</em>.</li>
+ <li>Set <em>first blank node</em> to
+ <em>rest blank node</em>.</li>
+ <li>Return <em>first blank node</em>.</li>
+ </ol>
+ </li>
+ </ol>
+ </section>
+
+ <section id="convert-from-rdf-algorithm">
+ <h4><span class="secno">5.16.3 </span>Convert from RDF Algorithm</h4>
+ <p>In some cases, data exists natively in the form of triples or or <a class="tref internalDFN" title="quad" href="#dfn-quad">quads</a>;
+ for example, if the data was originally represented in an RDF graph or triple/quad store. This
+ algorithm is designed to simply translate an array of <a class="tref internalDFN" title="quad" href="#dfn-quad">quads</a> into a
+ JSON-LD document.</p>
+ <p>When expanding <a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">typed values</a> having a datatype of <code>xsd:string</code>,
+ the <code>@type</code> <em class="rfc2119" title="must not">must not</em> be set to <code>xsd:string</code> and the resulting value
+ <em class="rfc2119" title="must">must</em> have only a <code>@value</code> property.</p>
+
+ <p>The conversion algorithm takes a single parameter <em>input</em> in the form of an
+ array of <a class="tref internalDFN" title="quad" href="#dfn-quad">Quad</a> representations.</p>
+
+ <div class="issue"><div class="issue-title"><span>Issue</span></div><p class="">This algorithm hasn't been updated yet.</p></div>
+
+ <ol class="algorithm">
+ <li id="new_graph">Construct <em>defaultGraph</em> as a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>
+ containing <em>nodes</em> and <em>listMap</em>, each an empty <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>.</li>
+ <li>Construct <em>graphs</em> as a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> containing <em>defaultGraph</em>
+ identified by
+ an empty <a class="tref internalDFN" title="string" href="#dfn-string">string</a>.</li>
+ <li>For each <a class="tref internalDFN" title="quad" href="#dfn-quad">quad</a> in <em>input</em>:
+ <ol class="algorithm">
+ <li>Set <em>graph</em> to the entry in <em>graphs</em> identified
+ by <em>name</em>, initializing it to a new entry using the mechanism
+ described in <a href="#new_graph">Step 1</a>.</li>
+ <li>If <em>property</em> is <code>rdf:first</code>,
+ use the entry in <em>graph.listMap</em> indexed by <em>subject</em>,
+ initializing it to a new <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> if nesessary. Represent
+ <em>object</em> in <a class="tref internalDFN" title="expanded_form" href="#dfn-expanded_form">expanded form</a>, as described in
+ <a href="#value-expansion">Value Expansion</a>. Add the
+ resulting <em>object representation</em> to the entry indexed by
+ <em>first</em>, and skip to the next <a class="tref internalDFN" title="quad" href="#dfn-quad">quad</a>.</li>
+ <li>If <em>property</em> is <code>rdf:rest</code>:
+ <ol class="algorithm">
+ <li>If <em>object</em> is a <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a>, use the entry in
+ <em>graph.listMap</em> indexed by <em>subject</em>, initializing it
+ to a new <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> if necessary. Add the <em>nominalValue</em> of
+ <em>object</em> to the entry indexed by <em>rest</em>.
+ </li>
+ <li>Skip to the next <a class="tref internalDFN" title="quad" href="#dfn-quad">quad</a>.</li>
+ </ol>
+ </li>
+ <li>If <em>name</em> is not <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, and <em>defaultGraph.nodes</em>
+ does not contain an entry for <em>name</em>,
+ create a new entry for <em>name</em> from a new
+ <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> with key/value pair of <code>@id</code> and
+ <em>name</em> represented in <a class="tref internalDFN" title="expanded_iri_form" href="#dfn-expanded_iri_form">expanded <abbr title="Internationalized Resource Identifier">IRI</abbr> form</a>.</li>
+ <li>Set <em>value</em> as the entry from <em>graph.nodes</em> for
+ <em>subject</em>, initializing it to a new
+ <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> with key/value pair of <code>@id</code> and
+ <em>subject</em> represented in <a class="tref internalDFN" title="expanded_iri_form" href="#dfn-expanded_iri_form">expanded <abbr title="Internationalized Resource Identifier">IRI</abbr> form</a> if necessary.</li>
+ <li>If <em>property</em> is <code>rdf:type</code>, <em>object</em> is not a <a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value">JSON-LD value</a>, and the
+ <code class="idlMemberName"><a href="#widl-JsonLdOptions-useRdfType">useRdfType</a></code>
+ option is not present or <a class="tref internalDFN" title="false" href="#dfn-false">false</a>:
+ <ol class="algorithm">
+ <li>Append <em>object</em> represented in <a class="tref internalDFN" title="expanded_iri_form" href="#dfn-expanded_iri_form">expanded <abbr title="Internationalized Resource Identifier">IRI</abbr> form</a> to the array value for the
+ key <code>@type</code>, creating an entry in <em>value</em> if necessary.</li>
+ </ol>
+ </li>
+
+ <li>Otherwise, if <em>object</em> is a <a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">typed value</a> and the
+ <code class="idlMemberName"><a href="#widl-JsonLdOptions-useNativeTypes">useNativeTypes</a></code>
+ option is set to <a class="tref internalDFN" title="true" href="#dfn-true">true</a>:
+ <ol class="algorithm">
+ <li>Generate a <em>converted value</em>:
+ <ol class="algorithm">
+ <li>If the literal's type is <code>xsd:boolean</code>, the
+ <em>converted value</em> is <a class="tref internalDFN" title="true" href="#dfn-true">true</a> if the literal
+ matches the value <code>true</code> or <code>false</code> if
+ the literal matches the value <code>false</code>.</li>
+ <li>If the literal's type is <code>xsd:integer</code> or
+ <code>xsd:double</code>, try to convert the literal to a
+ JSON <a class="tref internalDFN" title="number" href="#dfn-number">number</a>. If the conversion is successful,
+ store the result in <em>converted value</em>, otherwise
+ set <em>converted value</em> to <em>value</em>.</li>
+ <li>Otherwise, do not perform a conversion. Set
+ the <em>converted value</em> to the <em>value</em>.</li>
+ </ol>
+ </li>
+ <li>Append the <em>converted value</em> to the array value for the
+ key, creating an entry in <em>value</em> if necessary.</li>
+ </ol>
+ </li>
+
+ <li>Otherwise, if <em>object</em> is <code>rdf:nil</code>:
+ <ol class="algorithm">
+ <li>Let <em>key</em> be <em>property</em> expressed in <a class="tref internalDFN" title="expanded_iri_form" href="#dfn-expanded_iri_form">expanded <abbr title="Internationalized Resource Identifier">IRI</abbr> form</a>.</li>
+ <li>Append an empty <code>@list</code> representation to the array value for
+ <em>key</em>, creating an entry in <em>value</em> if necessary.</li>
+ </ol>
+ </li>
+ <li>Otherwise,
+ <ol class="algorithm">
+ <li>Let <em>key</em> be <em>property</em> expressed in <a class="tref internalDFN" title="expanded_iri_form" href="#dfn-expanded_iri_form">expanded <abbr title="Internationalized Resource Identifier">IRI</abbr> form</a> and let
+ <em>object representation</em>
+ be <em>object</em> represented in <a class="tref internalDFN" title="expanded_form" href="#dfn-expanded_form">expanded form</a> as described in
+ <a href="#value-expansion">Value Expansion</a>.</li>
+ <li>If <em>object</em> is a <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a>,
+ use the entry in <em>graph.listMap</em> indexed by <em>object</em>,
+ initializing it to a new <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> if nesessary.
+ Add an entry for <em>head</em> with <em>object representation</em>.</li>
+ <li>Append <em>object representation</em> to the array value for
+ <em>key</em>, creating an entry in <em>value</em> if necessary.</li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ <li>For each <em>name</em> and <em>graph</em> in <em>graphs</em>:
+ <ol class="algorithm">
+ <li>For each <em>subject</em> and <em>entry</em> in <em>graph</em>
+ where <em>entry</em> has both <em>head</em> and <em>first</em> keys:
+ <ol class="algorithm">
+ <li>Set <em>value</em> to the value of <em>head</em> in <em>entry</em>.</li>
+ <li>Remove the entry for <code>@id</code> in <em>value</em>.</li>
+ <li>Add an entry to <em>value</em> for <code>@list</code> initialized to a new array
+ containing the value of <em>first</em> from <em>entry</em>.</li>
+ <li>While <em>entry</em> has a key for <em>rest</em>:
+ <ol class="algorithm">
+ <li>Set <em>entry</em> to the value of <em>graph.listMap</em> for <em>entry.rest</em>.</li>
+ <li>Add the value for <em>entry.first</em> to the list array.</li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ <li>Create <em>array</em> as an empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.</li>
+ <li>For each <em>subject</em> and <em>entry</em> in <em>defaultGraph.nodes</em>
+ ordered by <em>subject</em>:
+ <ol class="algorithm">
+ <li>Add <em>entry</em> to <em>array</em>.</li>
+ <li>If <em>graphs</em> has an entry for <em>subject</em>, add a property
+ <code>@graph</code> in <em>entry</em> containing the ordered entries
+ from <em>graphs[subject].nodes</em>.</li>
+ </ol>
+ </li>
+ <li>Return <em>array</em> as the result.</li>
+ </ol>
+ </section>
+
+ <section id="data-round-tripping">
+ <h4><span class="secno">5.16.4 </span>Data Round Tripping</h4>
+
+ <p>When <a href="#rdf-conversion">converting JSON-LD to RDF</a> JSON-native types such as
+ <em>numbers</em> and <em>booleans</em> are automatically coerced to <strong>xsd:integer</strong>,
+ <strong>xsd:double</strong>, or <strong>xsd:boolean</strong>. Implementers <em class="rfc2119" title="must">must</em> ensure that the
+ result is in <a class="tref internalDFN" title="canonical_lexical_form" href="#dfn-canonical_lexical_form">canonical lexical form</a>. A
+ <dfn title="canonical_lexical_form" id="dfn-canonical_lexical_form">canonical lexical form</dfn> is a set of literals from among the valid set of literals for
+ a datatype such that there is a one-to-one mapping between the <a class="tref internalDFN" title="canonical_lexical_form" href="#dfn-canonical_lexical_form">canonical lexical form</a> and a value
+ in the value space as defined in [<cite><a class="bibref" href="#bib-XMLSCHEMA11-2">XMLSCHEMA11-2</a></cite>]. In other words, every value <em class="rfc2119" title="must">must</em> be converted
+ to a deterministic <a class="tref internalDFN" title="string" href="#dfn-string">string</a> representation.</p>
+
+ <p>The canonical lexical form of an <em>integer</em>, i.e., a number without fractions
+ or a number coerced to <strong>xsd:integer</strong>, is a finite-length sequence of decimal
+ digits (<code>0-9</code>) with an optional leading minus sign; leading zeroes are prohibited.
+ To convert the number in JavaScript, implementers can use the following snippet of code:</p>
+
+ <div class="example"><div class="example-title"><span>Example 12</span></div><pre class="example">(value).toFixed(0).toString()</pre></div>
+
+ <p>The canonical lexical form of a <em>double</em>, i.e., a number with fractions
+ or a number coerced to <strong>xsd:double</strong>, consists of a mantissa followed by the
+ character "E", followed by an exponent. The mantissa <em class="rfc2119" title="must">must</em> be a decimal number. The exponent
+ <em class="rfc2119" title="must">must</em> be an integer. Leading zeroes and a preceding plus sign (<code>+</code>) are prohibited
+ in the exponent. If the exponent is zero, it must be indicated by <code>E0</code>.
+ For the mantissa, the preceding optional plus sign is prohibited and the decimal point is
+ required. Leading and trailing zeroes are prohibited subject to the following: number
+ representations must be normalized such that there is a single digit which is non-zero to the
+ left of the decimal point and at least a single digit to the right of the decimal point unless
+ the value being represented is zero. The canonical representation for zero is <code>0.0E0</code>.
+ <strong>xsd:double</strong>'s value space is defined by the IEEE double-precision 64-bit
+ floating point type [<cite><a class="bibref" href="#bib-IEEE-754-1985">IEEE-754-1985</a></cite>]; in JSON-LD the mantissa is rounded to 15 digits after the
+ decimal point.</p>
+
+ <p>To convert the number in JavaScript, implementers can use the following snippet of code:</p>
+
+ <div class="example"><div class="example-title"><span>Example 13</span></div><pre class="example">(value).toExponential(15).replace(/(\d)0*e\+?/,'$1E')</pre></div>
+
+ <div class="note"><div class="note-title"><span>Note</span></div><p class="">When data such as decimals need to be normalized, JSON-LD authors should
+ not use values that are going to undergo automatic conversion. This is due to the lossy nature
+ of <strong>xsd:double</strong> values. Authors should instead use the expanded object form to
+ set the canonical lexical form directly.</p></div>
+
+ <p>The canonical lexical form of the <em>boolean</em> values <code>true</code> and <code>false</code>
+ are the strings <strong>true</strong> and <strong>false</strong>.</p>
+
+ <p>When JSON-native <a class="tref internalDFN" title="number" href="#dfn-number">number</a>s, are type coerced, lossless data round-tripping can not
+ be guaranted as rounding errors might occur. Additionally, only literals typed as
+ <strong>xsd:integer</strong>, <strong>xsd:double</strong>, and <strong>xsd:boolean</strong> are
+ automatically converted back to their JSON-native counterparts in when
+ <a href="#rdf-conversion">converting from RDF</a>.</p>
+
+ <p>Some JSON serializers, such as PHP's native implementation in some versions,
+ backslash-escape the forward slash character. For example, the value
+ <code>http://example.com/</code> would be serialized as <code>http:\/\/example.com\/</code>.
+ This is problematic as other JSON parsers might not understand those escaping characters.
+ There is no need to backslash-escape forward slashes in JSON-LD. To aid interoperability
+ between JSON-LD processors, a JSON-LD serializer <em class="rfc2119" title="must not">must not</em> backslash-escape forward slashes.</p>
+ </section>
+ </section>
+</section>
+
+<section id="the-application-programming-interface">
+
+<!--OddPage-->
+<h2><span class="secno">6. </span>The Application Programming Interface</h2>
+
+ <p>This API provides a clean mechanism that enables developers to convert
+ JSON-LD data into a a variety of output formats that are easier to work
+ with in various programming languages. If a JSON-LD API is provided in
+ a programming environment, the entirety of the following API <em class="rfc2119" title="must">must</em> be
+ implemented.</p>
+
+ <section id="jsonldprocessor">
+ <h3><span class="secno">6.1 </span>JsonLdProcessor</h3>
+
+ <p>The JSON-LD processor interface is the high-level programming structure that developers
+ use to access the JSON-LD transformation methods.</p>
+
+ <p>The JSON-LD API signatures are the same across all programming languages. Due
+ to the fact that asynchronous programming is uncommon in certain languages, developers <em class="rfc2119" title="may">may</em>
+ implement a processor with a synchronous interface instead. In that case, the <code>callback</code>
+ parameter <em class="rfc2119" title="must not">must not</em> be included and the result <em class="rfc2119" title="must">must</em> be returned as a return value instead.</p>
+
+ <p>It is important to highlight that conformant <a class="tref internalDFN" title="json-ld_processor" href="#dfn-json-ld_processor">JSON-LD processors</a>
+ <em class="rfc2119" title="must not">must not</em> modify the input parameters.</p>
+
+ <pre class="idl"><span class="idlInterface" id="idl-def-JsonLdProcessor">[<span class="extAttr">Constructor</span>]
+interface <span class="idlInterfaceID">JsonLdProcessor</span> {
+<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-expand-void-object-object---DOMString-input-JsonLdCallback-callback-JsonLdOptions-options">expand</a></span> (<span class="idlParam"><span class="idlParamType">(<a>object</a> or <a>object[]</a> or <a>DOMString</a>)</span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType"><a href="#idl-def-JsonLdCallback" class="idlType"><code>JsonLdCallback</code></a></span> <span class="idlParamName">callback</span></span>, <span class="idlParam">optional <span class="idlParamType"><a href="#idl-def-JsonLdOptions" class="idlType"><code>JsonLdOptions</code></a>?</span> <span class="idlParamName">options</span></span>);</span>
+<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-compact-void-object-object---DOMString-input-object-DOMString-context-JsonLdCallback-callback-JsonLdOptions-options">compact</a></span> (<span class="idlParam"><span class="idlParamType">(<a>object</a> or <a>object[]</a> or <a>DOMString</a>)</span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType">(<a>object</a> or <a>DOMString</a>)</span> <span class="idlParamName">context</span></span>, <span class="idlParam"><span class="idlParamType"><a href="#idl-def-JsonLdCallback" class="idlType"><code>JsonLdCallback</code></a></span> <span class="idlParamName">callback</span></span>, <span class="idlParam">optional <span class="idlParamType"><a href="#idl-def-JsonLdOptions" class="idlType"><code>JsonLdOptions</code></a>?</span> <span class="idlParamName">options</span></span>);</span>
+<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-flatten-void-object-object---DOMString-input-object-DOMString-context-JsonLdCallback-callback-JsonLdOptions-options">flatten</a></span> (<span class="idlParam"><span class="idlParamType">(<a>object</a> or <a>object[]</a> or <a>DOMString</a>)</span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType">(<a>object</a> or <a>DOMString</a>)?</span> <span class="idlParamName">context</span></span>, <span class="idlParam"><span class="idlParamType"><a href="#idl-def-JsonLdCallback" class="idlType"><code>JsonLdCallback</code></a></span> <span class="idlParamName">callback</span></span>, <span class="idlParam">optional <span class="idlParamType"><a href="#idl-def-JsonLdOptions" class="idlType"><code>JsonLdOptions</code></a>?</span> <span class="idlParamName">options</span></span>);</span>
+};</span></pre><section id="methods"><h4><span class="secno">6.1.1 </span>Methods</h4><dl class="methods"><dt id="widl-JsonLdProcessor-compact-void-object-object---DOMString-input-object-DOMString-context-JsonLdCallback-callback-JsonLdOptions-options"><code>compact</code></dt><dd>
+ <a href="#compaction">Compacts</a> the given <code>input</code> using the
+ <code>context</code> according to the steps in the
+ <a href="#compaction-algorithm">Compaction Algorithm</a>.
+
+
+ <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code>(<a>object</a> or <a>object[]</a> or <a>DOMString</a>)</code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object or array of JSON-LD objects to perform the compaction upon or an
+ <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> referencing the JSON-LD document to compact.</td></tr><tr><td class="prmName">context</td><td class="prmType"><code>(<a>object</a> or <a>DOMString</a>)</code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The context to use when compacting the <code>input</code>; either in the
+ form of an <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> or as <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JsonLdCallback" class="idlType"><code>JsonLdCallback</code></a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A callback that is called when processing is complete on
+ the given <code>input</code>.</td></tr><tr><td class="prmName">options</td><td class="prmType"><code><a href="#idl-def-JsonLdOptions" class="idlType"><code>JsonLdOptions</code></a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A set of options to configure the used algorithms such. This allows, e.g.,
+ to set the input document's base <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>. This also includes
+ the <code>optimize</code> flag, which, if set, will allow processor-specific
+ optimization.</td></tr></table><div><em>Return type: </em><code><a>void</a></code></div></dd><dt id="widl-JsonLdProcessor-expand-void-object-object---DOMString-input-JsonLdCallback-callback-JsonLdOptions-options"><code>expand</code></dt><dd>
+ <a href="#expansion">Expands</a> the given <code>input</code> according to
+ the steps in the <a href="#expansion-algorithm">Expansion Algorithm</a>.
+
+
+ <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code>(<a>object</a> or <a>object[]</a> or <a>DOMString</a>)</code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object or array of JSON-LD objects to perform the expansion upon or an
+ <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> referencing the JSON-LD document to expand.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JsonLdCallback" class="idlType"><code>JsonLdCallback</code></a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A callback that is called when processing is complete on
+ the given <code>input</code>.</td></tr><tr><td class="prmName">options</td><td class="prmType"><code><a href="#idl-def-JsonLdOptions" class="idlType"><code>JsonLdOptions</code></a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A set of options to configure the used algorithms such. This allows, e.g.,
+ to set the input document's base <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.</td></tr></table><div><em>Return type: </em><code><a>void</a></code></div></dd><dt id="widl-JsonLdProcessor-flatten-void-object-object---DOMString-input-object-DOMString-context-JsonLdCallback-callback-JsonLdOptions-options"><code>flatten</code></dt><dd>
+ <a href="#flattening">Flattens</a> the given <code>input</code> and
+ <a href="#compaction">compacts</a> it using the passed <code>context</code>
+ according to the steps in the <a href="#flattening-algorithm">Flattening Algorithm</a>.
+
+
+ <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code>(<a>object</a> or <a>object[]</a> or <a>DOMString</a>)</code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object or array of JSON-LD objects or an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>
+ referencing the JSON-LD document to flatten.</td></tr><tr><td class="prmName">context</td><td class="prmType"><code>(<a>object</a> or <a>DOMString</a>)</code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The context to use when compacting the flattened <code>input</code>; either
+ in the form of an <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> or as <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>. If
+ <a class="tref internalDFN" title="null" href="#dfn-null">null</a> is passed, the result will not be compacted but keept
+ in expanded form.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JsonLdCallback" class="idlType"><code>JsonLdCallback</code></a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A callback that is called when processing is complete on the given
+ <code>input</code>.</td></tr><tr><td class="prmName">options</td><td class="prmType"><code><a href="#idl-def-JsonLdOptions" class="idlType"><code>JsonLdOptions</code></a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A set of options to configure the used algorithms such. This allows, e.g.,
+ to set the input document's base <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.</td></tr></table><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></section>
+
+ </section>
+
+ <section id="callbacks">
+ <h3><span class="secno">6.2 </span>Callbacks</h3>
+
+ <p>JSON-LD processors utilize callbacks in order to return information in an
+ asynchronous manner to calling applications. This section details the
+ parameters sent to those callbacks.</p>
+
+ <section id="jsonldcallback">
+ <h4><span class="secno">6.2.1 </span>JsonLdCallback</h4>
+ <p>The <a href="#idl-def-JsonLdCallback" class="idlType"><code>JsonLdCallback</code></a> is called when processing of an API method
+ of <a href="#idl-def-JsonLdProcessor" class="idlType"><code>JsonLdProcessor</code></a> has been completed successfully or been
+ terminated by an error.</p>
+
+ <pre class="idl"><span class="idlCallback" id="idl-def-JsonLdCallback">callback <span class="idlCallbackID">JsonLdCallback</span> = <span class="idlCallbackType"><a>void</a></span> (<span class="idlParam"><span class="idlParamType"><a href="#idl-def-JsonLdProcessingError" class="idlType"><code>JsonLdProcessingError</code></a></span> <span class="idlParamName">error</span></span>, <span class="idlParam"><span class="idlParamType"><a>object or object</a>[]</span> <span class="idlParamName">document</span></span>);</span></pre><section><h5 id="callback-jsonldcallback-parameters">Callback <a class="idlType" href="#idl-def-JsonLdCallback"><code>JsonLdCallback</code></a> Parameters</h5><dl class="callback-members"><dt id="widl-JsonLdCallback-error"><code>error</code> of type <span class="idlMemberType"><a href="#idl-def-JsonLdProcessingError" class="idlType"><code>JsonLdProcessingError</code></a></span></dt><dd>If the value is <code>null</code>, then no error occurred. If
+ the value is non-<code>null</code>, a processing error occurred
+ and the details will be contained within the <code>error</code>
+ object.</dd><dt id="widl-JsonLdCallback-document"><code>document</code> of type array of <span class="idlMemberType"><a>object or object</a></span></dt><dd>The processed JSON-LD document.</dd></dl></section>
+ </section>
+ </section>
+
+ <section id="data-structures">
+ <h3><span class="secno">6.3 </span>Data Structures</h3>
+ <p>This section describes datatype definitions used within the JSON-LD API.</p>
+
+ <section id="jsonldoptions">
+ <h4><span class="secno">6.3.1 </span>JsonLdOptions</h4>
+ <p>The <a href="#idl-def-JsonLdOptions" class="idlType"><code>JsonLdOptions</code></a> type is used to pass various options to the <a href="#idl-def-JsonLdProcessor" class="idlType"><code>JsonLdProcessor</code></a> methods.</p>
+ <pre class="idl"><span class="idlDictionary" id="idl-def-JsonLdOptions">dictionary <span class="idlDictionaryID">JsonLdOptions</span> {
+<span class="idlMember"> <span class="idlMemberType"><a>DOMString</a></span> <span class="idlMemberName"><a href="#widl-JsonLdOptions-base">base</a></span>;</span>
+<span class="idlMember"> <span class="idlMemberType"><a>object or DOMString</a></span> <span class="idlMemberName"><a href="#widl-JsonLdOptions-expandContext">expandContext</a></span> = <span class="idlMemberValue">null</span>;</span>
+<span class="idlMember"> <span class="idlMemberType"><a>boolean</a></span> <span class="idlMemberName"><a href="#widl-JsonLdOptions-compactArrays">compactArrays</a></span> = <span class="idlMemberValue">true</span>;</span>
+<span class="idlMember"> <span class="idlMemberType"><a>boolean</a></span> <span class="idlMemberName"><a href="#widl-JsonLdOptions-optimize">optimize</a></span> = <span class="idlMemberValue">false</span>;</span>
+<span class="idlMember"> <span class="idlMemberType"><a>boolean</a></span> <span class="idlMemberName"><a href="#widl-JsonLdOptions-useRdfType">useRdfType</a></span> = <span class="idlMemberValue">false</span>;</span>
+<span class="idlMember"> <span class="idlMemberType"><a>boolean</a></span> <span class="idlMemberName"><a href="#widl-JsonLdOptions-useNativeTypes">useNativeTypes</a></span> = <span class="idlMemberValue">true</span>;</span>
+};</span></pre><section><h5 id="dictionary-jsonldoptions-members">Dictionary <a class="idlType" href="#idl-def-JsonLdOptions"><code>JsonLdOptions</code></a> Members</h5><dl class="dictionary-members"><dt id="widl-JsonLdOptions-base"><code>base</code> of type <span class="idlMemberType"><a>DOMString</a></span></dt><dd>The Base <abbr title="Internationalized Resource Identifier">IRI</abbr> to use when expanding the document. This overrides the value of
+ <em>input</em> if it is a <a><abbr title="Internationalized Resource Identifier">IRI</abbr></a>. If not specified and <em>input</em> is not
+ an <a><abbr title="Internationalized Resource Identifier">IRI</abbr></a>, the base <abbr title="Internationalized Resource Identifier">IRI</abbr> defaults to the current document <abbr title="Internationalized Resource Identifier">IRI</abbr> if in a browser context,
+ or the empty string if there is no document context.
+ </dd><dt id="widl-JsonLdOptions-compactArrays"><code>compactArrays</code> of type <span class="idlMemberType"><a>boolean</a></span>, defaulting to <code>true</code></dt><dd>If set to <code>true</code>, the JSON-LD processor replaces arrays with just
+ one element with that element during compaction. If set to <code>false</code>,
+ all arrays will remain arrays even if they have just one element.
+ </dd><dt id="widl-JsonLdOptions-expandContext"><code>expandContext</code> of type <span class="idlMemberType"><a>object or DOMString</a></span>, defaulting to <code>null</code></dt><dd>A context that is used to initialize the active context when expanding a document.</dd><dt id="widl-JsonLdOptions-optimize"><code>optimize</code> of type <span class="idlMemberType"><a>boolean</a></span>, defaulting to <code>false</code></dt><dd>If set to <code>true</code>, the JSON-LD processor is allowed to
+ optimize the output of the <a href="#compaction-algorithm">Compaction Algorithm</a>
+ to produce even compacter representations. The algorithm for compaction
+ optimization is beyond the scope of this specification and thus
+ not defined. Consequently, different implementations <em class="rfc2119" title="may">may</em> implement
+ different optimization algorithms.
+ </dd><dt id="widl-JsonLdOptions-useNativeTypes"><code>useNativeTypes</code> of type <span class="idlMemberType"><a>boolean</a></span>, defaulting to <code>true</code></dt><dd>If set to <code>true</code>, the JSON-LD processor will try to convert
+ <a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">typed values</a> to JSON native types instead of using the
+ expanded object form when <a href="#convert-from-rdf-algorithm">converting from RDF</a>.
+ <code>xsd:boolean</code> values will be converted to <a class="tref internalDFN" title="true" href="#dfn-true">true</a> or <a class="tref internalDFN" title="false" href="#dfn-false">false</a>.
+ <code>xsd:integer</code> and <code>xsd:double</code> values will be
+ converted to
+ <a class="tref internalDFN" title="number" href="#dfn-number">JSON numbers</a>.
+ </dd><dt id="widl-JsonLdOptions-useRdfType"><code>useRdfType</code> of type <span class="idlMemberType"><a>boolean</a></span>, defaulting to <code>false</code></dt><dd>If set to <code>true</code>, the JSON-LD processor will use the
+ expanded <code>rdf:type</code> <abbr title="Internationalized Resource Identifier">IRI</abbr> as the property instead of
+ <code>@type</code> when <a href="#convert-from-rdf-algorithm">converting from RDF</a>.
+ </dd></dl></section>
+ </section>
+
+ <section id="jsonldprocessingerror">
+ <h4><span class="secno">6.3.2 </span>JsonLdProcessingError</h4>
+
+ <div class="issue"><div class="issue-title"><a href="https://github.com/json-ld/json-ld.org/issues/153"><span>Issue 153</span></a></div><p class="">Developers should note that the details of
+ error handling are being actively debated.</p></div>
+
+ <p>The <a href="#idl-def-JsonLdProcessingError" class="idlType"><code>JsonLdProcessingError</code></a> type is used to report errors to a
+ <a href="#idl-def-JsonLdCallback" class="idlType"><code>JsonLdCallback</code></a>.</p>
+
+ <pre class="idl"><span class="idlDictionary" id="idl-def-JsonLdProcessingError">dictionary <span class="idlDictionaryID">JsonLdProcessingError</span> {
+<span class="idlMember"> <span class="idlMemberType"><a href="#idl-def-JsonLdErrorCode" class="idlType"><code>JsonLdErrorCode</code></a></span> <span class="idlMemberName"><a href="#widl-JsonLdProcessingError-code">code</a></span>;</span>
+<span class="idlMember"> <span class="idlMemberType"><a>DOMString</a>?</span> <span class="idlMemberName"><a href="#widl-JsonLdProcessingError-message">message</a></span>;</span>
+};</span></pre><section><h5 id="dictionary-jsonldprocessingerror-members">Dictionary <a class="idlType" href="#idl-def-JsonLdProcessingError"><code>JsonLdProcessingError</code></a> Members</h5><dl class="dictionary-members"><dt id="widl-JsonLdProcessingError-code"><code>code</code> of type <span class="idlMemberType"><a href="#idl-def-JsonLdErrorCode" class="idlType"><code>JsonLdErrorCode</code></a></span></dt><dd>a string representing the particular error type, as described in
+ the various algorithms in this document.</dd><dt id="widl-JsonLdProcessingError-message"><code>message</code> of type <span class="idlMemberType"><a>DOMString</a></span>, nullable</dt><dd>an optional error message containing additional debugging information.
+ The specific contents of error messages are outside the scope of this
+ specification and thus implementation dependent.</dd></dl></section>
+ </section>
+
+ <section id="jsonlderrorcode">
+ <h4><span class="secno">6.3.3 </span>JsonLdErrorCode</h4>
+ <p>The JsonLdErrorCode represent the collection of valid JSON-LD error
+ codes.</p>
+
+ <pre class="idl"><span class="idlEnum" id="idl-def-JsonLdErrorCode">enum <span class="idlEnumID">JsonLdErrorCode</span> {
+ "<span class="idlEnumItem">INVALID_SYNTAX</span>",
+ "<span class="idlEnumItem">LOAD_ERROR</span>",
+ "<span class="idlEnumItem">LIST_OF_LISTS_DETECTED</span>"
+};</span></pre><table class="simple"><tr><th colspan="2">Enumeration description</th></tr><tr><td><code>INVALID_SYNTAX</code></td><td>A violation of the grammar as defined by the JSON-LD syntax specification
+ [<cite><a class="bibref" href="#bib-JSON-LD">JSON-LD</a></cite>] was detected.</td></tr><tr><td><code>LOAD_ERROR</code></td><td>There was a problem encountered loading a remote context.</td></tr><tr><td><code>LIST_OF_LISTS_DETECTED</code></td><td>A list of lists was detected. List of lists are not supported in
+ this version of JSON-LD due to the algorithmic complexity associated
+ with conversion to RDF.</td></tr></table>
+ </section>
+ </section>
+</section>
+
+<section class="appendix" id="acknowledgements">
+
+<!--OddPage-->
+<h2><span class="secno">A. </span>Acknowledgements</h2>
+
+ <p>A large amount of thanks goes out to the JSON-LD Community Group
+ participants who worked through many of the technical issues on the mailing
+ list and the weekly telecons - of special mention are Niklas Lindström,
+ François Daoust, Lin Clark, and Zdenko 'Denny' Vrandečić.
+ The editors would like to thank Mark Birbeck, who provided a great deal of
+ the initial push behind the JSON-LD work via his work on RDFj.
+ The work of Dave Lehn and Mike Johnson are appreciated for reviewing,
+ and performing several implementations of the specification. Ian Davis is
+ thanked for his work on RDF/JSON. Thanks also to Nathan Rixham,
+ Bradley P. Allen, Kingsley Idehen, Glenn McDonald, Alexandre Passant,
+ Danny Ayers, Ted Thibodeau Jr., Olivier Grisel, Josh Mandel, Eric Prud'hommeaux,
+ David Wood, Guus Schreiber, Pat Hayes, Sandro Hawke, and Richard Cyganiak
+ or their input on the specification.</p>
+</section>
+
+
+
+<section id="references" class="appendix" typeof="bibo:Chapter" resource="#references" rel="bibo:chapter">
+<!--OddPage-->
+<h2><span class="secno">B. </span>References</h2><section id="normative-references" typeof="bibo:Chapter" resource="#normative-references" rel="bibo:chapter"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography" about=""><dt id="bib-IEEE-754-1985">[IEEE-754-1985]</dt><dd rel="dcterms:requires">IEEE. <cite>IEEE Standard for Binary Floating-Point Arithmetic.</cite> See <a href="http://standards.ieee.org/reading/ieee/std_public/description/busarch/754-1985_desc.html">http://standards.ieee.org/reading/ieee/std_public/description/busarch/754-1985_desc.html</a>
+</dd><dt id="bib-JSON-LD">[JSON-LD]</dt><dd rel="dcterms:requires"><cite><a href="http://json-ld.org/spec/ED/json-ld-syntax/20120522/">The JSON-LD Syntax</a></cite> Manu Sporny, Gregg Kellogg, Markus Lanthaler Editors. World Wide Web Consortium (work in progress). 22 May 2012. Editor's Draft. This edition of the JSON-LD Syntax specification is http://json-ld.org/spec/ED/json-ld-syntax/20120522/. The <a href="http://json-ld.org/spec/latest/json-ld-syntax/">latest edition of the JSON-LD Syntax</a> is available at http://json-ld.org/spec/latest/json-ld-syntax/
+</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd rel="dcterms:requires"><cite><a href="http://www.w3.org/TR/2011/WD-rdf11-concepts-20110830/">RDF 1.1 Concepts and Abstract Syntax</a></cite> Richard Cyganiak, David Wood, Editors. World Wide Web Consortium (work in progress). 30 May 2012. Editor's Draft. This edition of the JSON-LD Syntax specification is http://www.w3.org/TR/2011/WD-rdf11-concepts-20110830/. The <a href="http://www.w3.org/TR/rdf11-concepts/">latest edition of the JSON-LD Syntax</a> is available at http://www.w3.org/TR/rdf11-concepts/
+</dd><dt id="bib-RDF-SCHEMA">[RDF-SCHEMA]</dt><dd rel="dcterms:requires">Dan Brickley; Ramanathan V. Guha. <a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210"><cite>RDF Vocabulary Description Language 1.0: RDF Schema.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">http://www.w3.org/TR/2004/REC-rdf-schema-20040210</a>
+</dd><dt id="bib-RFC2119">[RFC2119]</dt><dd rel="dcterms:requires">S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key words for use in RFCs to Indicate Requirement Levels.</cite></a> March 1997. Internet RFC 2119. URL: <a href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
+</dd><dt id="bib-RFC3986">[RFC3986]</dt><dd rel="dcterms:requires">T. Berners-Lee; R. Fielding; L. Masinter. <a href="http://www.ietf.org/rfc/rfc3986.txt"><cite>Uniform Resource Identifier (URI): Generic Syntax.</cite></a> January 2005. Internet RFC 3986. URL: <a href="http://www.ietf.org/rfc/rfc3986.txt">http://www.ietf.org/rfc/rfc3986.txt</a>
+</dd><dt id="bib-RFC3987">[RFC3987]</dt><dd rel="dcterms:requires">M. Dürst; M. Suignard. <a href="http://www.ietf.org/rfc/rfc3987.txt"><cite>Internationalized Resource Identifiers (IRIs).</cite></a> January 2005. Internet RFC 3987. URL: <a href="http://www.ietf.org/rfc/rfc3987.txt">http://www.ietf.org/rfc/rfc3987.txt</a>
+</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd rel="dcterms:requires">D. Crockford. <a href="http://www.ietf.org/rfc/rfc4627.txt"><cite>The application/json Media Type for JavaScript Object Notation (JSON)</cite></a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
+</dd><dt id="bib-WEBIDL">[WEBIDL]</dt><dd rel="dcterms:requires"><cite><a href="http://www.w3.org/TR/2012/CR-WebIDL-20120419/">Web IDL</a></cite> Cameron McCormack, Editor. World Wide Web Consortium. 19 April 2012. Candidate Recommendataion. This edition of Web IDL is http://www.w3.org/TR/2012/CR-WebIDL-20120419/. The <a href="http://dev.w3.org/2006/webapi/WebIDL/">latest edition of Web IDL</a> is available at http://dev.w3.org/2006/webapi/WebIDL/
+</dd><dt id="bib-XMLSCHEMA11-2">[XMLSCHEMA11-2]</dt><dd rel="dcterms:requires">Henry S. Thompson; et al. <a href="http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/"><cite>W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes.</cite></a> 5 April 2012. W3C Recommendation URL: <a href="http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/">http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/</a>
+</dd></dl></section><section id="informative-references" typeof="bibo:Chapter" resource="#informative-references" rel="bibo:chapter"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography" about=""><dt id="bib-BCP47">[BCP47]</dt><dd rel="dcterms:references">A. Phillips; M. Davis. <a href="http://tools.ietf.org/html/bcp47"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/html/bcp47">http://tools.ietf.org/html/bcp47</a>
+</dd><dt id="bib-ECMA-262">[ECMA-262]</dt><dd rel="dcterms:references"><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><cite>ECMAScript Language Specification.</cite></a> June 2011. URL: <a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">http://www.ecma-international.org/publications/standards/Ecma-262.htm</a>
+</dd><dt id="bib-JSON-LD-TESTS">[JSON-LD-TESTS]</dt><dd rel="dcterms:references"><cite><a href="http://dvcs.w3.org/hg/json-ld/raw-file/default/test-suite/">JSON-LD Test Suite</a></cite> (work in progress).
+</dd><dt id="bib-TURTLE-TR">[TURTLE-TR]</dt><dd rel="dcterms:references">Eric Prud'hommeaux, Gavin Carothers. <cite><a href="http://www.w3.org/TR/2011/WD-turtle-20110809/">Turtle: Terse RDF Triple Language.</a></cite> 09 August 2011. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2011/WD-turtle-20110809/">http://www.w3.org/TR/2011/WD-turtle-20110809/</a>
+</dd></dl></section></section></body></html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20121225/diff-20120930.html Sun Dec 23 13:52:00 2012 -0500
@@ -0,0 +1,22715 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML+RDFa 1.1//EN' 'http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" prefix='bibo: http://purl.org/ontology/bibo/' typeof="bibo:Document">
+<head>
+<title>JSON-LD Syntax 1.0</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--
+ === NOTA BENE ===
+ For the three scripts below, if your spec resides on dev.w3 you can check them
+ out in the same tree and use relative links so that they'll work offline,
+ -->
+
+
+
+
+<style type="text/css">
+ .diff { font-weight:bold; color:#0a3; }
+ table, thead, tr, td { padding: 5px; border-width: 1px; border-spacing: 0px; border-style: solid; border-collapse: collapse;}
+</style>
+<style>/*****************************************************************
+ * ReSpec 3 CSS
+ * Robin Berjon - http://berjon.com/
+ *****************************************************************/
+
+/* --- INLINES --- */
+em.rfc2119 {
+ text-transform: lowercase;
+ font-variant: small-caps;
+ font-style: normal;
+ color: #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+ border: none;
+}
+
+dfn {
+ font-weight: bold;
+}
+
+a.internalDFN {
+ color: inherit;
+ border-bottom: 1px solid #99c;
+ text-decoration: none;
+}
+
+a.externalDFN {
+ color: inherit;
+ border-bottom: 1px dotted #ccc;
+ text-decoration: none;
+}
+
+a.bibref {
+ text-decoration: none;
+}
+
+cite .bibref {
+ font-style: normal;
+}
+
+code {
+ color: #ff4500;
+}
+
+
+/* --- --- */
+ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+/* --- TOC --- */
+.toc a, .tof a {
+ text-decoration: none;
+}
+
+a .secno, a .figno {
+ color: #000;
+}
+
+ul.tof, ol.tof {
+ list-style: none outside none;
+}
+
+.caption {
+ margin-top: 0.5em;
+ font-style: italic;
+}
+
+/* --- TABLE --- */
+table.simple {
+ border-spacing: 0;
+ border-collapse: collapse;
+ border-bottom: 3px solid #005a9c;
+}
+
+.simple th {
+ background: #005a9c;
+ color: #fff;
+ padding: 3px 5px;
+ text-align: left;
+}
+
+.simple th[scope="row"] {
+ background: inherit;
+ color: inherit;
+ border-top: 1px solid #ddd;
+}
+
+.simple td {
+ padding: 3px 10px;
+ border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+ background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+ margin-top: 0;
+}
+
+.section dd > p:last-child {
+ margin-bottom: 0;
+}
+
+.section dd {
+ margin-bottom: 1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+ margin-bottom: 0;
+}
+</style><style>/* --- EXAMPLES --- */
+div.example-title {
+ min-width: 7.5em;
+ color: #b9ab2d;
+}
+div.example-title span {
+ text-transform: uppercase;
+}
+aside.example, div.example, div.illegal-example {
+ padding: 0.5em;
+ margin: 1em 0;
+ position: relative;
+ clear: both;
+}
+div.illegal-example { color: red }
+div.illegal-example p { color: black }
+aside.example, div.example {
+ padding: .5em;
+ border-left-width: .5em;
+ border-left-style: solid;
+ border-color: #e0cb52;
+ background: #fcfaee;
+}
+
+aside.example div.example {
+ border-left-width: .1em;
+ border-color: #999;
+ background: #fff;
+}
+aside.example div.example div.example-title {
+ color: #999;
+}
+</style><style>/* --- ISSUES/NOTES --- */
+div.issue-title, div.note-title {
+ padding-right: 1em;
+ min-width: 7.5em;
+ color: #b9ab2d;
+}
+div.issue-title { color: #e05252; }
+div.note-title { color: #52e052; }
+div.issue-title span, div.note-title span {
+ text-transform: uppercase;
+}
+div.note, div.issue {
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+.note > p:first-child, .issue > p:first-child { margin-top: 0 }
+.issue, .note {
+ padding: .5em;
+ border-left-width: .5em;
+ border-left-style: solid;
+}
+div.issue, div.note {
+ padding: 0.5em;
+ margin: 1em 0;
+ position: relative;
+ clear: both;
+}
+span.note, span.issue { padding: .1em .5em .15em; }
+
+.issue {
+ border-color: #e05252;
+ background: #fbe9e9;
+}
+.note {
+ border-color: #52e052;
+ background: #e9fbe9;
+}
+
+
+</style><link rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/W3C-ED" />
+<!--[if lt IE 9]><script src='http://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]-->
+
+<!--[if lt IE 9]><script src='http://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]-->
+<style type='text/css'>
+.diff-old-a {
+ font-size: smaller;
+ color: red;
+}
+
+.diff-new { background-color: yellow; }
+.diff-chg { background-color: lime; }
+.diff-new:before,
+.diff-new:after
+ { content: "\2191" }
+.diff-chg:before, .diff-chg:after
+ { content: "\2195" }
+.diff-old { text-decoration: line-through; background-color: #FBB; }
+.diff-old:before,
+.diff-old:after
+ { content: "\2193" }
+:focus { border: thin red solid}
+</style>
+</head>
+
+
+<body>
+<div class="head">
+<p>
+<a href="http://www.w3.org/">
+<img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C" />
+</a>
+</p>
+<h1 class="title" id="title">
+JSON-LD
+Syntax
+1.0
+</h1>
+<h2 id="subtitle">
+A
+<del class="diff-old">Context-based
+</del>
+JSON
+Serialization
+for
+Linking
+Data
+</h2>
+<h2 id="w3c-editor-s-draft-25-december-2012">
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+Editor's
+Draft
+<del class="diff-old">30
+September
+</del>
+<ins class="diff-chg">25
+December
+</ins>
+2012
+</h2>
+<dl>
+<dt>
+This
+version:
+</dt>
+<dd>
+<a href="http://dvcs.w3.org/hg/json-ld/raw-file/default/spec/latest/json-ld-syntax/index.html">
+http://dvcs.w3.org/hg/json-ld/raw-file/default/spec/latest/json-ld-syntax/index.html
+</a>
+</dd>
+<dt>
+Latest
+published
+version:
+</dt>
+<dd>
+<a href="http://www.w3.org/TR/json-ld-syntax/">
+http://www.w3.org/TR/json-ld-syntax/
+</a>
+</dd>
+<dt>
+Latest
+editor's
+draft:
+</dt>
+<dd>
+<a href="http://dvcs.w3.org/hg/json-ld/raw-file/default/spec/latest/json-ld-syntax/index.html">
+http://dvcs.w3.org/hg/json-ld/raw-file/default/spec/latest/json-ld-syntax/index.html
+</a>
+</dd>
+<dt>
+Editors:
+</dt>
+<dd rel="bibo:editor" inlist="">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Manu Sporny" href="http://manu.sporny.org/">
+Manu
+Sporny
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</span>
+</dd>
+<dd rel="bibo:editor" inlist="">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Gregg Kellogg" href="http://greggkellogg.net/">
+Gregg
+Kellogg
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://kellogg-assoc.com/">
+Kellogg
+Associates
+</a>
+</span>
+</dd>
+<dd rel="bibo:editor" inlist="">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Markus Lanthaler" href="http://www.markus-lanthaler.com/">
+Markus
+Lanthaler
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://www.tugraz.at/">
+Graz
+University
+of
+Technology
+</a>
+</span>
+</dd>
+<dt>
+Authors:
+</dt>
+<dd rel="dcterms:contributor">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Manu Sporny" href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</span>
+</dd>
+<dd rel="dcterms:contributor">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Dave Longley" href="http://digitalbazaar.com/">
+Dave
+Longley
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</span>
+</dd>
+<dd rel="dcterms:contributor">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Gregg Kellogg" href="http://greggkellogg.net/">
+Gregg
+Kellogg
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://kellogg-assoc.com/">
+Kellogg
+Associates
+</a>
+</span>
+</dd>
+<dd rel="dcterms:contributor">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Markus Lanthaler" href="http://www.markus-lanthaler.com/">
+Markus
+Lanthaler
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://www.tugraz.at/">
+Graz
+University
+of
+Technology
+</a>
+</span>
+</dd>
+<dd rel="dcterms:contributor">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Mark Birbeck" href="http://webbackplane.com/">
+Mark
+Birbeck
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://webbackplane.com/">
+Backplane
+Ltd.
+</a>
+</span>
+</dd>
+</dl>
+<p>
+This
+document
+is
+also
+available
+in
+this
+non-normative
+format:
+<a href="diff-20120930.html">
+diff
+to
+previous
+version
+</a>
+</p>
+<p class="copyright">
+<a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">
+Copyright
+</a>
+©
+2010-2012
+<a href="http://www.w3.org/">
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+</a>
+<sup>
+®
+</sup>
+(
+<a href="http://www.csail.mit.edu/">
+<abbr title="Massachusetts Institute of Technology">
+MIT
+</abbr>
+</a>,
+<a href="http://www.ercim.eu/">
+<abbr title="European Research Consortium for Informatics and Mathematics">
+ERCIM
+</abbr>
+</a>,
+<a href="http://www.keio.ac.jp/">
+Keio
+</a>
+),
+All
+Rights
+Reserved.
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+<a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">
+liability
+</a>,
+<a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">
+trademark
+</a>
+and
+<a href="http://www.w3.org/Consortium/Legal/copyright-documents">
+document
+use
+</a>
+rules
+apply.
+</p>
+<hr />
+</div>
+<section id="abstract" class="introductory" property="dcterms:abstract" datatype="" typeof="bibo:Chapter" resource="#abstract" rel="bibo:chapter">
+<h2>
+Abstract
+</h2>
+<p>
+JSON
+has
+proven
+to
+be
+a
+highly
+useful
+object
+serialization
+and
+messaging
+format.
+In
+an
+attempt
+to
+harmonize
+the
+representation
+of
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>
+in
+JSON,
+this
+specification
+outlines
+a
+common
+JSON
+representation
+format
+for
+expressing
+directed
+graphs;
+mixing
+both
+Linked
+Data
+and
+non-Linked
+Data
+in
+a
+single
+document.
+</p>
+</section>
+<section id="sotd" class="introductory" typeof="bibo:Chapter" resource="#sotd" rel="bibo:chapter">
+<h2>
+Status
+of
+This
+Document
+</h2>
+<p>
+<em>
+This
+section
+describes
+the
+status
+of
+this
+document
+at
+the
+time
+of
+its
+publication.
+Other
+documents
+may
+supersede
+this
+document.
+A
+list
+of
+current
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+publications
+and
+the
+latest
+revision
+of
+this
+technical
+report
+can
+be
+found
+in
+the
+<a href="http://www.w3.org/TR/">
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+technical
+reports
+index
+</a>
+at
+http://www.w3.org/TR/.
+</em>
+</p>
+<p>
+This
+document
+has
+been
+under
+development
+for
+over
+20
+months
+in
+the
+JSON
+for
+Linking
+Data
+Community
+Group.
+The
+document
+has
+recently
+been
+transferred
+to
+the
+RDF
+Working
+Group
+for
+review,
+improvement,
+and
+publication
+along
+the
+Recommendation
+track.
+The
+specification
+has
+undergone
+significant
+development,
+review,
+and
+changes
+during
+the
+course
+of
+the
+last
+20
+months.
+</p>
+<p>
+There
+are
+<del class="diff-old">currently
+</del>
+<ins class="diff-chg">several
+independent
+</ins>
+<a href="http://json-ld.org/#impl">
+<del class="diff-old">five
+</del>
+interoperable
+implementations
+</a>
+of
+this
+specification.
+There
+is
+a
+<a href="https://github.com/json-ld/json-ld.org/tree/master/test-suite">
+fairly
+complete
+test
+suite
+</a>
+and
+a
+<a href="http://json-ld.org/playground/">
+live
+JSON-LD
+editor
+</a>
+that
+is
+capable
+of
+demonstrating
+the
+features
+described
+in
+this
+document.
+While
+development
+on
+implementations,
+the
+test
+suite
+and
+the
+live
+editor
+will
+continue,
+they
+are
+believed
+to
+be
+mature
+enough
+to
+be
+integrated
+into
+a
+non-production
+system
+at
+this
+point
+in
+time
+with
+the
+expectation
+that
+they
+could
+be
+used
+in
+a
+production
+system
+within
+the
+next
+year.
+</p>
+<p>
+There
+are
+a
+number
+of
+ways
+that
+one
+may
+participate
+in
+the
+development
+of
+this
+specification:
+</p>
+<ul>
+<li>
+If
+you
+want
+to
+make
+sure
+that
+your
+feedback
+is
+formally
+addressed
+by
+the
+RDF
+Working
+Group,
+you
+should
+send
+it
+to
+public-rdf-comments:
+<a href="http://lists.w3.org/Archives/Public/public-rdf-comments/">
+public-rdf-comments@w3.org
+</a>
+</li>
+<li>
+Ad-hoc
+technical
+discussion
+primarily
+occurs
+on
+the
+public
+community
+mailing
+list:
+<a href="http://lists.w3.org/Archives/Public/public-linked-json/">
+public-linked-json@w3.org
+</a>
+</li>
+<li>
+<a href="http://json-ld.org/minutes/">
+Public
+JSON-LD
+Community
+Group
+teleconferences
+</a>
+are
+held
+on
+Tuesdays
+at
+1500UTC
+every
+week.
+</li>
+<li>
+RDF
+Working
+Group
+teleconferences
+are
+held
+on
+Wednesdays
+at
+1500UTC
+every
+week.
+Participation
+is
+limited
+to
+RDF
+Working
+Group
+members.
+</li>
+<li>
+Specification
+bugs
+and
+issues
+should
+be
+reported
+in
+the
+<a href="https://github.com/json-ld/json-ld.org/issues">
+issue
+tracker
+</a>
+if
+you
+do
+not
+want
+to
+send
+an
+e-mail
+to
+the
+public-rdf-comments
+mailing
+list.
+</li>
+<li>
+<a href="https://github.com/json-ld/json-ld.org/tree/master/spec">
+Source
+code
+</a>
+for
+the
+specification
+can
+be
+found
+on
+Github.
+</li>
+<li>
+The
+<a href="http://webchat.freenode.net/?channels=json-ld">
+#json-ld
+</a>
+IRC
+channel
+is
+available
+for
+real-time
+discussion
+on
+irc.freenode.net.
+</li>
+</ul>
+<p>
+This
+document
+was
+published
+by
+the
+<a href="http://www.w3.org/2011/rdf-wg/">
+RDF
+Working
+Group
+</a>
+as
+an
+Editor's
+Draft.
+If
+you
+wish
+to
+make
+comments
+regarding
+this
+document,
+please
+send
+them
+to
+<a href="mailto:public-rdf-comments@w3.org">
+public-rdf-comments@w3.org
+</a>
+(
+<a href="mailto:public-rdf-comments-request@w3.org?subject=subscribe">
+subscribe
+</a>,
+<a href="http://lists.w3.org/Archives/Public/public-rdf-comments/">
+archives
+</a>
+).
+All
+feedback
+is
+welcome.
+</p>
+<p>
+Publication
+as
+an
+Editor's
+Draft
+does
+not
+imply
+endorsement
+by
+the
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+Membership.
+This
+is
+a
+draft
+document
+and
+may
+be
+updated,
+replaced
+or
+obsoleted
+by
+other
+documents
+at
+any
+time.
+It
+is
+inappropriate
+to
+cite
+this
+document
+as
+other
+than
+work
+in
+progress.
+</p>
+<p>
+This
+document
+was
+produced
+by
+a
+group
+operating
+under
+the
+<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">
+5
+February
+2004
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+Patent
+Policy
+</a>.
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+maintains
+a
+<a href="http://www.w3.org/2004/01/pp-impl/46168/status" rel="disclosure">
+public
+list
+of
+any
+patent
+disclosures
+</a>
+made
+in
+connection
+with
+the
+deliverables
+of
+the
+group;
+that
+page
+also
+includes
+instructions
+for
+disclosing
+a
+patent.
+An
+individual
+who
+has
+actual
+knowledge
+of
+a
+patent
+which
+the
+individual
+believes
+contains
+<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">
+Essential
+Claim(s)
+</a>
+must
+disclose
+the
+information
+in
+accordance
+with
+<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">
+section
+6
+of
+the
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+Patent
+Policy
+</a>.
+</p>
+</section>
+<section id="toc">
+<h2 class="introductory">
+Table
+of
+Contents
+</h2>
+<ul class="toc">
+<li class="tocline">
+<a href="#introduction" class="tocxref">
+<span class="secno">
+1.
+</span>
+Introduction
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#how-to-read-this-document" class="tocxref">
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#design-goals-and-rationale" class="tocxref">
+<span class="secno">
+2.
+</span>
+Design
+Goals
+and
+Rationale
+</a>
+</li>
+<li class="tocline">
+<a href="#terminology" class="tocxref">
+<span class="secno">
+3.
+</span>
+<del class="diff-old">Basic
+Concepts
+</del>
+<ins class="diff-chg">Terminology
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#general-terminology" class="tocxref">
+<span class="secno">
+3.1
+</span>
+<del class="diff-old">Benefits
+of
+JSON-LD
+</del>
+<ins class="diff-chg">General
+Terminology
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#syntax-tokens-and-keywords" class="tocxref">
+<span class="secno">
+3.2
+</span>
+<del class="diff-old">JSON-LD
+Data
+Model
+</del>
+<ins class="diff-chg">Syntax
+Tokens
+and
+Keywords
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#conformance" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.3
+</del>
+<ins class="diff-chg">4.
+</ins>
+</span>
+<del class="diff-old">General
+Terminology
+</del>
+<ins class="diff-chg">Conformance
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#basic-concepts" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.4
+</del>
+<ins class="diff-chg">5.
+</ins>
+</span>
+<del class="diff-old">Syntax
+Tokens
+and
+Keywords
+</del>
+<ins class="diff-chg">Basic
+Concepts
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#the-context" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.5
+</del>
+<ins class="diff-chg">5.1
+</ins>
+</span>
+The
+Context
+</a>
+</li>
+<li class="tocline">
+<a href="#from-json-to-json-ld" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.6
+</del>
+<ins class="diff-chg">5.2
+</ins>
+</span>
+From
+JSON
+to
+JSON-LD
+</a>
+</li>
+<li class="tocline">
+<a href="#iris" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.7
+</del>
+<ins class="diff-chg">5.3
+</ins>
+</span>
+IRIs
+</a>
+</li>
+<li class="tocline">
+<a href="#node-identifiers" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.8
+</del>
+<ins class="diff-chg">5.4
+</ins>
+</span>
+Node
+Identifiers
+</a>
+</li>
+<li class="tocline">
+<a href="#specifying-the-type" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.9
+</del>
+<ins class="diff-chg">5.5
+</ins>
+</span>
+Specifying
+the
+Type
+</a>
+</li>
+<li class="tocline">
+<a href="#string-internationalization" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.10
+</del>
+<ins class="diff-chg">5.6
+</ins>
+</span>
+String
+Internationalization
+</a>
+</li>
+<li class="tocline">
+<a href="#json-ld-syntax" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.11
+</del>
+<ins class="diff-chg">5.7
+</ins>
+</span>
+JSON-LD
+Syntax
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#advanced-concepts" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.
+</del>
+<ins class="diff-chg">6.
+</ins>
+</span>
+Advanced
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#compact-iris" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.1
+</del>
+<ins class="diff-chg">6.1
+</ins>
+</span>
+Compact
+IRIs
+</a>
+</li>
+<li class="tocline">
+<a href="#typed-values" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.2
+</del>
+<ins class="diff-chg">6.2
+</ins>
+</span>
+Typed
+Values
+</a>
+</li>
+<li class="tocline">
+<a href="#language-tagged-strings" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.3
+</del>
+<ins class="diff-chg">6.3
+</ins>
+</span>
+Language-tagged
+Strings
+</a>
+</li>
+<li class="tocline">
+<a href="#referencing-contexts-from-json-documents" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.4
+</del>
+<ins class="diff-chg">6.4
+</ins>
+</span>
+Referencing
+Contexts
+from
+JSON
+Documents
+</a>
+</li>
+<li class="tocline">
+<a href="#expanded-term-definition" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.5
+</del>
+<ins class="diff-chg">6.5
+</ins>
+</span>
+Expanded
+Term
+Definition
+</a>
+</li>
+<li class="tocline">
+<a href="#type-coercion" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.6
+</del>
+<ins class="diff-chg">6.6
+</ins>
+</span>
+Type
+Coercion
+</a>
+</li>
+<li class="tocline">
+<a href="#property-generators" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.7
+</del>
+<ins class="diff-chg">6.7
+</ins>
+</span>
+Property
+Generators
+</a>
+</li>
+<li class="tocline">
+<a href="#iri-expansion-within-a-context" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.8
+</del>
+<ins class="diff-chg">6.8
+</ins>
+</span>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+Within
+a
+Context
+</a>
+</li>
+<li class="tocline">
+<a href="#sets-and-lists" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.9
+</del>
+<ins class="diff-chg">6.9
+</ins>
+</span>
+Sets
+and
+Lists
+</a>
+</li>
+<li class="tocline">
+<a href="#embedding" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.10
+</del>
+<ins class="diff-chg">6.10
+</ins>
+</span>
+Embedding
+</a>
+</li>
+<li class="tocline">
+<a href="#named-graphs" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.11
+</del>
+<ins class="diff-chg">6.11
+</ins>
+</span>
+Named
+Graphs
+</a>
+</li>
+<li class="tocline">
+<a href="#identifying-blank-nodes" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.12
+</del>
+<ins class="diff-chg">6.12
+</ins>
+</span>
+Identifying
+<del class="diff-old">Unlabeled
+</del>
+<ins class="diff-chg">Blank
+</ins>
+Nodes
+</a>
+</li>
+<li class="tocline">
+<a href="#aliasing-keywords" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.13
+</del>
+<ins class="diff-chg">6.13
+</ins>
+</span>
+Aliasing
+Keywords
+</a>
+</li>
+<li class="tocline">
+<a href="#data-annotations" class="tocxref">
+<span class="secno">
+<ins class="diff-new">6.14
+</ins></span><ins class="diff-new">
+Data
+Annotations
+</ins></a></li><li class="tocline"><a href="#explicitly-ignoring-data" class="tocxref"><span class="secno"><ins class="diff-new">
+6.15
+</ins></span><ins class="diff-new">
+Explicitly
+Ignoring
+Data
+</ins></a></li><li class="tocline">
+<a href="#expanded-document-form" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.14
+</del>
+<ins class="diff-chg">6.16
+</ins>
+</span>
+Expanded
+Document
+Form
+</a>
+</li>
+<li class="tocline">
+<a href="#compact-document-form" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.15
+</del>
+<ins class="diff-chg">6.17
+</ins>
+</span>
+Compact
+Document
+Form
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#data-model" class="tocxref">
+<span class="secno">
+A.
+</span>
+<ins class="diff-new">Data
+Model
+</ins></a></li><li class="tocline"><a href="#json-ld-grammar" class="tocxref"><span class="secno"><ins class="diff-new">
+B.
+</ins></span>
+JSON-LD
+Grammar
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#grammar-node-object" class="tocxref">
+<span class="secno">
+<del class="diff-old">A.1
+</del>
+<ins class="diff-chg">B.1
+</ins>
+</span>
+Node
+<del class="diff-old">Definition
+</del>
+<ins class="diff-chg">Object
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#grammar-term-reference" class="tocxref">
+<span class="secno">
+<del class="diff-old">A.2
+</del>
+<ins class="diff-chg">B.2
+</ins>
+</span>
+<del class="diff-old">Node
+Reference
+</del>
+<ins class="diff-chg">Term
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#grammar-language-map" class="tocxref">
+<span class="secno">
+<del class="diff-old">A.3
+</del>
+<ins class="diff-chg">B.3
+</ins>
+</span>
+Language
+Map
+</a>
+</li>
+<li class="tocline">
+<a href="#grammar-annotation-map" class="tocxref">
+<span class="secno">
+<ins class="diff-new">B.4
+</ins></span><ins class="diff-new">
+Annotation
+Map
+</ins></a></li><li class="tocline">
+<a href="#grammar-expanded-values" class="tocxref">
+<span class="secno">
+<del class="diff-old">A.4
+</del>
+<ins class="diff-chg">B.5
+</ins>
+</span>
+Expanded
+Values
+</a>
+</li>
+<li class="tocline">
+<a href="#grammar-set-list" class="tocxref">
+<span class="secno">
+<del class="diff-old">A.5
+</del>
+<ins class="diff-chg">B.6
+</ins>
+</span>
+List
+and
+Set
+Values
+</a>
+</li>
+<li class="tocline">
+<a href="#grammar-context" class="tocxref">
+<span class="secno">
+<del class="diff-old">A.6
+</del>
+<ins class="diff-chg">B.7
+</ins>
+</span>
+Context
+Definition
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#relationship-to-rdf" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.
+</del>
+<ins class="diff-chg">C.
+</ins>
+</span>
+Relationship
+to
+<del class="diff-old">Other
+Linked
+Data
+Formats
+and
+Data
+Models
+</del>
+<ins class="diff-chg">RDF
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#relationship-to-other-linked-data-formats" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.1
+</del>
+<ins class="diff-chg">D.
+</ins>
+</span>
+<del class="diff-old">RDF
+</del>
+<ins class="diff-chg">Relationship
+to
+Other
+Linked
+Data
+Formats
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#turtle" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.1.1
+</del>
+<ins class="diff-chg">D.1
+</ins>
+</span>
+Turtle
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#prefix-definitions" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.1.1.1
+</del>
+<ins class="diff-chg">D.1.1
+</ins>
+</span>
+Prefix
+definitions
+</a>
+</li>
+<li class="tocline">
+<a href="#embedding-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.1.1.2
+</del>
+<ins class="diff-chg">D.1.2
+</ins>
+</span>
+Embedding
+</a>
+</li>
+<li class="tocline">
+<a href="#lists" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.1.1.3
+</del>
+<ins class="diff-chg">D.1.3
+</ins>
+</span>
+Lists
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#rdfa" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.1.2
+</del>
+<ins class="diff-chg">D.2
+</ins>
+</span>
+RDFa
+</a>
+</li>
+<li class="tocline">
+<a href="#microformats" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.1.3
+</del>
+<ins class="diff-chg">D.3
+</ins>
+</span>
+Microformats
+</a>
+</li>
+<li class="tocline">
+<a href="#microdata" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.1.4
+</del>
+<ins class="diff-chg">D.4
+</ins>
+</span>
+Microdata
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#iana-considerations" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.2
+</del>
+<ins class="diff-chg">E.
+</ins>
+</span>
+IANA
+Considerations
+</a>
+</li>
+<li class="tocline">
+<a href="#acknowledgements" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.3
+</del>
+<ins class="diff-chg">F.
+</ins>
+</span>
+Acknowledgements
+</a>
+</li>
+<li class="tocline">
+<a href="#references" class="tocxref">
+<span class="secno">
+<del class="diff-old">C.
+</del>
+<ins class="diff-chg">G.
+</ins>
+</span>
+References
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#normative-references" class="tocxref">
+<span class="secno">
+<del class="diff-old">C.1
+</del>
+<ins class="diff-chg">G.1
+</ins>
+</span>
+Normative
+references
+</a>
+</li>
+<li class="tocline">
+<a href="#informative-references" class="tocxref">
+<span class="secno">
+<del class="diff-old">C.2
+</del>
+<ins class="diff-chg">G.2
+</ins>
+</span>
+Informative
+references
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</section>
+<section class="informative" id="introduction">
+<h2>
+<span class="secno">
+1.
+</span>
+Introduction
+</h2>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+<del class="diff-old">JSON,
+as
+specified
+in
+[
+</del>
+<del class="diff-old">RFC4627
+],
+is
+a
+simple
+language
+for
+representing
+data
+on
+the
+Web.
+</del>
+<dfn title="linked_data" id="dfn-linked_data">
+Linked
+Data
+</dfn>
+is
+a
+technique
+for
+creating
+a
+network
+of
+inter-connected
+data
+across
+different
+<del class="diff-old">Web
+</del>
+documents
+and
+Web
+sites.
+<del class="diff-old">A
+document
+in
+this
+data
+network
+is
+typically
+identified
+using
+an
+</del>
+<ins class="diff-chg">In
+general,
+Linked
+Data
+has
+four
+properties:
+1)
+it
+uses
+</ins>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<del class="diff-old">IRI
+</del>
+<ins class="diff-chg">IRIs
+</ins>
+</a>
+<del class="diff-old">(Internationalized
+Resource
+Identifier).
+A
+software
+program
+can
+typically
+follow
+an
+IRI
+just
+like
+you
+follow
+a
+URL
+by
+putting
+</del>
+<ins class="diff-chg">to
+name
+things;
+2)
+</ins>
+it
+<del class="diff-old">into
+your
+browser's
+location
+bar.
+By
+following
+IRIs,
+a
+software
+program
+can
+find
+</del>
+<ins class="diff-chg">uses
+HTTP
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-chg">
+IRIs
+</ins></a><ins class="diff-chg">
+for
+those
+names;
+3)
+the
+name
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-chg">
+IRIs
+</ins></a>,<ins class="diff-chg">
+when
+dereferenced,
+provide
+</ins>
+more
+information
+about
+the
+<del class="diff-old">document
+</del>
+<ins class="diff-chg">name;
+</ins>
+and
+<ins class="diff-new">4)
+</ins>
+the
+<del class="diff-old">thing
+s
+that
+the
+document
+describes.
+</del>
+<ins class="diff-chg">data
+expresses
+links
+to
+data
+on
+other
+Web
+sites.
+</ins>
+These
+<del class="diff-old">things
+may
+also
+be
+identified
+using
+IRI
+s.
+The
+IRI
+allows
+a
+software
+program
+</del>
+<ins class="diff-chg">properties
+allow
+data
+published
+on
+the
+Web
+</ins>
+to
+<ins class="diff-new">work
+much
+like
+Web
+pages
+do
+today.
+One
+can
+</ins>
+start
+at
+one
+<del class="diff-old">document
+</del>
+<ins class="diff-chg">piece
+of
+Linked
+Data,
+</ins>
+and
+follow
+<ins class="diff-new">the
+</ins>
+links
+to
+other
+<del class="diff-old">documents
+or
+things
+in
+order
+to
+learn
+more
+about
+all
+</del>
+<ins class="diff-chg">pieces
+</ins>
+of
+<del class="diff-old">the
+documents
+and
+things
+described
+</del>
+<ins class="diff-chg">data
+that
+are
+hosted
+</ins>
+on
+<ins class="diff-new">different
+sites
+across
+</ins>
+the
+Web.
+</p>
+<p>
+JSON-LD
+is
+designed
+as
+a
+lightweight
+syntax
+<del class="diff-old">that
+can
+be
+used
+</del>
+to
+express
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+<del class="diff-old">.
+</del>
+</a>
+<ins class="diff-chg">in
+JSON
+[
+</ins><cite><a class="bibref" href="#bib-RFC4627"><ins class="diff-chg">
+RFC4627
+</ins></a></cite><ins class="diff-chg">
+].
+</ins>
+It
+is
+primarily
+intended
+to
+be
+a
+way
+to
+use
+Linked
+Data
+in
+<del class="diff-old">Javascript
+and
+other
+</del>
+Web-based
+programming
+environments.
+It
+is
+also
+useful
+when
+building
+<del class="diff-old">inter-operable
+</del>
+<ins class="diff-chg">interoperable
+</ins>
+Web
+services
+and
+when
+storing
+Linked
+Data
+in
+JSON-based
+<del class="diff-old">document
+</del>
+storage
+engines.
+<del class="diff-old">It
+</del>
+<ins class="diff-chg">Since
+JSON-LD
+</ins>
+is
+<del class="diff-old">practical
+and
+designed
+to
+be
+as
+simple
+as
+possible,
+utilizing
+</del>
+<ins class="diff-chg">100%
+compatible
+with
+JSON
+</ins>
+the
+large
+number
+of
+JSON
+parsers
+and
+libraries
+available
+<del class="diff-old">today.
+</del>
+<ins class="diff-chg">today
+can
+be
+reused.
+Additionally
+to
+all
+the
+features
+JSON
+provides,
+JSON-LD
+introduces:
+</ins>
+</p>
+<del class="diff-old">The
+syntax
+does
+not
+necessarily
+require
+applications
+</del>
+<ul>
+<li>
+<ins class="diff-chg">a
+universal
+identifier
+mechanism
+for
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+objects
+</ins></a><ins class="diff-chg">
+via
+the
+use
+of
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-chg">
+IRIs
+</ins></a>,</li><li><ins class="diff-chg">
+a
+way
+</ins>
+to
+<del class="diff-old">change
+their
+JSON,
+but
+allows
+</del>
+<ins class="diff-chg">disambiguate
+the
+keys
+used
+between
+multiple
+JSON
+documents
+by
+mapping
+them
+to
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-chg">
+IRIs
+</ins></a><ins class="diff-chg">
+via
+a
+</ins><a class="tref internalDFN" title="context" href="#dfn-context"><ins class="diff-chg">
+context
+</ins></a>,</li><li><ins class="diff-chg">
+a
+mechanism
+in
+which
+a
+value
+in
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+may
+refer
+to
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+on
+a
+different
+site
+on
+the
+Web,
+</ins></li><li><ins class="diff-chg">
+the
+ability
+to
+express
+the
+language
+associated
+with
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a></li><li><ins class="diff-chg">
+a
+way
+to
+associate
+datatypes
+with
+values
+such
+as
+dates,
+times,
+weights,
+and
+distances,
+</ins></li><li><ins class="diff-chg">
+and
+a
+facility
+to
+express
+</ins>
+one
+<ins class="diff-new">or
+more
+directed
+graphs,
+such
+as
+a
+social
+network,
+in
+a
+single
+document.
+</ins></li></ul><p><ins class="diff-new">
+Developers
+that
+require
+any
+of
+the
+facilities
+listed
+above
+or
+need
+</ins>
+to
+<del class="diff-old">easily
+add
+meaning
+by
+simply
+adding
+</del>
+<ins class="diff-chg">serialize
+an
+RDF
+graph
+</ins>
+or
+<del class="diff-old">referencing
+</del>
+<ins class="diff-chg">dataset
+[
+</ins><cite><a class="bibref" href="#bib-RDF-CONCEPTS"><ins class="diff-chg">
+RDF-CONCEPTS
+</ins></a></cite><ins class="diff-chg">
+]
+in
+</ins>
+a
+<del class="diff-old">context.
+</del>
+<ins class="diff-chg">JSON-based
+syntax
+will
+find
+JSON-LD
+of
+interest.
+</ins>
+The
+syntax
+is
+designed
+to
+not
+disturb
+already
+deployed
+systems
+running
+on
+JSON,
+but
+provide
+a
+smooth
+upgrade
+path
+from
+JSON
+to
+JSON-LD.
+<del class="diff-old">Finally,
+the
+format
+is
+intended
+to
+be
+easy
+to
+parse,
+efficient
+to
+generate,
+and
+can
+operate
+inside
+of
+devices
+that
+contain
+very
+little
+memory.
+</del>
+</p>
+<section id="how-to-read-this-document">
+<h3>
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</h3>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+This
+document
+is
+a
+detailed
+specification
+for
+a
+serialization
+of
+Linked
+Data
+in
+JSON.
+The
+document
+is
+primarily
+intended
+for
+the
+following
+audiences:
+</p>
+<ul>
+<li>
+Software
+developers
+that
+want
+to
+encode
+Linked
+Data
+in
+a
+variety
+of
+programing
+languages
+that
+can
+use
+JSON.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+understand
+the
+design
+decisions
+and
+language
+syntax
+for
+JSON-LD.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+implement
+processors
+and
+APIs
+for
+JSON-LD.
+</li>
+</ul>
+<p>
+This
+specification
+does
+not
+describe
+the
+programming
+interfaces
+for
+the
+JSON-LD
+Syntax.
+The
+specification
+that
+describes
+the
+programming
+interfaces
+for
+JSON-LD
+documents
+is
+the
+JSON-LD
+Application
+Programming
+Interface
+[
+<cite>
+<a class="bibref" href="#bib-JSON-LD-API">
+JSON-LD-API
+</a>
+</cite>
+].
+</p>
+<p>
+To
+understand
+the
+basics
+in
+this
+specification
+you
+must
+first
+be
+familiar
+with
+JSON,
+which
+is
+detailed
+in
+[
+<cite>
+<a class="bibref" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+].
+</p>
+</section>
+</section>
+<section class="informative" id="design-goals-and-rationale">
+<h2>
+<span class="secno">
+2.
+</span>
+Design
+Goals
+and
+Rationale
+</h2>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+A
+number
+of
+design
+goals
+were
+established
+before
+the
+creation
+of
+this
+markup
+language:
+</p>
+<dl>
+<dt>
+Simplicity
+</dt>
+<dd>
+No
+extra
+processors
+or
+software
+libraries
+should
+be
+necessary
+to
+use
+JSON-LD
+in
+its
+most
+basic
+form.
+The
+language
+will
+provide
+developers
+with
+a
+very
+easy
+learning
+curve.
+Developers
+<del class="diff-old">need
+</del>
+only
+<ins class="diff-new">need
+to
+</ins>
+know
+JSON
+and
+two
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keywords
+</a>
+(
+<code>
+@context
+</code>
+and
+<code>
+@id
+</code>
+)
+to
+use
+the
+basic
+functionality
+in
+JSON-LD.
+</dd>
+<dt>
+Compatibility
+</dt>
+<dd>
+The
+JSON-LD
+markup
+must
+be
+100%
+compatible
+with
+JSON.
+This
+ensures
+that
+all
+of
+the
+standard
+JSON
+libraries
+work
+seamlessly
+with
+JSON-LD
+documents.
+</dd>
+<dt>
+Expressiveness
+</dt>
+<dd>
+The
+syntax
+must
+be
+able
+to
+express
+directed
+graphs,
+which
+have
+been
+proven
+to
+be
+able
+to
+express
+almost
+every
+real
+world
+data
+model.
+</dd>
+<dt>
+Terseness
+</dt>
+<dd>
+The
+JSON-LD
+syntax
+must
+be
+very
+terse
+and
+human
+readable,
+requiring
+as
+little
+effort
+as
+possible
+from
+the
+developer.
+</dd>
+<dt>
+Zero
+Edits,
+most
+of
+the
+time
+</dt>
+<dd>
+JSON-LD
+must
+provide
+a
+<a href="#referencing-contexts-from-json-documents">
+mechanism
+</a>
+that
+allows
+developers
+to
+<del class="diff-old">specify
+</del>
+<ins class="diff-chg">reference
+</ins>
+<a class="tref internalDFN" title="context" href="#dfn-context">
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">contexts
+</ins>
+</a>
+in
+<del class="diff-old">a
+way
+that
+is
+out-of-band.
+</del>
+<ins class="diff-chg">responses
+using
+plain
+old
+JSON.
+</ins>
+This
+allows
+organizations
+that
+have
+already
+deployed
+large
+JSON-based
+infrastructure
+to
+<del class="diff-old">add
+meaning
+to
+their
+JSON
+documents
+</del>
+<ins class="diff-chg">use
+JSON-LD's
+features
+</ins>
+in
+a
+way
+that
+is
+not
+disruptive
+to
+their
+day-to-day
+operations
+and
+is
+transparent
+to
+their
+current
+customers.
+At
+times,
+mapping
+JSON
+to
+a
+graph
+representation
+can
+become
+difficult.
+In
+these
+instances,
+rather
+than
+having
+JSON-LD
+support
+an
+esoteric
+use
+case,
+we
+chose
+not
+to
+support
+the
+use
+case
+and
+support
+a
+simplified
+syntax
+instead.
+So,
+while
+Zero
+Edits
+is
+a
+design
+goal,
+it
+is
+not
+always
+possible
+without
+adding
+great
+complexity
+to
+the
+language.
+</dd>
+<dt>
+One-pass
+Processing
+</dt>
+<dd>
+JSON-LD
+supports
+one-pass
+processing,
+which
+results
+in
+a
+very
+small
+memory
+footprint
+when
+processing
+documents.
+For
+example,
+to
+expand
+a
+JSON-LD
+document
+from
+a
+compacted
+form,
+only
+one
+pass
+is
+required
+over
+the
+data.
+</dd>
+<del class="diff-old">Linked
+Data-centric
+The
+focus
+on
+Linked
+Data
+is
+placed
+at
+a
+much
+higher
+priority
+than
+the
+focus
+on
+the
+Semantic
+Web.
+One
+outcome
+of
+this
+ordering
+of
+priorities
+is
+an
+aggressively
+reduced
+focus
+on
+the
+Semantic
+Web
+stack
+(RDF
+[
+RDF-CONCEPTS
+],
+TURTLE
+[
+TURTLE-TR
+],
+triple
+stores,
+and
+SPARQL
+[
+RDF-SPARQL-QUERY
+]).
+While
+this
+may
+be
+off-putting
+to
+proponents
+of
+the
+Semantic
+Web,
+the
+audience
+for
+this
+specification
+are
+Web
+developers
+that
+want
+a
+gentler
+introduction
+and
+a
+simpler
+technology
+stack
+for
+using
+Linked
+Data
+in
+their
+Web
+applications.
+Semantic
+Web
+concepts,
+such
+as
+conversion
+to
+and
+from
+RDF,
+are
+fully
+supported
+by
+JSON-LD,
+but
+the
+implementation
+of
+these
+features
+are
+not
+elaborated
+upon
+in
+this
+specification.
+See
+B.
+Relationship
+to
+Other
+Linked
+Data
+Formats
+and
+Data
+Models
+for
+more
+information
+about
+how
+JSON-LD
+integrates
+into
+the
+more
+traditional
+Semantic
+Web
+stack.
+</del>
+</dl>
+</section>
+<section class="normative" id="terminology">
+<h2>
+<span class="secno">
+3.
+</span>
+<del class="diff-old">Basic
+Concepts
+</del>
+<ins class="diff-chg">Terminology
+</ins>
+</h2>
+<del class="diff-old">This
+section
+is
+normative.
+JSON-LD
+is
+designed
+to
+ensure
+that
+Linked
+Data
+concepts
+can
+be
+marked
+up
+in
+a
+way
+that
+is
+simple
+to
+understand
+and
+create
+by
+Web
+authors.
+In
+many
+cases,
+regular
+JSON
+markup
+can
+become
+Linked
+Data
+with
+the
+simple
+addition
+of
+a
+context
+.
+As
+more
+JSON-LD
+features
+are
+used,
+more
+semantics
+are
+added
+to
+the
+JSON
+markup.
+</del>
+<section id="general-terminology">
+<h3>
+<span class="secno">
+3.1
+</span>
+<del class="diff-old">Benefits
+of
+JSON-LD
+</del>
+<ins class="diff-chg">General
+Terminology
+</ins>
+</h3>
+<p>
+<del class="diff-old">JSON
+provides
+a
+number
+of
+benefits
+to
+software
+developers
+that
+need
+to
+serialize
+data:
+It
+is
+easy
+for
+humans
+to
+read
+and
+write.
+It
+is
+easy
+for
+machines
+to
+parse
+and
+generate.
+It
+has
+a
+syntax
+that
+is
+familiar
+across
+a
+large
+number
+of
+programming
+languages.
+It
+is
+capable
+of
+representing
+many
+different
+types
+of
+data
+using
+two
+universal
+data
+structures;
+a
+collection
+of
+key-value
+pairs
+and
+lists.
+JSON
+has
+become
+a
+very
+popular
+data-interchange
+format
+on
+the
+Web,
+particularly
+for
+REST
+-based
+Web
+Services.
+Unfortunately,
+it
+has
+a
+number
+of
+short-comings
+that
+other
+Web-native
+data
+formats
+do
+not
+have:
+There
+is
+no
+standardized,
+universal
+identifier
+mechanism
+for
+JSON
+object
+s.
+The
+meaning
+of
+the
+keys
+used
+in
+a
+JSON
+object
+s
+are
+ambiguous
+and
+often
+conflict
+with
+other
+data
+published
+on
+the
+Web.
+There
+is
+no
+standardized
+way
+for
+a
+value
+in
+a
+JSON
+object
+to
+refer
+to
+a
+JSON
+object
+on
+a
+different
+site
+on
+the
+Web.
+A
+developer
+cannot
+express
+</del>
+<ins class="diff-chg">This
+document
+uses
+</ins>
+the
+<del class="diff-old">language
+associated
+with
+a
+string
+value
+in
+a
+standardized
+manner.
+There
+is
+no
+standard
+mechanism
+to
+associate
+datatypes
+with
+values
+such
+as
+dates,
+times,
+weights,
+and
+distances.
+There
+is
+no
+facility
+to
+express
+a
+Web
+of
+information
+(directed
+graph),
+such
+</del>
+<ins class="diff-chg">following
+terms
+</ins>
+as
+<del class="diff-old">a
+social
+network,
+</del>
+<ins class="diff-chg">defined
+</ins>
+in
+<del class="diff-old">a
+standardized
+manner.
+JSON-LD
+is
+a
+web-native
+standard,
+is
+100%
+compatible
+with
+JSON,
+provides
+all
+of
+the
+facilities
+that
+JSON
+provides,
+and
+extends
+the
+language
+to
+provide
+the
+following
+core
+advantages:
+A
+universal
+identifier
+mechanism
+for
+</del>
+JSON
+<del class="diff-old">object
+s
+via
+the
+use
+of
+IRI
+</del>
+<ins class="diff-chg">[
+</ins><cite>
+<a class="bibref" href="#bib-RFC4627">
+<ins class="diff-new">RFC4627
+</ins>
+</a>
+<del class="diff-old">s.
+A
+way
+to
+dis-ambiguate
+the
+keys
+used
+between
+multiple
+JSON
+documents
+by
+mapping
+them
+to
+IRI
+</del>
+<del class="diff-old">s
+via
+a
+context
+.
+A
+mechanism
+in
+which
+a
+value
+in
+a
+JSON
+object
+may
+refer
+to
+a
+JSON
+object
+on
+a
+different
+site
+on
+the
+Web.
+The
+ability
+to
+express
+the
+language
+associated
+with
+a
+string
+value.
+A
+way
+to
+associate
+datatypes
+with
+values
+such
+as
+dates,
+times,
+weights,
+and
+distances.
+A
+facility
+</del>
+</cite>
+<ins class="diff-chg">].
+Refer
+</ins>
+to
+<del class="diff-old">express
+one
+or
+more
+directed
+graphs,
+such
+as
+a
+social
+network,
+in
+a
+single
+document.
+Developers
+that
+require
+any
+of
+</del>
+the
+<del class="diff-old">facilities
+listed
+above
+will
+find
+JSON-LD
+of
+interest.
+3.2
+JSON-LD
+Data
+Model
+Linked
+Data
+is
+a
+way
+of
+publishing
+data
+on
+the
+Web.
+In
+general,
+Linked
+Data
+has
+four
+properties;
+1)
+It
+uses
+IRI
+s
+to
+name
+</del>
+<em>
+<del class="diff-old">things
+,
+2)
+It
+uses
+HTTP
+IRI
+s
+for
+those
+names,
+3)
+The
+name
+links,
+when
+followed,
+provide
+more
+information
+about
+the
+name,
+and
+4)
+The
+data
+expresses
+links
+to
+data
+on
+other
+Web
+sites.
+These
+properties
+allow
+data
+published
+on
+the
+Web
+to
+work
+much
+like
+Web
+pages
+do
+today.
+One
+can
+start
+at
+one
+piece
+of
+Linked
+Data,
+and
+follow
+the
+links
+to
+other
+pieces
+of
+data
+that
+are
+hosted
+on
+different
+sites
+across
+the
+Web.
+JSON-LD
+is
+a
+way
+of
+expressing
+Linked
+Data
+on
+the
+Web.
+The
+JSON-LD
+data
+model
+encapsulates
+the
+following
+concepts:
+The
+JSON-LD
+data
+model
+is
+used
+to
+represent
+linked
+data
+graph
+s.
+A
+linked
+data
+graph
+is
+an
+unordered
+labeled
+directed
+graph,
+where
+each
+node
+is
+a
+subject
+or
+object
+,
+and
+edges
+are
+labeled
+using
+properties
+.
+A
+subject
+is
+any
+node
+in
+a
+linked
+data
+graph
+with
+at
+least
+one
+outgoing
+edge.
+A
+subject
+should
+</del>
+<ins class="diff-chg">JSON
+Grammar
+</ins>
+</em>
+<del class="diff-old">be
+labeled
+with
+an
+IRI
+(an
+Internationalized
+Resource
+Identifier
+as
+described
+</del>
+<ins class="diff-chg">section
+</ins>
+in
+[
+<cite>
+<del class="diff-old">RFC3987
+</del>
+<a class="bibref" href="#bib-RFC4627">
+<ins class="diff-chg">RFC4627
+</ins>
+</a>
+</cite>
+<del class="diff-old">]).
+An
+object
+is
+a
+node
+in
+a
+linked
+data
+graph
+with
+at
+least
+one
+incoming
+edge.
+An
+object
+may
+be
+labeled
+with
+an
+IRI
+or
+a
+label
+that
+is
+not
+an
+IRI
+such
+as
+plain
+text,
+internationalized
+text,
+or
+a
+strictly-typed
+data
+value.
+A
+node
+may
+be
+a
+subject
+and
+an
+object
+at
+the
+same
+time.
+A
+property
+is
+the
+label
+on
+an
+edge
+in
+a
+linked
+data
+graph
+.
+A
+property
+should
+be
+an
+IRI
+.
+An
+IRI
+that
+is
+a
+label
+in
+a
+linked
+data
+graph
+should
+be
+dereferencable
+to
+a
+Linked
+Data
+document
+describing
+the
+labeled
+subject
+,
+property
+or
+object
+.
+Note
+A
+Linked
+Data
+document
+does
+not
+necessarily
+need
+to
+be
+expressed
+in
+JSON-LD.
+The
+notion
+of
+Linked
+Data
+is
+a
+concept
+independent
+of
+any
+given
+serialization
+format.
+Figure
+1:
+An
+example
+of
+a
+linked
+data
+graph.
+There
+are
+a
+number
+of
+best
+practices
+that
+can
+ensure
+that
+developers
+will
+generate
+good
+Linked
+Data
+</del>
+<ins class="diff-chg">]
+</ins>
+for
+<del class="diff-old">the
+Web.
+JSON-LD
+formalizes
+those
+techniques
+by
+providing
+a
+mechanism
+to
+map
+JSON
+data,
+i.e.,
+keys
+and
+values,
+to
+IRI
+s.
+This
+does
+not
+mean
+that
+JSON-LD
+requires
+every
+key
+or
+value
+to
+be
+an
+IRI
+,
+but
+rather
+ensures
+that
+keys
+and
+values
+can
+be
+mapped
+to
+IRIs
+if
+the
+developer
+desires
+to
+transform
+their
+data
+into
+Linked
+Data
+.
+3.3
+General
+Terminology
+The
+following
+is
+an
+explanation
+of
+the
+general
+terminology
+used
+in
+this
+document.
+Many
+of
+the
+terms
+should
+be
+familiar
+to
+developers
+that
+have
+used
+JSON:
+</del>
+<ins class="diff-chg">formal
+definitions.
+</ins>
+</p>
+<dl>
+<dt>
+<dfn title="json_object" id="dfn-json_object">
+JSON
+object
+</dfn>
+</dt>
+<dd>
+An
+object
+structure
+is
+represented
+as
+a
+pair
+of
+curly
+brackets
+surrounding
+zero
+or
+more
+key-value
+pairs.
+A
+key
+is
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>.
+A
+single
+colon
+comes
+after
+each
+key,
+separating
+the
+key
+from
+the
+value.
+A
+single
+comma
+separates
+a
+value
+from
+a
+following
+key.
+<del class="diff-old">The
+keys
+within
+an
+object
+should
+be
+unique.
+</del>
+</dd>
+<dt>
+<dfn title="array" id="dfn-array">
+array
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">In
+JSON,
+an
+array
+is
+an
+ordered
+sequence
+of
+zero
+or
+more
+values.
+</del>
+An
+array
+<ins class="diff-new">structure
+</ins>
+is
+represented
+as
+square
+brackets
+surrounding
+zero
+or
+more
+values
+<del class="diff-old">that
+</del>
+<ins class="diff-chg">(or
+elements).
+Elements
+</ins>
+are
+separated
+by
+commas.
+<ins class="diff-new">In
+JSON,
+an
+array
+is
+an
+</ins><em><ins class="diff-new">
+ordered
+</ins></em><ins class="diff-new">
+sequence
+of
+zero
+or
+more
+values.
+</ins>
+While
+JSON-LD
+uses
+the
+same
+array
+representation
+as
+JSON,
+the
+collection
+is
+<em>
+unordered
+</em>
+by
+default.
+While
+order
+is
+preserved
+in
+regular
+JSON
+arrays,
+it
+is
+not
+in
+regular
+JSON-LD
+arrays
+unless
+specific
+markup
+is
+provided
+(see
+<a href="#sets-and-lists" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.9
+</del>
+<ins class="diff-chg">6.9
+</ins>
+</span>
+<span class="sec-title">
+Sets
+and
+Lists
+</span>
+</a>
+).
+</dd>
+<dt>
+<dfn title="string" id="dfn-string">
+string
+</dfn>
+</dt>
+<dd>
+A
+string
+is
+a
+sequence
+of
+zero
+or
+more
+Unicode
+characters,
+wrapped
+in
+double
+quotes,
+using
+backslash
+escapes
+(if
+necessary).
+A
+character
+is
+represented
+as
+a
+single
+character
+string.
+</dd>
+<dt>
+<dfn title="number" id="dfn-number">
+number
+</dfn>
+</dt>
+<dd>
+A
+number
+is
+similar
+to
+that
+used
+in
+most
+programming
+languages,
+except
+that
+the
+octal
+and
+hexadecimal
+formats
+are
+not
+used
+and
+that
+leading
+zeros
+are
+not
+allowed.
+</dd>
+<dt>
+<dfn title="true" id="dfn-true">
+true
+</dfn>
+and
+<dfn title="false" id="dfn-false">
+false
+</dfn>
+</dt>
+<dd>
+Values
+that
+are
+used
+to
+express
+one
+of
+two
+possible
+boolean
+states.
+</dd>
+<dt>
+<dfn title="null" id="dfn-null">
+null
+</dfn>
+</dt>
+<dd>
+The
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+<del class="diff-old">value
+is
+used
+to
+make
+a
+JSON-LD
+processor
+"forget"
+any
+previously
+defined
+JSON
+key
+that
+is
+associated
+with
+the
+null
+</del>
+</a>
+value.
+<del class="diff-old">If
+a
+previous
+definition
+doesn't
+exist,
+the
+entire
+</del>
+<ins class="diff-chg">A
+</ins>
+key-value
+<del class="diff-old">is
+ignored.
+If
+a
+previous
+definition
+of
+</del>
+<ins class="diff-chg">pair
+in
+</ins>
+the
+<del class="diff-old">key
+does
+exist,
+</del>
+<code>
+<ins class="diff-chg">@context
+</ins></code><ins class="diff-chg">
+where
+</ins>
+the
+<del class="diff-old">previous
+definition
+</del>
+<ins class="diff-chg">value,
+or
+the
+</ins><code><ins class="diff-chg">
+@id
+</ins></code><ins class="diff-chg">
+of
+the
+value,
+</ins>
+is
+<del class="diff-old">undefined.
+node
+definition
+A
+JSON
+object
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins>
+</a>
+<del class="diff-old">used
+to
+represent
+</del>
+<ins class="diff-chg">explicitly
+decouples
+</ins>
+a
+<del class="diff-old">node
+and
+one
+or
+more
+properties
+of
+that
+node.
+</del>
+<ins class="diff-chg">term's
+association
+with
+an
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>.
+A
+<del class="diff-old">JSON
+object
+is
+</del>
+<ins class="diff-chg">key-value
+pair
+in
+the
+body
+of
+</ins>
+a
+<del class="diff-old">node
+definition
+</del>
+<ins class="diff-chg">JSON-LD
+document
+whose
+value
+is
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a><ins class="diff-chg">
+has
+the
+same
+meaning
+as
+</ins>
+if
+<del class="diff-old">it
+does
+not
+contain
+</del>
+the
+<del class="diff-old">keys
+</del>
+<ins class="diff-chg">key-value
+pair
+was
+not
+defined.
+If
+</ins>
+<code>
+@value
+</code>,
+<code>
+@list
+</code>,
+or
+<code>
+@set
+</code>
+<del class="diff-old">and
+it
+has
+one
+or
+more
+keys
+other
+than
+@id
+.
+A
+node
+definition
+may
+be
+spread
+among
+different
+parts
+of
+a
+document
+or
+even
+between
+different
+documents.
+node
+reference
+A
+</del>
+<ins class="diff-chg">is
+set
+to
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a><ins class="diff-chg">
+in
+expanded
+form,
+then
+the
+entire
+</ins>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+<del class="diff-old">used
+to
+refer
+to
+a
+node
+that
+contains
+a
+single
+key-value
+pair
+where
+the
+key
+</del>
+is
+<del class="diff-old">@id
+.
+</del>
+<ins class="diff-chg">ignored.
+</ins>
+</dd>
+</dl>
+</section>
+<section id="syntax-tokens-and-keywords">
+<h3>
+<span class="secno">
+<del class="diff-old">3.4
+</del>
+<ins class="diff-chg">3.2
+</ins>
+</span>
+Syntax
+Tokens
+and
+Keywords
+</h3>
+<p>
+JSON-LD
+specifies
+a
+number
+of
+syntax
+tokens
+and
+<dfn title="keyword" id="dfn-keyword">
+keywords
+</dfn>
+that
+are
+a
+core
+part
+of
+the
+language:
+</p>
+<dl>
+<dt>
+<code>
+@context
+</code>
+</dt>
+<dd>
+Used
+to
+define
+the
+short-hand
+names
+that
+are
+used
+throughout
+a
+JSON-LD
+document.
+These
+short-hand
+names
+are
+called
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">terms
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+and
+help
+developers
+to
+express
+specific
+identifiers
+in
+a
+compact
+manner.
+The
+<code>
+@context
+</code>
+keyword
+is
+described
+in
+detail
+in
+the
+section
+titled
+<a href="#the-context" class="sec-ref">
+<span class="secno">
+<del class="diff-old">3.5
+</del>
+<ins class="diff-chg">5.1
+</ins>
+</span>
+<span class="sec-title">
+The
+Context
+</span>
+</a>.
+</dd>
+<dt>
+<code>
+<del class="diff-old">@graph
+Used
+to
+explicitly
+label
+a
+linked
+data
+graph
+.
+This
+keyword
+is
+described
+in
+4.11
+Named
+Graphs
+.
+</del>
+@id
+</code>
+</dt>
+<dd>
+Used
+to
+uniquely
+identify
+<em>
+things
+</em>
+that
+are
+being
+described
+in
+the
+document.
+This
+keyword
+is
+described
+in
+<a href="#node-identifiers" class="sec-ref">
+<span class="secno">
+<del class="diff-old">3.8
+</del>
+<ins class="diff-chg">5.4
+</ins>
+</span>
+<span class="sec-title">
+Node
+Identifiers
+</span>
+</a>.
+</dd>
+<dt>
+<code>
+@value
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+the
+data
+that
+is
+associated
+with
+a
+particular
+<a class="tref internalDFN" title="property" href="#dfn-property">
+property
+</a>
+in
+the
+graph.
+This
+keyword
+is
+described
+in
+<a href="#string-internationalization" class="sec-ref">
+<span class="secno">
+<del class="diff-old">3.10
+</del>
+<ins class="diff-chg">5.6
+</ins>
+</span>
+<span class="sec-title">
+String
+Internationalization
+</span>
+</a>
+and
+<a href="#typed-values" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.2
+</del>
+<ins class="diff-chg">6.2
+</ins>
+</span>
+<span class="sec-title">
+Typed
+Values
+</span>
+</a>.
+</dd>
+<dt>
+<code>
+@language
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+the
+native
+language
+for
+a
+particular
+value
+or
+the
+default
+language
+of
+a
+JSON-LD
+document.
+This
+keyword
+is
+described
+in
+the
+section
+titled
+<a href="#string-internationalization" class="sec-ref">
+<span class="secno">
+<del class="diff-old">3.10
+</del>
+<ins class="diff-chg">5.6
+</ins>
+</span>
+<span class="sec-title">
+String
+Internationalization
+</span>
+</a>.
+</dd>
+<dt>
+<code>
+@type
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+data
+type
+of
+a
+<a class="tref internalDFN" title="node" href="#dfn-node">
+node
+</a>
+or
+<a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">
+typed
+value
+</a>.
+This
+keyword
+is
+described
+in
+the
+section
+titled
+<a href="#typed-values" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.2
+</del>
+<ins class="diff-chg">6.2
+</ins>
+</span>
+<span class="sec-title">
+Typed
+Values
+</span>
+</a>.
+</dd>
+<dt>
+<code>
+@container
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+container
+of
+a
+particular
+value.
+This
+keyword
+is
+described
+in
+the
+section
+titled
+<a href="#sets-and-lists" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.9
+</del>
+<ins class="diff-chg">6.9
+</ins>
+</span>
+<span class="sec-title">
+Sets
+and
+Lists
+</span>
+</a>.
+</dd>
+<dt>
+<code>
+@list
+</code>
+</dt>
+<dd>
+Used
+to
+express
+an
+ordered
+set
+of
+data.
+This
+keyword
+is
+described
+in
+the
+section
+titled
+<a href="#sets-and-lists" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.9
+</del>
+<ins class="diff-chg">6.9
+</ins>
+</span>
+<span class="sec-title">
+Sets
+and
+Lists
+</span>
+</a>.
+</dd>
+<dt>
+<code>
+@set
+</code>
+</dt>
+<dd>
+Used
+to
+express
+an
+unordered
+set
+of
+<del class="diff-old">data.
+</del>
+<ins class="diff-chg">data
+and
+to
+ensure
+that
+values
+are
+always
+represented
+as
+arrays.
+</ins>
+This
+keyword
+is
+described
+in
+the
+section
+titled
+<a href="#sets-and-lists" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.9
+</del>
+<ins class="diff-chg">6.9
+</ins>
+</span>
+<span class="sec-title">
+Sets
+and
+Lists
+</span>
+</a>.
+</dd>
+<dt>
+<code>
+<del class="diff-old">@vocab
+</del>
+<ins class="diff-chg">@annotation
+</ins>
+</code>
+</dt>
+<dd>
+Used
+to
+<del class="diff-old">set
+</del>
+<ins class="diff-chg">specify
+that
+a
+container
+is
+used
+to
+index
+information
+and
+that
+processing
+should
+continue
+deeper
+into
+a
+JSON
+data
+structure.
+This
+keyword
+is
+described
+in
+</ins>
+the
+<del class="diff-old">base
+</del>
+<ins class="diff-chg">section
+titled
+</ins><a href="#data-annotations" class="sec-ref"><span class="secno"><ins class="diff-chg">
+6.14
+</ins></span><span class="sec-title"><ins class="diff-chg">
+Data
+Annotations
+</ins></span></a>.</dd><dt><code><ins class="diff-chg">
+@vocab
+</ins></code></dt><dd><ins class="diff-chg">
+Used
+to
+expand
+properties
+and
+values
+in
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+with
+a
+common
+prefix
+</ins>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">for
+all
+property
+IRIs
+affected
+by
+the
+active
+context
+</del>
+</a>.
+This
+keyword
+is
+described
+in
+section
+<a href="#iris" class="sec-ref">
+<span class="secno">
+<del class="diff-old">3.7
+</del>
+<ins class="diff-chg">5.3
+</ins>
+</span>
+<span class="sec-title">
+IRIs
+</span>
+</a>.
+</dd>
+<dt>
+<code>
+<ins class="diff-new">@graph
+</ins></code></dt><dd><ins class="diff-new">
+Used
+to
+explicitly
+label
+a
+</ins><a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph"><ins class="diff-new">
+JSON-LD
+graph
+</ins></a>.<ins class="diff-new">
+This
+keyword
+is
+described
+in
+</ins><a href="#named-graphs" class="sec-ref"><span class="secno"><ins class="diff-new">
+6.11
+</ins></span><span class="sec-title"><ins class="diff-new">
+Named
+Graphs
+</ins></span></a>.</dd><dt>
+<code>:
+</code>
+</dt>
+<dd>
+The
+separator
+for
+JSON
+keys
+and
+values
+that
+use
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+IRIs
+</a>.
+</dd>
+</dl>
+<p>
+For
+the
+avoidance
+of
+doubt,
+all
+keys,
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keywords
+</a>,
+and
+values
+in
+JSON-LD
+are
+case-sensitive.
+</p>
+</section>
+</section>
+<section class="normative" id="conformance">
+<h2>
+<span class="secno">
+<ins class="diff-new">4.
+</ins></span><ins class="diff-new">
+Conformance
+</ins></h2><p><ins class="diff-new">
+The
+JSON-LD
+Syntax
+specification
+describes
+the
+conformance
+criteria
+for
+JSON-LD
+documents
+(relevant
+to
+authors
+and
+authoring
+tool
+implementors).
+</ins></p><p><ins class="diff-new">
+A
+</ins><a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document"><ins class="diff-new">
+JSON-LD
+document
+</ins></a><ins class="diff-new">
+complies
+with
+this
+specification
+if
+it
+follows
+the
+normative
+statements
+for
+documents
+defined
+in
+sections
+</ins><a href="#referencing-contexts-from-json-documents" class="sec-ref"><span class="secno"><ins class="diff-new">
+6.4
+</ins></span><span class="sec-title"><ins class="diff-new">
+Referencing
+Contexts
+from
+JSON
+Documents
+</ins></span></a><ins class="diff-new">
+and
+</ins><a href="#json-ld-grammar" class="sec-ref"><span class="secno"><ins class="diff-new">
+B.
+</ins></span><span class="sec-title"><ins class="diff-new">
+JSON-LD
+Grammar
+</ins></span></a>.<ins class="diff-new">
+For
+convenience,
+normative
+statements
+for
+documents
+are
+often
+phrased
+as
+statements
+on
+the
+properties
+of
+the
+document.
+</ins></p><p><ins class="diff-new">
+The
+key
+words
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em>,<em class="rfc2119" title="must not"><ins class="diff-new">
+must
+not
+</ins></em>,<em class="rfc2119" title="required"><ins class="diff-new">
+required
+</ins></em>,<em class="rfc2119" title="shall"><ins class="diff-new">
+shall
+</ins></em>,<em class="rfc2119" title="shall not"><ins class="diff-new">
+shall
+not
+</ins></em>,<em class="rfc2119" title="should"><ins class="diff-new">
+should
+</ins></em>,<em class="rfc2119" title="should not"><ins class="diff-new">
+should
+not
+</ins></em>,<em class="rfc2119" title="recommended"><ins class="diff-new">
+recommended
+</ins></em>,<em class="rfc2119" title="not recommended"><ins class="diff-new">
+not
+recommended
+</ins></em>,<em class="rfc2119" title="may"><ins class="diff-new">
+may
+</ins></em>,<ins class="diff-new">
+and
+</ins><em class="rfc2119" title="optional"><ins class="diff-new">
+optional
+</ins></em><ins class="diff-new">
+in
+this
+Recommendation
+have
+the
+meaning
+defined
+in
+[
+</ins><cite><a class="bibref" href="#bib-RFC2119"><ins class="diff-new">
+RFC2119
+</ins></a></cite><ins class="diff-new">
+].
+</ins></p></section><section class="normative" id="basic-concepts"><h2><span class="secno"><ins class="diff-new">
+5.
+</ins></span><ins class="diff-new">
+Basic
+Concepts
+</ins></h2>
+<section id="the-context">
+<h3>
+<span class="secno">
+<del class="diff-old">3.5
+</del>
+<ins class="diff-chg">5.1
+</ins>
+</span>
+The
+Context
+</h3>
+<p>
+In
+JSON-LD,
+a
+<dfn title="context" id="dfn-context">
+context
+</dfn>
+is
+used
+to
+map
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+s,
+</del>
+<ins class="diff-chg">terms
+</ins></a>,
+i.e.,
+properties
+with
+associated
+values
+in
+an
+JSON
+document,
+to
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<del class="diff-old">IRI
+s.
+A
+term
+is
+a
+short
+word
+that
+expands
+to
+an
+IRI
+.
+Term
+s
+may
+be
+defined
+as
+any
+valid
+JSON
+string
+other
+than
+a
+JSON-LD
+keyword
+</del>
+<ins class="diff-chg">IRIs
+</ins>
+</a>.
+<del class="diff-old">To
+avoid
+forward-compatibility
+issues,
+term
+s
+starting
+with
+an
+@
+character
+should
+not
+be
+used
+as
+they
+might
+be
+used
+as
+keywords
+in
+future
+versions
+of
+JSON-LD.
+Furthermore,
+the
+use
+of
+empty
+terms
+(
+""
+)
+is
+discouraged
+as
+not
+all
+programming
+languages
+are
+able
+to
+handle
+empty
+property
+names.
+</del>
+</p>
+<p>
+The
+Web
+uses
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+IRIs
+</a>
+for
+unambiguous
+identification.
+The
+idea
+is
+that
+these
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">terms
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+mean
+something
+that
+may
+be
+of
+use
+to
+other
+developers
+and
+that
+it
+is
+useful
+to
+give
+them
+an
+unambiguous
+identifier.
+That
+is,
+it
+is
+useful
+for
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">terms
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+to
+expand
+to
+IRIs
+so
+that
+developers
+don't
+accidentally
+step
+on
+each
+other's
+<dfn title="vocabulary" id="dfn-vocabulary">
+vocabulary
+</dfn>
+terms
+and
+other
+resources.
+Furthermore,
+developers,
+and
+machines,
+are
+able
+to
+use
+this
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+(by
+plugging
+it
+directly
+into
+a
+web
+browser,
+for
+instance)
+to
+go
+to
+the
+term
+and
+get
+a
+definition
+of
+what
+the
+term
+means.
+This
+mechanism
+is
+analogous
+to
+the
+way
+we
+can
+use
+<a href="http://wordnet.princeton.edu/">
+WordNet
+</a>
+today
+to
+see
+the
+definition
+of
+words
+in
+the
+English
+language.
+Developers
+and
+machines
+need
+the
+same
+sort
+of
+definition
+of
+terms.
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+IRIs
+</a>
+provide
+a
+way
+to
+ensure
+that
+these
+terms
+are
+unambiguous.
+For
+example,
+the
+term
+<code>
+name
+</code>
+may
+map
+directly
+to
+the
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>.
+This
+allows
+JSON-LD
+documents
+to
+be
+constructed
+using
+the
+common
+JSON
+practice
+of
+simple
+key-value
+pairs
+while
+ensuring
+that
+the
+data
+is
+useful
+outside
+of
+the
+page,
+API
+or
+database
+in
+which
+it
+resides.
+<del class="diff-old">The
+value
+of
+a
+term
+mapping
+must
+be
+either;
+1)
+a
+simple
+string
+</del>
+</p>
+<p>
+<ins class="diff-chg">Note
+that,
+to
+avoid
+forward-compatibility
+issues,
+terms
+starting
+</ins>
+with
+<ins class="diff-new">an
+</ins><code><ins class="diff-new">
+@
+</ins></code><ins class="diff-new">
+character
+are
+to
+be
+avoided
+as
+they
+might
+be
+used
+as
+keywords
+in
+future
+versions
+of
+JSON-LD.
+Furthermore,
+</ins>
+the
+<del class="diff-old">lexical
+form
+</del>
+<ins class="diff-chg">use
+</ins>
+of
+<del class="diff-old">an
+absolute
+IRI
+or
+2)
+compact
+IRI
+,
+or
+3)
+an
+JSON
+object
+</del>
+<ins class="diff-chg">empty
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+terms
+</ins>
+</a>
+<del class="diff-old">containing
+an
+@id
+,
+@type
+,
+@language
+,
+or
+</del>
+<ins class="diff-chg">(
+</ins>
+<code>
+<del class="diff-old">@container
+</del>
+<ins class="diff-chg">""
+</ins>
+</code>
+<del class="diff-old">keyword
+(all
+other
+keywords
+</del>
+<ins class="diff-chg">)
+is
+discouraged
+as
+not
+all
+programming
+languages
+</ins>
+are
+<del class="diff-old">ignored
+by
+a
+JSON-LD
+processor).
+</del>
+<ins class="diff-chg">able
+to
+handle
+empty
+property
+names.
+</ins>
+</p>
+<p>
+<del class="diff-old">These
+Linked
+Data
+</del>
+<ins class="diff-chg">In
+a
+JSON-LD
+document,
+the
+mapping
+between
+</ins>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">terms
+</ins>
+</a>
+<del class="diff-old">s
+are
+</del>
+<ins class="diff-chg">and
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-chg">
+IRIs
+</ins></a><ins class="diff-chg">
+is
+</ins>
+typically
+collected
+in
+a
+<a class="tref internalDFN" title="context_definition" href="#dfn-context_definition">
+context
+<del class="diff-old">document
+</del>
+<ins class="diff-chg">definition
+</ins></a>
+that
+would
+look
+something
+like
+this:
+</p>
+<div class="example"><div class="example-title"><span>Example 1</span>: Context definition</div><pre class="example">{
+ "@context":
+ {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "depiction":
+ {
+ "@id": "http://xmlns.com/foaf/0.1/depiction",
+ "@type": "@id"
+ },
+ "homepage":
+ {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ },
+ }
+}
+</pre>
+</div>
+<p>
+Let's
+assume
+that
+a
+developer
+starts
+with
+the
+following
+JSON
+document:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 2</span>: Sample JSON document</div><pre class="example">{
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ "depiction": "http://twitter.com/account/profile_image/manusporny"
+}
+</pre>
+</div>
+<p>
+The
+developer
+can
+add
+a
+single
+line
+to
+the
+JSON
+document
+above
+to
+reference
+the
+context
+and
+transform
+it
+into
+a
+JSON-LD
+document:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 3</span>: Referencing a JSON-LD context</div><pre class="example">{
+ <span class="diff">"@context": "http://json-ld.org/contexts/person.jsonld",</span>
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ "depiction": "http://twitter.com/account/profile_image/manusporny"
+}
+</pre>
+</div>
+<p>
+The
+additions
+above
+transform
+the
+previous
+JSON
+document
+into
+a
+JSON
+document
+with
+added
+semantics
+because
+the
+<code>
+@context
+</code>
+specifies
+how
+the
+<strong>
+name
+</strong>,
+<strong>
+homepage
+</strong>,
+and
+<strong>
+depiction
+</strong>
+terms
+map
+to
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+IRIs
+</a>.
+Mapping
+those
+keys
+to
+IRIs
+gives
+the
+data
+global
+context.
+If
+two
+developers
+use
+the
+same
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+to
+describe
+a
+property,
+they
+are
+more
+than
+likely
+expressing
+the
+same
+concept.
+This
+allows
+both
+developers
+to
+re-use
+each
+others'
+data
+without
+having
+to
+agree
+to
+how
+their
+data
+will
+interoperate
+on
+a
+site-by-site
+basis.
+Contexts
+may
+also
+contain
+<del class="diff-old">type
+</del>
+<ins class="diff-chg">type,
+language
+or
+additional
+</ins>
+information
+for
+certain
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+s
+as
+well
+as
+other
+processing
+instructions
+for
+the
+JSON-LD
+processor.
+</del>
+<ins class="diff-chg">terms
+</ins></a>.
+</p>
+<del class="diff-old">Note
+</del>
+<p>
+External
+JSON-LD
+context
+documents
+may
+contain
+extra
+information
+located
+outside
+of
+the
+<code>
+@context
+</code>
+key,
+such
+as
+documentation
+about
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+terms
+</a>
+declared
+in
+the
+document.
+<del class="diff-old">When
+importing
+a
+@context
+value
+from
+an
+external
+JSON-LD
+context
+document,
+any
+extra
+information
+</del>
+<ins class="diff-chg">Information
+</ins>
+contained
+outside
+of
+the
+<code>
+@context
+</code>
+value
+<del class="diff-old">must
+be
+discarded.
+</del>
+<ins class="diff-chg">is
+simply
+discarded
+when
+the
+document
+is
+used
+as
+an
+external
+JSON-LD
+context
+document
+(see
+</ins><a href="#referencing-contexts-from-json-documents" class="sec-ref">
+<span class="secno">
+<ins class="diff-chg">6.4
+</ins></span><span class="sec-title"><ins class="diff-chg">
+Referencing
+Contexts
+from
+JSON
+Documents
+</ins></span></a><ins class="diff-chg">
+).
+</ins></p>
+<p>
+Contexts
+may
+<ins class="diff-chg">also
+</ins>
+be
+specified
+in-line.
+This
+ensures
+that
+<a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">
+JSON-LD
+documents
+</a>
+can
+be
+<del class="diff-old">processed
+when
+</del>
+<ins class="diff-chg">understood
+even
+in
+the
+absence
+of
+</ins>
+a
+<del class="diff-old">JSON-LD
+processor
+does
+not
+have
+access
+</del>
+<ins class="diff-chg">connection
+</ins>
+to
+the
+Web.
+</p>
+<div class="example"><div class="example-title"><span>Example 4</span>: In-line context definition</div><pre class="example">{
+ <span class="diff">"@context":
+ {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "depiction":
+ {
+ "@id": "http://xmlns.com/foaf/0.1/depiction",
+ "@type": "@id"
+ },
+ "homepage":
+ {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ },
+ },</span>
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ "depiction": "http://twitter.com/account/profile_image/manusporny"
+}
+</pre>
+</div>
+<p>
+Contexts
+may
+be
+used
+at
+any
+time
+a
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definition
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>
+is
+defined.
+<del class="diff-old">A
+node
+definition
+</del>
+<ins class="diff-chg">In
+particular,
+a
+</ins><a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document"><ins class="diff-chg">
+JSON-LD
+document
+</ins>
+</a>
+may
+<del class="diff-old">specify
+multiple
+contexts,
+using
+an
+array
+,
+which
+is
+processed
+</del>
+<ins class="diff-chg">define
+more
+than
+one
+context,
+as
+</ins>
+in
+<del class="diff-old">order.
+</del>
+<ins class="diff-chg">the
+following
+example:
+</ins></p><div class="example"><div class="example-title"><span>Example 5</span>: Multiple separate contexts</div><pre class="example">[<ins class="diff-chg">
+ {
+</ins> <span class="diff">"@context": "http://example.org/contexts/person.jsonld",</span><ins class="diff-chg">
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ "depiction": "http://twitter.com/account/profile_image/manusporny"
+ },
+ {
+</ins> <span class="diff">"@context": "http://example.org/contexts/place.jsonld",</span><ins class="diff-chg">
+ "name": "The Empire State Building",
+ "description": "The Empire State Building is a 102-story landmark in New York City.",
+ "geo": {
+ "latitude": "40.75",
+ "longitude": "73.98"
+ }
+ }
+]
+</ins></pre></div><p>
+This
+is
+useful
+when
+an
+author
+would
+like
+to
+use
+an
+existing
+context
+and
+add
+application-specific
+terms
+to
+the
+existing
+context.
+Duplicate
+context
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">terms
+</ins>
+</a>
+<del class="diff-old">s
+must
+be
+</del>
+<ins class="diff-chg">are
+</ins>
+overridden
+using
+a
+last-defined-overrides
+mechanism.
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 6</span>: Scoped contexts within node objects</div><pre class="example">{
+ <span class="diff">"@context":
+ {
+ "name": "http://example.com/person#name",
+ "details": "http://example.com/person#details"
+ },</span>
+ "<span class="diff">name</span>": "Markus Lanthaler",
+ ...
+ "details":
+ {
+ <span class="diff">"@context": {
+ "name": "http://example.com/organization#name"
+ },</span>
+ "<span class="diff">name</span>": "Graz University of Technology"
+ }
+}
+</pre>
+</div>
+<p>
+In
+the
+example
+above,
+the
+<code>
+name
+</code>
+prefix
+is
+overridden
+in
+the
+more
+deeply
+nested
+<code>
+details
+</code>
+structure.
+Note
+that
+this
+is
+rarely
+a
+good
+authoring
+practice
+and
+is
+typically
+used
+when
+there
+exist
+legacy
+applications
+that
+depend
+on
+the
+specific
+structure
+of
+the
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>.
+<del class="diff-old">Note
+</del>
+If
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+is
+re-defined
+within
+a
+context,
+all
+previous
+rules
+associated
+with
+the
+previous
+definition
+are
+removed.
+<del class="diff-old">A
+</del>
+<ins class="diff-chg">If
+that
+</ins>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+<del class="diff-old">defined
+in
+a
+previous
+context
+must
+be
+removed,
+if
+it
+</del>
+is
+re-defined
+to
+<code>
+null
+<del class="diff-old">.
+</del>
+</code>,
+<ins class="diff-chg">the
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+is
+effectively
+removed
+from
+the
+list
+of
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+terms
+</ins></a><ins class="diff-chg">
+defined
+in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>.
+</p>
+<p>
+<ins class="diff-new">A
+</ins><a class="tref internalDFN" title="node_object" href="#dfn-node_object"><ins class="diff-new">
+node
+object
+</ins></a><ins class="diff-new">
+may
+specify
+multiple
+contexts,
+using
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-new">
+array
+</ins></a>,<ins class="diff-new">
+processed
+in
+order.
+</ins>
+The
+set
+of
+contexts
+defined
+within
+a
+specific
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definition
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>
+are
+referred
+to
+as
+<dfn title="local_context" id="dfn-local_context">
+local
+<del class="diff-old">context
+s.
+</del>
+<ins class="diff-chg">contexts
+</ins></dfn>.
+Setting
+the
+context
+to
+<code>
+null
+</code>
+effectively
+resets
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+to
+an
+empty
+context.
+The
+<dfn title="active_context" id="dfn-active_context">
+active
+context
+</dfn>
+refers
+to
+the
+accumulation
+of
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">contexts
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+that
+are
+in
+scope
+at
+a
+specific
+point
+within
+the
+document.
+The
+following
+example
+specifies
+an
+external
+context
+and
+then
+layers
+a
+local
+context
+on
+top
+of
+the
+external
+context:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 7</span>: Combining external and local contexts</div><pre class="example">{
+ <span class="diff">"@context": [
+ "http://json-ld.org/contexts/person.jsonld",
+ {
+ "pic": "http://xmlns.com/foaf/0.1/depiction"
+ }
+ ],</span>
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ <span class="diff">"pic": "http://twitter.com/account/profile_image/manusporny"</span>
+}
+</pre>
+</div>
+<div class="note">
+<div class="note-title">
+<span>
+Note
+</span>
+</div>
+<p class="">
+To
+ensure
+the
+best
+possible
+performance,
+it
+is
+a
+best
+practice
+to
+put
+the
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+definition
+at
+the
+top
+of
+the
+JSON-LD
+document.
+If
+it
+isn't
+listed
+first,
+processors
+have
+to
+save
+each
+key-value
+pair
+until
+the
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+is
+processed.
+This
+creates
+a
+memory
+and
+complexity
+burden
+for
+certain
+types
+of
+low-memory
+footprint
+JSON-LD
+processors.
+</p>
+</div>
+<del class="diff-old">Note
+The
+null
+value
+is
+processed
+in
+a
+special
+way
+in
+JSON-LD.
+Unless
+otherwise
+specified,
+a
+JSON-LD
+processor
+must
+act
+as
+if
+a
+key-value
+pair
+in
+the
+body
+of
+a
+JSON-LD
+document
+was
+never
+declared
+when
+the
+value
+equals
+null
+.
+If
+@value
+,
+@list
+,
+or
+@set
+is
+set
+to
+null
+in
+expanded
+form,
+then
+the
+entire
+JSON
+object
+is
+ignored.
+If
+@context
+is
+set
+to
+null
+,
+the
+active
+context
+is
+reset
+and
+when
+used
+within
+a
+context
+,
+it
+removes
+any
+definition
+associated
+with
+the
+key,
+unless
+otherwise
+specified.
+</del>
+</section>
+<section id="from-json-to-json-ld">
+<h3>
+<span class="secno">
+<del class="diff-old">3.6
+</del>
+<ins class="diff-chg">5.2
+</ins>
+</span>
+From
+JSON
+to
+JSON-LD
+</h3>
+<p>
+If
+a
+set
+of
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">terms
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+such
+as,
+<strong>
+name
+</strong>,
+<strong>
+homepage
+</strong>,
+and
+<strong>
+depiction
+</strong>,
+are
+defined
+in
+a
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>,
+and
+that
+context
+is
+used
+to
+resolve
+the
+names
+in
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+objects
+</a>,
+machines
+are
+able
+to
+automatically
+expand
+the
+terms
+to
+something
+<del class="diff-old">meaningful
+and
+unambiguous,
+</del>
+<ins class="diff-chg">unambiguous
+</ins>
+like
+this:
+</p>
+<del class="diff-old">{
+</del>
+ <div class="example"><div class="example-title"><span>Example 8</span>: Expanded terms</div><pre class="example">{
+ "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+ "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
+ "<span class="diff">http://xmlns.com/foaf/0.1/depiction</span>": "http://twitter.com/account/profile_image/manusporny"
+}
+</pre>
+</div>
+<p>
+Doing
+this
+allows
+JSON
+to
+be
+unambiguously
+machine-readable
+without
+requiring
+developers
+to
+drastically
+change
+their
+workflow.
+<ins class="diff-new">A
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+used
+to
+define
+property
+values
+of
+a
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-new">
+node
+</ins></a><ins class="diff-new">
+is
+called
+a
+</ins><a class="tref internalDFN" title="node_object" href="#dfn-node_object"><ins class="diff-new">
+node
+object
+</ins></a>.
+</p>
+<div class="note">
+<div class="note-title">
+<span>
+Note
+</span>
+</div>
+<p class="">
+The
+example
+above
+does
+not
+use
+the
+<code>
+@id
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+to
+identify
+the
+node
+being
+described
+above.
+This
+type
+of
+node
+is
+called
+<del class="diff-old">an
+unlabeled
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-chg">
+blank
+</ins>
+node
+</a>.
+It
+is
+advised
+that
+all
+<del class="diff-old">nodes
+described
+</del>
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+<ins class="diff-chg">node
+objects
+</ins></a>
+in
+JSON-LD
+are
+<del class="diff-old">given
+unique
+identifiers
+</del>
+<ins class="diff-chg">identified
+by
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-chg">
+IRIs
+</ins></a>
+via
+the
+<code>
+@id
+</code>
+keyword
+unless
+the
+data
+is
+not
+intended
+to
+be
+linked
+to
+from
+other
+data
+sets.
+</p>
+</div>
+<del class="diff-old">A
+JSON
+object
+used
+to
+define
+property
+values
+is
+called
+a
+node
+definition
+.
+Node
+definitions
+do
+not
+require
+an
+@id
+.
+Node
+definitions
+that
+do
+not
+contain
+an
+@id
+are
+known
+as
+an
+unlabeled
+nodes
+.
+</del>
+</section>
+<section id="iris">
+<h3>
+<span class="secno">
+<del class="diff-old">3.7
+</del>
+<ins class="diff-chg">5.3
+</ins>
+</span>
+IRIs
+</h3>
+<p>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+IRIs
+</a>
+<ins class="diff-new">(Internationalized
+Resource
+Identifiers)
+</ins>
+are
+fundamental
+to
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>
+as
+that
+is
+how
+most
+<a class="tref internalDFN" title="node" href="#dfn-node">
+nodes
+</a>
+<del class="diff-old">s
+</del>
+and
+<del class="diff-old">all
+</del>
+<a class="tref internalDFN" title="property" href="#dfn-property">
+properties
+</a>
+are
+identified.
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<del class="diff-old">IRI
+</del>
+<ins class="diff-chg">IRIs
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+can
+be
+expressed
+in
+a
+variety
+of
+different
+ways
+in
+<del class="diff-old">JSON-LD.
+An
+IRI
+(an
+Internationalized
+Resource
+Identifier)
+is
+described
+in
+[
+RFC3987
+])
+and
+the
+use
+with
+JSON-LD
+conforms
+to
+the
+definition
+of
+IRI
+in
+[
+RDF-CONCEPTS
+].
+</del>
+<ins class="diff-chg">JSON-LD:
+</ins>
+</p>
+<ol>
+<li>
+Except
+within
+a
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+definition,
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">terms
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+in
+the
+key
+position
+in
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+that
+have
+a
+mapping
+<del class="diff-old">or
+a
+vocabulary
+base
+</del>
+<ins class="diff-chg">in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+expand
+to
+an
+</ins>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+<ins class="diff-chg">If
+there's
+a
+</ins><code><ins class="diff-chg">
+@vocab
+</ins></code><ins class="diff-chg">
+mapping
+</ins>
+in
+the
+active
+context
+<ins class="diff-new">also
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+terms
+</ins>
+</a>
+<ins class="diff-new">without
+an
+explicit
+mapping
+in
+the
+active
+context
+</ins>
+are
+expanded
+to
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">by
+JSON-LD
+processors.
+</del>
+</a>.
+</li>
+<li>
+An
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+is
+generated
+for
+the
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+value
+specified
+using
+<code>
+@id
+</code>
+or
+<code>
+@type
+</code>.
+</li>
+<li>
+An
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+is
+generated
+for
+the
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+value
+of
+any
+key
+for
+which
+there
+are
+<a class="tref internalDFN" title="coercion" href="#dfn-coercion">
+coercion
+</a>
+rules
+in
+effect
+that
+identify
+the
+value
+as
+an
+<code>
+@id
+</code>.
+</li>
+</ol>
+<p>
+IRIs
+may
+be
+represented
+as
+an
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">,
+</del>
+</a>
+<ins class="diff-chg">or
+</ins>
+a
+<a class="tref internalDFN" title="relative_iri" href="#dfn-relative_iri">
+relative
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">,
+a
+term
+,
+a
+compact
+IRI
+,
+or
+as
+a
+value
+relative
+to
+@vocab
+.
+</del>
+</a>.
+</p>
+<p>
+An
+<dfn title="absolute_iri" id="dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</dfn>
+is
+defined
+in
+[
+<cite>
+<a class="bibref" href="#bib-RFC3987">
+RFC3987
+</a>
+</cite>
+]
+containing
+a
+<em>
+scheme
+</em>
+along
+with
+<em>
+path
+</em>
+and
+optional
+<em>
+query
+</em>
+and
+<em>
+fragment
+</em>
+segments.
+A
+<dfn title="relative_iri" id="dfn-relative_iri">
+relative
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</dfn>
+is
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+that
+is
+relative
+to
+some
+other
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+In
+JSON-LD
+all
+<a class="tref internalDFN" title="relative_iri" href="#dfn-relative_iri">
+relative
+<del class="diff-old">IRI
+</del>
+<ins class="diff-chg">IRIs
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+are
+resolved
+relative
+to
+the
+<dfn title="base_iri" id="dfn-base_iri">
+base
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</dfn>
+associated
+with
+the
+document
+(typically,
+the
+directory
+that
+contains
+the
+document
+or
+the
+document
+itself).
+</p>
+<p>
+IRIs
+can
+be
+expressed
+directly
+in
+the
+key
+position
+like
+so:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 9</span>: IRI as a key</div><pre class="example">{
+...
+ "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+...
+}
+</pre>
+</div>
+<p>
+In
+the
+example
+above,
+the
+key
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>
+is
+interpreted
+as
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+because
+it
+contains
+a
+colon
+(
+<code>:
+</code>
+)
+and
+the
+'http'
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>
+does
+not
+exist
+in
+the
+context.
+</p>
+<p>
+Term
+expansion
+occurs
+for
+IRIs
+if
+the
+value
+matches
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+defined
+within
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 10</span>: Term expansion from context definition</div><pre class="example">{
+ "<span class="diff">@context</span>":
+ {
+ "<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"
+...
+ },
+ "<span class="diff">name</span>": "Manu Sporny",
+ "status": "trollin'",
+...
+}
+</pre>
+</div>
+<p>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">Term
+</del>
+<ins class="diff-chg">Terms
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+are
+case
+<del class="diff-old">sensitive,
+and
+must
+be
+matched
+using
+a
+case-sensitive
+comparison.
+</del>
+<ins class="diff-chg">sensitive.
+</ins>
+</p>
+<p>
+JSON
+keys
+that
+do
+not
+expand
+to
+an
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+are
+ignored,
+or
+removed
+in
+some
+cases,
+by
+the
+[
+<cite>
+<a class="bibref" href="#bib-JSON-LD-API">
+JSON-LD-API
+</a>
+</cite>
+].
+However,
+JSON
+keys
+that
+do
+not
+include
+a
+mapping
+in
+the
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+are
+still
+considered
+valid
+expressions
+in
+JSON-LD
+documents
+-
+the
+keys
+just
+don't
+<del class="diff-old">have
+any
+machine-readable,
+semantic
+meaning.
+</del>
+<ins class="diff-chg">expand
+to
+unambiguous
+identifiers.
+</ins>
+</p>
+<p>
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+<del class="diff-old">Prefix
+</del>
+<ins class="diff-chg">Prefixes
+</ins>
+</a>
+<del class="diff-old">es
+</del>
+are
+expanded
+when
+the
+form
+of
+the
+value
+is
+a
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+represented
+as
+a
+<code>
+prefix:suffix
+</code>
+combination,
+and
+the
+prefix
+matches
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+defined
+within
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 11</span>: Prefix expansion</div><pre class="example">{
+ "<span class="diff">@context</span>":
+ {
+ "<span class="diff">foaf</span>": "<span class="diff">http://xmlns.com/foaf/0.1/</span>"
+...
+ },
+ "<span class="diff">foaf:name</span>": "Manu Sporny",
+...
+}
+</pre>
+</div>
+<p>
+<code>
+foaf:name
+</code>
+above
+will
+automatically
+expand
+out
+to
+the
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>.
+See
+<a href="#compact-iris" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.1
+</del>
+<ins class="diff-chg">6.1
+</ins>
+</span>
+<span class="sec-title">
+Compact
+IRIs
+</span>
+</a>
+for
+more
+details.
+</p>
+<p>
+<del class="diff-old">If
+the
+@vocab
+is
+set,
+all
+keys
+that
+do
+not
+match
+a
+term
+or
+a
+prefix
+are
+</del>
+It
+is
+often
+common
+that
+all
+types
+and
+properties
+come
+from
+the
+same
+vocabulary.
+JSON-LD's
+<code>
+@vocab
+</code>
+keyword
+allows
+to
+set
+a
+<del class="diff-old">base
+IRI
+</del>
+<ins class="diff-chg">common
+prefix
+</ins>
+to
+be
+used
+for
+all
+properties
+and
+types
+that
+<del class="diff-old">that
+do
+not
+</del>
+<ins class="diff-chg">neither
+</ins>
+match
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+<del class="diff-old">,
+</del>
+</a>
+<ins class="diff-chg">nor
+</ins>
+a
+<del class="diff-old">prefix
+,
+</del>
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+<ins class="diff-chg">compact
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a>
+or
+an
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+(i.e.,
+do
+not
+contain
+a
+colon).
+<del class="diff-old">The
+@vocab
+mapping
+must
+have
+a
+value
+of
+a
+simple
+string
+with
+the
+lexical
+form
+of
+an
+absolute
+IRI
+.
+</del>
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 12</span>: Using a common vocabulary prefix</div><pre class="example">{
+ <span class="diff">"@context": {
+ "@vocab": "http://xmlns.com/foaf/1.0/"
+ },</span>
+ "@type": <span class="diff">"Person"</span>,
+ <span class="diff">"name"</span>: "Manu Sporny",
+}
+</pre>
+</div>
+<p>
+An
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+is
+generated
+when
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+is
+used
+in
+the
+value
+position
+that
+contains
+an
+<code>
+@id
+</code>
+keyword:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 13</span>: Expanded IRI definition</div><pre class="example">{
+...
+ "homepage": { "<span class="diff">@id</span>": "http://manu.sporny.org" }
+...
+}
+</pre>
+</div>
+<del class="diff-old">Note
+</del>
+<p>
+Specifying
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+with
+an
+<code>
+@id
+</code>
+key
+is
+used
+to
+identify
+that
+<a class="tref internalDFN" title="node" href="#dfn-node">
+node
+</a>
+using
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+When
+the
+object
+has
+only
+the
+<code>
+@id
+</code>,
+it
+is
+called
+a
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">reference
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>.
+This
+facility
+may
+also
+be
+used
+to
+link
+to
+another
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definition
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>
+using
+a
+mechanism
+called
+<a class="tref internalDFN" title="embedding" href="#dfn-embedding">
+embedding
+</a>,
+which
+is
+covered
+in
+the
+section
+titled
+<a href="#embedding" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.10
+</del>
+<ins class="diff-chg">6.10
+</ins>
+</span>
+<span class="sec-title">
+Embedding
+</span>
+</a>.
+</p>
+<p>
+If
+type
+<a class="tref internalDFN" title="coercion" href="#dfn-coercion">
+coercion
+</a>
+rules
+are
+specified
+in
+the
+<code>
+@context
+</code>
+for
+a
+particular
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+or
+property
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>,
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+is
+generated:
+</p>
+<div class="example"><div class="example-title"><span>Example 14</span>: Type coercion</div><pre class="example">{<span class="diff">
+ "@context":
+ {
+ ...
+ "homepage":
+ {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ ...
+ }</span>
+...
+ "homepage": "http://manu.sporny.org/",
+...
+}
+</pre>
+</div>
+<p>
+In
+the
+example
+above,
+even
+though
+the
+value
+<code>
+http://manu.sporny.org/
+</code>
+is
+expressed
+as
+a
+JSON
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>,
+the
+type
+<a class="tref internalDFN" title="coercion" href="#dfn-coercion">
+coercion
+</a>
+rules
+will
+transform
+the
+value
+into
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+when
+<del class="diff-old">processed
+by
+a
+</del>
+<ins class="diff-chg">generating
+the
+</ins><a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">
+JSON-LD
+<del class="diff-old">Processor.
+</del>
+<ins class="diff-chg">graph
+</ins></a>.
+</p>
+</section>
+<section id="node-identifiers">
+<h3>
+<span class="secno">
+<del class="diff-old">3.8
+</del>
+<ins class="diff-chg">5.4
+</ins>
+</span>
+Node
+Identifiers
+</h3>
+<p>
+To
+be
+able
+to
+externally
+reference
+nodes
+in
+a
+graph,
+it
+is
+important
+that
+each
+<a class="tref internalDFN" title="node" href="#dfn-node">
+node
+</a>
+has
+an
+unambiguous
+identifier.
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<del class="diff-old">IRI
+</del>
+<ins class="diff-chg">IRIs
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+are
+a
+fundamental
+concept
+of
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>,
+and
+nodes
+should
+have
+a
+de-referencable
+identifier
+used
+to
+name
+and
+locate
+them.
+For
+nodes
+to
+be
+truly
+linked,
+de-referencing
+the
+identifier
+should
+result
+in
+a
+representation
+of
+that
+node
+(for
+example,
+using
+a
+URL
+to
+retrieve
+a
+web
+page).
+Associating
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+with
+a
+node
+tells
+an
+application
+that
+the
+returned
+document
+contains
+a
+description
+of
+the
+node
+requested.
+</p>
+<p>
+JSON-LD
+documents
+may
+also
+contain
+descriptions
+of
+other
+nodes,
+so
+it
+is
+necessary
+to
+be
+able
+to
+uniquely
+identify
+each
+node
+which
+may
+be
+externally
+referenced.
+</p>
+<p>
+The
+node
+of
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+is
+identified
+using
+the
+<code>
+@id
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 15</span>: Identifying a node</div><pre class="example">{
+ "@context":
+ {
+ ...
+ "homepage":
+ {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ ...
+ },
+ "<span class="diff">@id</span>": "<span class="diff">http://example.org/people#joebob</span>",
+ "homepage": "http://manu.sporny.org/",
+...
+}
+</pre>
+</div>
+<p>
+The
+example
+above
+contains
+a
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<ins class="diff-new">object
+</ins></a>
+identified
+by
+the
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<code>
+http://example.org/people#joebob
+</code>.
+</p>
+<p>
+<del class="diff-old">A
+JSON
+object
+used
+to
+define
+property
+values
+is
+called
+a
+node
+definition
+.
+Node
+definitions
+do
+not
+require
+an
+@id
+.
+A
+node
+definition
+that
+does
+not
+contain
+an
+@id
+property
+defines
+properties
+of
+an
+unlabeled
+</del>
+<ins class="diff-chg">Once
+defined,
+the
+</ins><a class="tref internalDFN" title="node" href="#dfn-node">
+node
+<del class="diff-old">.
+Node
+definitions
+</del>
+</a>
+<del class="diff-old">may
+</del>
+<ins class="diff-chg">'s
+unique
+identifier
+can
+</ins>
+be
+<del class="diff-old">spread
+among
+different
+</del>
+<ins class="diff-chg">used
+to
+refer
+to
+it
+from
+other
+</ins>
+parts
+of
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">the
+</ins>
+document
+or
+<del class="diff-old">even
+between
+different
+documents.
+Note
+To
+ensure
+the
+best
+possible
+performance,
+when
+possible,
+it
+is
+a
+best
+practice
+to
+put
+JSON-LD
+keyword
+s,
+such
+as
+@id
+and
+@context
+before
+other
+key-value
+pairs
+in
+a
+JSON
+object
+.
+However,
+keys
+in
+</del>
+<ins class="diff-chg">from
+external
+documents,
+using
+</ins>
+a
+<del class="diff-old">JSON
+</del>
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+<ins class="diff-chg">node
+</ins>
+object
+</a>
+<del class="diff-old">are
+not
+ordered,
+so
+processors
+must
+not
+depend
+on
+key
+ordering.
+If
+keywords
+are
+not
+listed
+first,
+processors
+have
+to
+save
+each
+key-value
+pair
+until
+at
+least
+the
+@context
+and
+the
+</del>
+<ins class="diff-chg">that
+only
+contains
+an
+</ins>
+<code>
+@id
+</code>
+<del class="diff-old">are
+processed.
+Not
+specifying
+those
+keywords
+first
+creates
+a
+memory
+and
+complexity
+burden
+for
+low-memory
+footprint
+processors,
+forcing
+them
+to
+use
+more
+memory
+and
+computing
+cycles
+than
+necessary.
+</del>
+<ins class="diff-chg">key:
+</ins>
+</p>
+<div class="example"><div class="example-title"><span>Example 16</span>: Referencing a node using its unique identifier</div><pre class="example">{
+<ins class="diff-new"> "@context": ...,
+ "@graph": [
+ {
+ "@id": "http://example.org/library",
+ "@type": "ex:Library",
+</ins> <span class="diff">"ex:contains": {"@id": "http://example.org/library/the-republic"}</span><ins class="diff-new">
+ }, {
+ "@id": "http://example.org/library/the-republic",
+ "@type": "ex:Book",
+ "dc:creator": "Plato",
+ "dc:title": "The Republic",
+</ins> <span class="diff">"ex:contains": {"@id": "http://example.org/library/the-republic#introduction"}</span><ins class="diff-new">
+ }, {
+ "@id": "http://example.org/library/the-republic#introduction",
+ "@type": "ex:Chapter",
+ "dc:description": "An introductory chapter on The Republic.",
+ "dc:title": "The Introduction"
+ }
+ ]
+}
+}
+</ins></pre>
+</div>
+</section>
+<section id="specifying-the-type">
+<h3>
+<span class="secno">
+<del class="diff-old">3.9
+</del>
+<ins class="diff-chg">5.5
+</ins>
+</span>
+Specifying
+the
+Type
+</h3>
+<p>
+The
+type
+of
+a
+particular
+node
+can
+be
+specified
+using
+the
+<code>
+@type
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>.
+<del class="diff-old">To
+be
+considered
+</del>
+<ins class="diff-chg">In
+</ins>
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>,
+types
+<del class="diff-old">must
+be
+</del>
+<ins class="diff-chg">are
+</ins>
+uniquely
+identified
+<del class="diff-old">by
+</del>
+<ins class="diff-chg">with
+</ins>
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 17</span>: Specifying the type for a node</div><pre class="example">{
+...
+ "@id": "http://example.org/people#joebob",
+ "<span class="diff">@type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+...
+}
+</pre>
+</div>
+<p>
+A
+node
+can
+be
+assigned
+more
+than
+one
+type
+by
+using
+the
+following
+markup
+pattern:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 18</span>: Specifying multiple types for a node</div><pre class="example">{
+...
+ "@id": "http://example.org/places#BrewEats",
+ "<span class="diff">@type</span>": <span class="diff">["http://schema.org/Restaurant", "http://schema.org/Brewery"]</span>
+...
+}
+</pre>
+</div>
+<p>
+<ins class="diff-new">The
+value
+of
+a
+</ins><code><ins class="diff-new">
+@type
+</ins></code><ins class="diff-new">
+key
+may
+also
+be
+a
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a><ins class="diff-new">
+defined
+in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a>:</p><div class="example"><div class="example-title"><span>Example 19</span>: Using a term to specify the type</div><pre class="example">{<ins class="diff-new">
+ "@context": "http://json-ld.org/contexts/person.jsonld",
+ "@id": "http://manu.sporny.org/i/public",
+</ins> <span class="diff">"@type": "Person"</span>,<ins class="diff-new">
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ "depiction": "http://twitter.com/account/profile_image/manusporny"
+}
+</ins></pre></div>
+</section>
+<section id="string-internationalization">
+<h3>
+<span class="secno">
+<del class="diff-old">3.10
+</del>
+<ins class="diff-chg">5.6
+</ins>
+</span>
+String
+Internationalization
+</h3>
+<p>
+At
+times,
+it
+is
+important
+to
+annotate
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+with
+its
+language.
+In
+JSON-LD
+this
+is
+possible
+in
+a
+variety
+of
+ways.
+Firstly,
+it
+is
+possible
+to
+define
+a
+default
+language
+for
+a
+JSON-LD
+document
+by
+setting
+the
+<code>
+@language
+</code>
+key
+in
+the
+<code>
+@context
+</code>
+or
+in
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+definition:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 20</span>: Setting the default language of a JSON-LD document</div><pre class="example">{
+ <span class="diff">"@context":
+ {
+ ...
+ "@language": "ja"
+ },</span>
+ "name": <span class="diff">"花澄"</span>,
+ "occupation": <span class="diff">"科学者"</span>
+}
+</pre>
+</div>
+<p>
+The
+example
+above
+would
+associate
+the
+<code>
+ja
+</code>
+language
+code
+with
+the
+two
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<del class="diff-old">string
+</del>
+<ins class="diff-chg">strings
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+<em>
+花澄
+</em>
+and
+<em>
+科学者
+</em>.
+Languages
+<del class="diff-old">must
+be
+well-formed
+language
+tags
+according
+to
+</del>
+<ins class="diff-chg">codes
+are
+defined
+in
+</ins>
+[
+<cite>
+<a class="bibref" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+].
+</p>
+<p>
+It
+is
+possible
+to
+override
+the
+default
+language
+by
+using
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">an
+</ins><a class="tref internalDFN" title="expanded_value" href="#dfn-expanded_value">
+expanded
+<del class="diff-old">form
+of
+a
+value:
+</del>
+<ins class="diff-chg">value
+</ins></a>:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 21</span>: Overriding default language using an expanded value</div><pre class="example">{
+ "@context": {
+ ...
+ "@language": "ja"
+ },
+ "name": "花澄",
+ "occupation": <span class="diff">{
+ "@value": "Scientist",
+ "@language": "en"
+ }</span>
+}
+</pre>
+</div>
+<p>
+It
+is
+also
+possible
+to
+override
+the
+default
+language
+or
+specify
+a
+plain
+value
+by
+omitting
+the
+<code>
+@language
+</code>
+tag
+or
+setting
+it
+to
+<code>
+null
+</code>
+when
+expressing
+the
+<a class="tref internalDFN" title="expanded_value" href="#dfn-expanded_value">
+expanded
+<del class="diff-old">value:
+</del>
+<ins class="diff-chg">value
+</ins></a>:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 22</span>: Removing language information using an expanded value</div><pre class="example">{
+ "@context": {
+ ...
+ "@language": "ja"
+ },
+ "name": <span class="diff">{
+ "@value": "Frank"
+ },</span>
+ "occupation": <span class="diff"> {
+ "@value": "Ninja",
+ "@language": "en"
+ }</span>,
+ "speciality": "手裏剣"
+}
+</pre>
+</div>
+<del class="diff-old">Note
+</del>
+<p>
+Please
+note
+that
+language
+associations
+<del class="diff-old">must
+</del>
+<ins class="diff-chg">can
+</ins>
+only
+be
+applied
+to
+plain
+literal
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<del class="diff-old">string
+s.
+</del>
+<ins class="diff-chg">strings
+</ins></a>.
+That
+is,
+<a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">
+typed
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">values
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+or
+values
+that
+are
+subject
+to
+<a href="#type-coercion" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.6
+</del>
+<ins class="diff-chg">6.6
+</ins>
+</span>
+<span class="sec-title">
+Type
+Coercion
+</span>
+</a>
+<del class="diff-old">won't
+</del>
+<ins class="diff-chg">cannot
+</ins>
+be
+language
+tagged.
+</p>
+<p>
+To
+clear
+the
+default
+language
+for
+a
+subtree,
+<code>
+@language
+</code>
+can
+be
+set
+to
+<code>
+null
+</code>
+in
+a
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+as
+follows:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 23</span>: Clearing default language</div><pre class="example">{
+ "@context": {
+ ...
+ "@language": "ja"
+ },
+ "name": "花澄",
+ "details": {
+<span class="diff"> "@context": {
+ "@language": null
+ },</span>
+ "occupation": "Ninja"
+ }
+}
+</pre>
+</div>
+<div class="note">
+<div class="note-title">
+<span>
+Note
+</span>
+</div>
+<p class="">
+JSON-LD
+allows
+one
+to
+associate
+language
+information
+with
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+s.
+</del>
+<ins class="diff-chg">terms
+</ins></a>.
+See
+<a href="#expanded-term-definition" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.5
+</del>
+<ins class="diff-chg">6.5
+</ins>
+</span>
+<span class="sec-title">
+Expanded
+Term
+Definition
+</span>
+</a>
+for
+more
+details.
+</p>
+</div>
+</section>
+<section id="json-ld-syntax">
+<h3>
+<span class="secno">
+<del class="diff-old">3.11
+</del>
+<ins class="diff-chg">5.7
+</ins>
+</span>
+JSON-LD
+Syntax
+</h3>
+<p>
+A
+<a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">
+JSON-LD
+document
+</a>
+is
+first,
+and
+foremost,
+a
+JSON
+document
+(as
+defined
+in
+[
+<cite>
+<a class="bibref" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+<del class="diff-old">]),
+and
+any
+syntactically
+correct
+JSON
+document
+must
+be
+processed
+by
+a
+conforming
+JSON-LD
+processor.
+</del>
+<ins class="diff-chg">]).
+</ins>
+However,
+JSON-LD
+describes
+a
+specific
+syntax
+to
+use
+for
+expressing
+Linked
+Data.
+This
+includes
+the
+use
+of
+specific
+keywords,
+as
+identified
+in
+<a href="#syntax-tokens-and-keywords" class="sec-ref">
+<span class="secno">
+<del class="diff-old">3.4
+</del>
+<ins class="diff-chg">3.2
+</ins>
+</span>
+<span class="sec-title">
+Syntax
+Tokens
+and
+Keywords
+</span>
+</a>
+for
+expressing
+<a title="node object">
+node
+<del class="diff-old">definitions
+</del>
+<ins class="diff-chg">objects
+</ins>
+</a>,
+values,
+and
+the
+<a href="#dfn-context" class="internalDFN">
+context
+</a>.
+See
+<a href="#json-ld-grammar" class="sec-ref">
+<span class="secno">
+<del class="diff-old">A.
+</del>
+<ins class="diff-chg">B.
+</ins>
+</span>
+<span class="sec-title">
+JSON-LD
+Grammar
+</span>
+</a>
+for
+authoring
+<del class="diff-old">guidelines
+and
+a
+BNF
+description
+of
+JSON-LD.
+</del>
+<ins class="diff-chg">guidelines.
+</ins>
+</p>
+</section>
+</section>
+<section id="advanced-concepts">
+<h2>
+<span class="secno">
+<del class="diff-old">4.
+</del>
+<ins class="diff-chg">6.
+</ins>
+</span>
+Advanced
+Concepts
+</h2>
+<em>
+This
+section
+is
+normative.
+</em>
+<p>
+JSON-LD
+has
+a
+number
+of
+features
+that
+provide
+functionality
+above
+and
+beyond
+the
+core
+functionality
+described
+above.
+The
+following
+section
+describes
+this
+advanced
+functionality
+in
+more
+detail.
+</p>
+<section id="compact-iris">
+<h3>
+<span class="secno">
+<del class="diff-old">4.1
+</del>
+<ins class="diff-chg">6.1
+</ins>
+</span>
+Compact
+IRIs
+</h3>
+<p>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">Term
+</del>
+<ins class="diff-chg">Terms
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+in
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>
+documents
+may
+draw
+from
+a
+number
+of
+different
+<a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">
+vocabularies
+</a>.
+At
+times,
+declaring
+every
+single
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+that
+a
+document
+uses
+can
+require
+the
+developer
+to
+declare
+tens,
+if
+not
+hundreds
+of
+potential
+<a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">
+vocabulary
+</a>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">terms
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+that
+are
+used
+across
+an
+application.
+This
+is
+a
+concern
+for
+at
+least
+two
+reasons:
+the
+first
+is
+the
+cognitive
+load
+on
+the
+developer
+of
+remembering
+all
+of
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+s,
+</del>
+<ins class="diff-chg">terms
+</ins></a>,
+and
+the
+second
+is
+the
+serialized
+size
+of
+the
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+if
+it
+is
+specified
+inline.
+In
+order
+to
+address
+these
+issues,
+the
+concept
+of
+a
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+is
+introduced.
+</p>
+<p>
+A
+<dfn title="compact_iri" id="dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</dfn>
+is
+a
+way
+of
+expressing
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+using
+a
+<em>
+prefix
+</em>
+and
+<em>
+suffix
+</em>
+separated
+by
+a
+colon
+(
+<code>:
+</code>
+)
+which
+is
+similar
+to
+the
+<cite>
+<a href="http://www.w3.org/TR/rdfa-core/#s_curies">
+CURIE
+Syntax
+</a>
+</cite>
+in
+[
+<cite>
+<a class="bibref" href="#bib-RDFA-CORE">
+RDFA-CORE
+</a>
+</cite>
+].
+The
+<dfn title="prefix" id="dfn-prefix">
+prefix
+</dfn>
+is
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+taken
+from
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+and
+is
+a
+short
+string
+identifying
+a
+particular
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+in
+a
+JSON-LD
+document.
+For
+example,
+the
+prefix
+<code>
+foaf
+</code>
+may
+be
+used
+as
+a
+short
+hand
+for
+the
+Friend-of-a-Friend
+vocabulary,
+which
+is
+identified
+using
+the
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<code>
+http://xmlns.com/foaf/0.1/
+</code>.
+A
+developer
+may
+append
+any
+of
+the
+FOAF
+<a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">
+vocabulary
+</a>
+terms
+to
+the
+end
+of
+the
+prefix
+to
+specify
+a
+short-hand
+version
+of
+the
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+for
+the
+<a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">
+vocabulary
+</a>
+term.
+For
+example,
+<code>
+foaf:name
+</code>
+would
+be
+expanded
+out
+to
+the
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>.
+Instead
+of
+having
+to
+remember
+and
+type
+out
+the
+entire
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>,
+the
+developer
+can
+instead
+use
+the
+prefix
+in
+their
+JSON-LD
+markup.
+</p>
+<p>
+Terms
+are
+interpreted
+as
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<del class="diff-old">IRI
+</del>
+<ins class="diff-chg">IRIs
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+if
+they
+contain
+at
+least
+one
+colon
+and
+the
+first
+colon
+is
+not
+followed
+by
+two
+slashes
+(
+<code>
+//
+</code>,
+as
+in
+<code>
+http://example.com
+</code>
+).
+To
+generate
+the
+full
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+the
+value
+is
+first
+split
+into
+a
+<em>
+prefix
+</em>
+and
+<em>
+suffix
+</em>
+at
+the
+first
+occurrence
+of
+a
+colon
+(
+<code>:
+</code>
+).
+If
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+contains
+a
+term
+mapping
+for
+<em>
+prefix
+</em>,
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+is
+generated
+by
+prepending
+the
+mapped
+<em>
+prefix
+</em>
+to
+the
+(possibly
+empty)
+<em>
+suffix
+</em>
+using
+textual
+concatenation.
+If
+no
+prefix
+mapping
+is
+defined,
+the
+value
+is
+interpreted
+as
+an
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+If
+the
+prefix
+is
+an
+underscore
+(
+<code>
+_
+</code>
+),
+the
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+remains
+unchanged.
+<del class="diff-old">This
+effectively
+means
+that
+every
+term
+containing
+a
+colon
+will
+be
+interpreted
+by
+a
+JSON-LD
+processor
+as
+an
+IRI
+.
+</del>
+</p>
+<p>
+Consider
+the
+following
+example:
+</p>
+<del class="diff-old"> {
+</del>
+ <div class="example"><div class="example-title"><span>Example 24</span>: Compact IRIs</div><pre class="example">{
+ "@context":
+ {
+ <span class="diff">"dc": "http://purl.org/dc/elements/1.1/",</span>
+ <span class="diff">"ex": "http://example.org/vocab#"</span>
+ },
+ "@id": "http://example.org/library",
+ "@type": <span class="diff">"ex:Library"</span>,
+ <span class="diff">"ex:contains"</span>:
+ {
+ "@id": "http://example.org/library/the-republic",
+ "@type": <span class="diff">"ex:Book"</span>,
+ <span class="diff">"dc:creator"</span>: "Plato",
+ <span class="diff">"dc:title"</span>: "The Republic",
+ <span class="diff">"ex:contains"</span>:
+ {
+ "@id": "http://example.org/library/the-republic#introduction",
+ "@type": <span class="diff">"ex:Chapter"</span>,
+ <span class="diff">"dc:description"</span>: "An introductory chapter on The Republic.",
+ <span class="diff">"dc:title"</span>: "The Introduction"
+ }
+ }
+}
+</pre>
+</div>
+<p>
+In
+this
+example,
+two
+different
+<a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">
+vocabularies
+</a>
+are
+referred
+to
+using
+prefixes.
+Those
+prefixes
+are
+then
+used
+as
+type
+and
+property
+values
+using
+the
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<code>
+prefix:suffix
+</code>
+notation.
+</p>
+<p>
+It's
+also
+possible
+to
+use
+compact
+IRIs
+within
+the
+context
+as
+shown
+in
+the
+following
+example:
+</p>
+<del class="diff-old"> {
+</del>
+ <div class="example"><div class="example-title"><span>Example 25</span>: Using vocabularies</div><pre class="example">{
+ "@context":
+ {
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "foaf": "http://xmlns.com/foaf/0.1/",
+ <span class="diff">"foaf:homepage"</span>: { "@type": "@id" },
+ "picture": { "@id": <span class="diff">"foaf:depiction"</span>, "@type": "@id" }
+ },
+ "@id": "http://me.markus-lanthaler.com/",
+ "@type": "foaf:Person",
+ "foaf:name": "Markus Lanthaler",
+ "foaf:homepage": "http://www.markus-lanthaler.com/",
+ "picture": "http://twitter.com/account/profile_image/markuslanthaler"
+}
+</pre>
+</div>
+</section>
+<section id="typed-values">
+<h3>
+<span class="secno">
+<del class="diff-old">4.2
+</del>
+<ins class="diff-chg">6.2
+</ins>
+</span>
+Typed
+Values
+</h3>
+<p>
+A
+value
+with
+an
+associated
+type,
+also
+known
+as
+a
+<a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">
+typed
+value
+<del class="diff-old">,
+</del>
+</a>,
+is
+indicated
+by
+associating
+a
+value
+with
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+which
+indicates
+the
+value's
+type.
+Typed
+values
+may
+be
+expressed
+in
+JSON-LD
+in
+three
+ways:
+</p>
+<ol>
+<li>
+By
+utilizing
+the
+<code>
+@type
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+when
+defining
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+within
+a
+<code>
+@context
+</code>
+section.
+</li>
+<li>
+By
+utilizing
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">an
+</ins><a class="tref internalDFN" title="expanded_typed_value" href="#dfn-expanded_typed_value">
+expanded
+<del class="diff-old">form
+for
+specifying
+values.
+</del>
+<ins class="diff-chg">typed
+value
+</ins></a>.
+</li>
+<li>
+By
+using
+a
+native
+JSON
+type
+such
+as
+<a class="tref internalDFN" title="number" href="#dfn-number">
+number
+</a>,
+<a class="tref internalDFN" title="true" href="#dfn-true">
+true
+</a>,
+or
+<a class="tref internalDFN" title="false" href="#dfn-false">
+false
+</a>.
+</li>
+</ol>
+<p>
+The
+first
+example
+uses
+the
+<code>
+@type
+</code>
+keyword
+to
+associate
+a
+type
+with
+a
+particular
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+in
+the
+<code>
+@context
+</code>:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 26</span>: Expanded term definition with type coercion</div><pre class="example">{
+ <span class="diff">"@context":
+ {
+ "modified":
+ {
+ "@id": "http://purl.org/dc/terms/modified",
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ },</span>
+...
+ "modified": "2010-05-29T14:17:39+02:00",
+...
+}
+</pre>
+</div>
+<p>
+The
+<em>
+modified
+</em>
+key's
+value
+above
+is
+automatically
+type
+coerced
+to
+a
+datetime
+value
+because
+of
+the
+information
+specified
+in
+the
+<code>
+@context
+</code>.
+</p>
+<p>
+The
+second
+example
+uses
+the
+expanded
+form
+of
+setting
+the
+type
+information
+in
+the
+body
+of
+a
+JSON-LD
+document:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 27</span>: Expanded value with type</div><pre class="example">{
+ "@context":
+ {
+ "modified":
+ {
+ "@id": "http://purl.org/dc/terms/modified"
+ }
+ },
+...
+ "modified":
+ <span class="diff">{
+ "@value": "2010-05-29T14:17:39+02:00",
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }</span>
+...
+}
+</pre>
+</div>
+<p>
+Both
+examples
+above
+would
+generate
+the
+value
+<code>
+2010-05-29T14:17:39+02:00
+</code>
+with
+the
+type
+<code>
+http://www.w3.org/2001/XMLSchema#dateTime
+</code>.
+Note
+that
+it
+is
+also
+possible
+to
+use
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+or
+a
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+to
+express
+the
+value
+of
+a
+type.
+</p>
+<p>
+The
+<code>
+@type
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+is
+also
+used
+to
+associate
+a
+type
+with
+a
+<a class="tref internalDFN" title="node" href="#dfn-node">
+node
+</a>.
+The
+concept
+of
+<del class="diff-old">an
+</del>
+<ins class="diff-chg">a
+</ins>
+<dfn title="node_type" id="dfn-node_type">
+node
+type
+</dfn>
+and
+a
+<dfn title="value_type" id="dfn-value_type">
+value
+type
+</dfn>
+are
+different.
+This
+is
+similar
+to
+object-oriented
+programming
+languages
+where
+both
+scalar
+and
+structured
+types
+use
+the
+same
+class
+inheritance
+mechanism,
+even
+though
+scalar
+types
+and
+structured
+types
+are
+inherently
+different.
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 28</span>: Example demonstrating the context-sensitivity for @type</div><pre class="example">{
+...
+ "@id": "http://example.org/posts#TripToWestVirginia",
+ <span class="diff">"@type": "http://schema.org/BlogPosting"</span>,
+ "modified":
+ {
+ "@value": "2010-05-29T14:17:39+02:00",
+ <span class="diff">"@type": "http://www.w3.org/2001/XMLSchema#dateTime"</span>
+ }
+...
+}
+</pre>
+</div>
+<p>
+The
+first
+use
+of
+<code>
+@type
+</code>
+associates
+a
+<a class="tref internalDFN" title="node_type" href="#dfn-node_type">
+node
+type
+</a>
+(
+<code>
+http://schema.org/BlogPosting
+</code>
+)
+with
+the
+<a class="tref internalDFN" title="node" href="#dfn-node">
+node
+</a>,
+which
+is
+expressed
+using
+the
+<code>
+@id
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>.
+The
+second
+use
+of
+<code>
+@type
+</code>
+associates
+a
+<a class="tref internalDFN" title="value_type" href="#dfn-value_type">
+value
+type
+</a>
+(
+<code>
+http://www.w3.org/2001/XMLSchema#dateTime
+</code>
+)
+with
+the
+value
+expressed
+using
+the
+<code>
+@value
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>.
+As
+a
+general
+rule,
+when
+<code>
+@value
+</code>
+and
+<code>
+@type
+</code>
+are
+used
+in
+the
+same
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>,
+the
+<code>
+@type
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+is
+expressing
+a
+<a class="tref internalDFN" title="value_type" href="#dfn-value_type">
+value
+type
+</a>.
+Otherwise,
+the
+<code>
+@type
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+is
+expressing
+a
+<a class="tref internalDFN" title="node_type" href="#dfn-node_type">
+node
+type
+</a>.
+</p>
+</section>
+<section id="language-tagged-strings">
+<h3>
+<span class="secno">
+<del class="diff-old">4.3
+</del>
+<ins class="diff-chg">6.3
+</ins>
+</span>
+Language-tagged
+Strings
+</h3>
+<p>
+A
+string
+with
+an
+associated
+language,
+also
+known
+as
+a
+<a class="tref internalDFN" title="language-tagged_string" href="#dfn-language-tagged_string">
+language-tagged
+string
+<del class="diff-old">,
+</del>
+</a>,
+is
+indicated
+by
+associating
+a
+string
+with
+<del class="diff-old">an
+</del>
+<ins class="diff-chg">a
+</ins>
+language
+code
+as
+defined
+in
+[
+<cite>
+<a class="bibref" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+].
+Language-tagged
+strings
+may
+be
+expressed
+in
+JSON-LD
+in
+four
+ways:
+</p>
+<ol>
+<li>
+By
+defining
+a
+global
+language
+using
+the
+<code>
+@language
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+within
+a
+<code>
+@context
+</code>
+section.
+</li>
+<li>
+By
+utilizing
+the
+<code>
+@language
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+when
+defining
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+within
+a
+<code>
+@context
+</code>
+section.
+</li>
+<li>
+By
+utilizing
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">an
+</ins><a class="tref internalDFN" title="expanded_language-tagged_string" href="#dfn-expanded_language-tagged_string">
+expanded
+<del class="diff-old">form
+for
+specifying
+values.
+</del>
+<ins class="diff-chg">language-tagged
+string
+</ins></a>.
+</li>
+<li>
+By
+utilizing
+<ins class="diff-new">a
+</ins><a class="tref internalDFN" title="language_map" href="#dfn-language_map"><ins class="diff-new">
+language
+map
+</ins></a>,<ins class="diff-new">
+provided
+</ins>
+the
+<ins class="diff-new">underlying
+</ins><code><ins class="diff-new">
+term
+</ins></code><ins class="diff-new">
+is
+defined
+with
+a
+</ins>
+<code>
+@container
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+<del class="diff-old">with
+a
+</del>
+<ins class="diff-chg">whose
+</ins>
+value
+<del class="diff-old">of
+</del>
+<ins class="diff-chg">is
+</ins>
+<code>
+@language
+</code>
+<del class="diff-old">when
+defining
+a
+term
+</del>
+within
+a
+<code>
+@context
+</code>
+section.
+<del class="diff-old">This
+usage
+pattern
+is
+called
+a
+language
+map
+.
+</del>
+</li>
+</ol>
+<p>
+The
+first
+example
+uses
+the
+<code>
+@language
+</code>
+keyword
+to
+associate
+a
+type
+with
+a
+particular
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+in
+the
+<code>
+@context
+</code>:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 29</span>: Expanded term definition with language coercion</div><pre class="example">{
+ <span class="diff">"@context":
+ {
+ "title":
+ {
+ "@id": "http://purl.org/dc/terms/title",
+ "@language": "en"
+ }
+ },</span>
+...
+ "title": "JSON-LD Syntax",
+...
+}
+</pre>
+</div>
+<p>
+The
+<em>
+modified
+</em>
+key's
+value
+above
+is
+automatically
+language
+coerced
+to
+a
+English
+value
+because
+of
+the
+information
+specified
+in
+the
+<code>
+@context
+</code>.
+</p>
+<p>
+The
+second
+example
+uses
+the
+expanded
+form
+of
+setting
+the
+language
+information
+in
+the
+body
+of
+a
+JSON-LD
+document:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 30</span>: Expanded value with language</div><pre class="example">{
+ "@context":
+ {
+ "title":
+ {
+ "@id": "http://purl.org/dc/terms/title"
+ }
+ },
+...
+ "title":
+ <span class="diff">{
+ "@value": "JSON-LD Syntax",
+ "@language": "en"
+ }</span>
+...
+}
+</pre>
+</div>
+<p>
+Both
+examples
+above
+would
+generate
+the
+value
+<code>
+JSON-LD
+Syntax
+</code>
+tagged
+with
+the
+language
+<code>
+en
+</code>
+;
+which
+is
+the
+[
+<cite>
+<a class="bibref" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+]
+code
+for
+the
+English
+language.
+</p>
+<p>
+Systems
+that
+support
+multiple
+languages
+often
+need
+to
+express
+data
+values
+in
+each
+language.
+Typically,
+such
+systems
+also
+try
+to
+ensure
+that
+developers
+have
+a
+programatically
+easy
+way
+to
+navigate
+the
+datastructures
+for
+the
+language-specific
+data.
+In
+this
+case,
+<a class="tref internalDFN" title="language_map" href="#dfn-language_map">
+language
+<del class="diff-old">map
+</del>
+<ins class="diff-chg">maps
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+may
+be
+utilized.
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 31</span>: Language map expressing a property in three languages</div><pre class="example">{
+ "@context":
+ {
+ "title":
+ {
+<del class="diff-old"> "@id": "http://purl.org/dc/terms/title"
+ "@container": "@language"
+</del>
+<ins class="diff-chg"> "@id": "http://purl.org/dc/terms/title",
+</ins> <span class="diff">"@container": "@language"</span>
+ }
+ },
+...
+ "title":
+ <span class="diff">{
+ "en": "JSON-LD Syntax",
+ "ru": "JSON-LD Синтаксис",
+ "ja": "JSON-LDの構文"
+ }</span>
+...
+}
+</pre>
+</div>
+<p>
+In
+the
+example
+above,
+the
+title
+is
+expressed
+in
+three
+languages;
+English,
+Russian,
+and
+Japanese.
+To
+access
+the
+data
+above
+in
+a
+programming
+language
+supporting
+dot-notation
+accessors
+for
+object
+properties,
+a
+developer
+may
+use
+the
+<code>
+property.language
+</code>
+pattern.
+For
+example,
+to
+access
+the
+Japanese
+version
+of
+the
+title,
+a
+developer
+would
+use
+the
+following
+code
+snippet:
+<code>
+obj.title.ja
+</code>.
+</p>
+</section>
+<section id="referencing-contexts-from-json-documents">
+<h3>
+<span class="secno">
+<del class="diff-old">4.4
+</del>
+<ins class="diff-chg">6.4
+</ins>
+</span>
+Referencing
+Contexts
+from
+JSON
+Documents
+</h3>
+<p>
+Ordinary
+JSON
+documents
+can
+be
+transformed
+into
+JSON-LD
+documents
+by
+referencing
+to
+an
+external
+JSON-LD
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+in
+an
+HTTP
+Link
+Header.
+Doing
+this
+allows
+JSON
+to
+be
+unambiguously
+machine-readable
+without
+requiring
+developers
+to
+drastically
+change
+their
+workflow
+and
+provides
+an
+upgrade
+path
+for
+existing
+infrastructure
+without
+breaking
+existing
+clients
+that
+rely
+on
+the
+<code>
+application/json
+</code>
+media
+type.
+</p>
+<p>
+In
+order
+to
+use
+an
+external
+context
+with
+an
+ordinary
+JSON
+document,
+an
+author
+<em class="rfc2119" title="must">
+must
+</em>
+specify
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+to
+a
+valid
+<a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">
+JSON-LD
+document
+</a>
+in
+an
+HTTP
+Link
+Header
+[
+<cite>
+<a class="bibref" href="#bib-RFC5988">
+RFC5988
+</a>
+</cite>
+]
+using
+the
+<code>
+<del class="diff-old">describedby
+</del>
+<ins class="diff-chg">http://www.w3.org/ns/json-ld#context
+</ins>
+</code>
+link
+relation.
+The
+referenced
+document
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+top-level
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definition
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>.
+The
+<code>
+@context
+</code>
+subtree
+within
+that
+object
+is
+added
+to
+the
+top-level
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definition
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>
+of
+the
+referencing
+document.
+If
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+is
+at
+the
+top-level
+of
+the
+referencing
+document
+and
+its
+items
+are
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definitions
+</del>
+<ins class="diff-chg">objects
+</ins>
+</a>,
+the
+<code>
+@context
+</code>
+subtree
+is
+added
+to
+all
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+items.
+All
+extra
+information
+located
+outside
+of
+the
+<code>
+@context
+</code>
+subtree
+in
+the
+referenced
+document
+<em class="rfc2119" title="must">
+must
+</em>
+be
+discarded.
+</p>
+<p>
+The
+following
+example
+demonstrates
+the
+use
+of
+an
+external
+context
+with
+an
+ordinary
+JSON
+document:
+</p>
+<del class="diff-old">GET /ordinary-json-document.json HTTP/1.1
+</del>
+<div class="example"><div class="example-title"><span>Example 32</span>: Specifing context through HTTP header</div><pre class="example">GET /ordinary-json-document.json HTTP/1.1
+Host: example.com
+Accept: application/ld+json,application/json,*/*;q=0.1
+====================================
+HTTP/1.0 200 OK
+...
+Content-Type: <span class="diff">application/json</span>
+<span class="diff">Link: <http://json-ld.org/contexts/person.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"</span>
+{
+ "name": "Markus Lanthaler",
+ "homepage": "http://www.markus-lanthaler.com/",
+ "depiction": "http://twitter.com/account/profile_image/markuslanthaler"
+}
+</pre>
+</div>
+<del class="diff-old">Note
+</del>
+<p>
+<ins class="diff-chg">Please
+note
+that
+</ins><a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">
+JSON-LD
+documents
+</a>
+served
+with
+the
+<code>
+application/ld+json
+</code>
+media
+type
+<em class="rfc2119" title="must">
+must
+</em>
+have
+all
+context
+information,
+including
+references
+to
+external
+contexts,
+within
+the
+body
+of
+the
+document.
+<ins class="diff-new">Contexts
+linked
+via
+a
+</ins><code><ins class="diff-new">
+http://www.w3.org/ns/json-ld#context
+</ins></code><ins class="diff-new">
+HTTP
+Link
+Header
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+ignored
+for
+such
+documents.
+</ins>
+</p>
+</section>
+<section id="expanded-term-definition">
+<h3>
+<span class="secno">
+<del class="diff-old">4.5
+</del>
+<ins class="diff-chg">6.5
+</ins>
+</span>
+Expanded
+Term
+Definition
+</h3>
+<p>
+Within
+a
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+definition,
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">terms
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+may
+be
+defined
+using
+an
+<a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">
+expanded
+<del class="diff-old">notation
+</del>
+<ins class="diff-chg">term
+definition
+</ins></a>
+to
+allow
+for
+additional
+information
+associated
+with
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+to
+be
+specified
+(see
+also
+<a href="#type-coercion" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.6
+</del>
+<ins class="diff-chg">6.6
+</ins>
+</span>
+<span class="sec-title">
+Type
+Coercion
+</span>
+</a>
+and
+<a href="#sets-and-lists" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.9
+</del>
+<ins class="diff-chg">6.9
+</ins>
+</span>
+<span class="sec-title">
+Sets
+and
+Lists
+</span>
+</a>
+).
+</p>
+<p>
+Instead
+of
+using
+a
+string
+representation
+of
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>,
+the
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+may
+be
+specified
+using
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+having
+an
+<code>
+@id
+</code>
+<del class="diff-old">key.
+The
+value
+of
+the
+@id
+key
+must
+be
+either
+</del>
+<ins class="diff-chg">key,
+and
+</ins>
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>,
+a
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+or
+an
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">.
+Such
+an
+object
+is
+called
+a
+node
+reference
+.
+</del>
+</a>
+<ins class="diff-chg">as
+value.
+</ins>
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 33</span>: Expanded term definition</div><pre class="example">{
+ "@context":
+ {
+ "foaf": <span class="diff">{ "@id": "http://xmlns.com/foaf/0.1/" }</span>,
+ "name": <span class="diff">{ "@id": "http://xmlns.com/foaf/0.1/name" }</span>,
+ "homepage": <span class="diff">{ "@id": "foaf:homepage" }</span>,
+ "depiction": <span class="diff">{ "@id": "foaf:depiction" }</span>
+ },
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ "depiction": "http://twitter.com/account/profile_image/manusporny"
+}
+</pre>
+</div>
+<p>
+This
+allows
+additional
+information
+to
+be
+associated
+with
+the
+term.
+This
+may
+be
+used
+for
+<a href="#type-coercion" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.6
+</del>
+<ins class="diff-chg">6.6
+</ins>
+</span>
+<span class="sec-title">
+Type
+Coercion
+</span>
+</a>,
+<a href="#sets-and-lists" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.9
+</del>
+<ins class="diff-chg">6.9
+</ins>
+</span>
+<span class="sec-title">
+Sets
+and
+Lists
+</span>
+<del class="diff-old">),
+</del>
+</a>,
+or
+to
+associate
+language
+information
+with
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+as
+shown
+in
+the
+following
+example:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 34</span>: Expanded term definition with language</div><pre class="example">{
+ "@context": {
+ ...
+ "ex": "http://example.com/",
+ "@language": "ja",
+ "name": { "@id": "ex:name", <span class="diff">"@language": null</span> },
+ "occupation": { "@id": "ex:occupation" },
+ "occupation_en": { "@id": "ex:occupation", <span class="diff">"@language": "en"</span> },
+ "occupation_cs": { "@id": "ex:occupation", <span class="diff">"@language": "cs"</span> }
+ },
+ <span class="diff">"name": "Yagyū Muneyoshi",
+ "occupation": "忍者",
+ "occupation_en": "Ninja",
+ "occupation_cs": "Nindža",</span>
+ ...
+}
+</pre>
+</div>
+<p>
+The
+example
+above
+would
+associate
+<em>
+忍者
+</em>
+with
+the
+specified
+default
+language
+code
+<code>
+ja
+</code>,
+<em>
+Ninja
+</em>
+with
+the
+language
+code
+<code>
+en
+</code>,
+and
+<em>
+Nindža
+</em>
+with
+the
+language
+code
+<code>
+cs
+</code>.
+The
+value
+of
+<code>
+name
+</code>,
+<em>
+Yagyū
+Muneyoshi
+</em>
+wouldn't
+be
+associated
+with
+any
+language
+code
+since
+<code>
+@language
+</code>
+was
+reset
+to
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>
+in
+the
+<a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">
+expanded
+term
+<del class="diff-old">definition.
+</del>
+<ins class="diff-chg">definition
+</ins></a>.
+</p>
+<p>
+Expanded
+terms
+may
+also
+be
+defined
+using
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+IRIs
+</a>
+or
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+IRIs
+</a>
+as
+keys.
+If
+the
+definition
+does
+not
+include
+an
+<code>
+@id
+</code>
+key,
+the
+expanded
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+is
+determined
+by
+performing
+expansion
+of
+the
+key
+within
+the
+current
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+<del class="diff-old">context.
+</del>
+<ins class="diff-chg">context
+</ins></a>.
+This
+mechanism
+is
+mainly
+used
+to
+associate
+type
+or
+language
+information
+with
+a
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+or
+an
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+</p>
+<div class="note">
+<div class="note-title">
+<span>
+Note
+</span>
+</div>
+<p class="">
+While
+it
+is
+possible
+to
+define
+a
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+or
+an
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+to
+expand
+to
+some
+other
+unrelated
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+(for
+example,
+<code>
+foaf:name
+</code>
+expanding
+to
+<code>
+http://example.org/unrelated#species
+</code>
+),
+such
+usage
+is
+strongly
+discouraged.
+</p>
+</div>
+</section>
+<section id="type-coercion">
+<h3>
+<span class="secno">
+<del class="diff-old">4.6
+</del>
+<ins class="diff-chg">6.6
+</ins>
+</span>
+Type
+Coercion
+</h3>
+<p>
+JSON-LD
+supports
+the
+coercion
+of
+values
+to
+particular
+data
+types.
+Type
+<dfn title="coercion" id="dfn-coercion">
+coercion
+</dfn>
+allows
+someone
+deploying
+JSON-LD
+to
+coerce
+the
+incoming
+or
+outgoing
+values
+to
+the
+proper
+data
+type
+based
+on
+a
+mapping
+of
+data
+type
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<del class="diff-old">IRI
+</del>
+<ins class="diff-chg">IRIs
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+to
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+s.
+</del>
+<ins class="diff-chg">terms
+</ins></a>.
+Using
+type
+coercion,
+value
+representation
+is
+preserved
+without
+requiring
+the
+data
+type
+to
+be
+specified
+with
+each
+piece
+of
+data.
+</p>
+<p>
+Type
+coercion
+is
+specified
+within
+an
+<a href="#expanded-term-definition" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.5
+</del>
+<ins class="diff-chg">6.5
+</ins>
+</span>
+<span class="sec-title">
+Expanded
+Term
+Definition
+</span>
+</a>
+using
+the
+<code>
+@type
+</code>
+key.
+The
+value
+of
+this
+key
+<del class="diff-old">represents
+a
+type
+IRI
+and
+must
+take
+the
+form
+of
+a
+term
+,
+compact
+IRI
+</del>
+<ins class="diff-chg">expands
+to
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri">
+<del class="diff-old">,
+absolute
+</del>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">,
+or
+</del>
+</a>.
+<ins class="diff-chg">Alternatively,
+</ins>
+the
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+<code>
+@id
+<del class="diff-old">.
+Specifying
+@id
+</del>
+</code>
+<del class="diff-old">indicates
+</del>
+<ins class="diff-chg">may
+be
+used
+as
+value
+to
+indicate
+</ins>
+that
+within
+the
+body
+of
+a
+JSON-LD
+document,
+a
+string
+value
+of
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+coerced
+to
+<code>
+@id
+</code>
+is
+to
+be
+interpreted
+as
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+</p>
+<p>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+Terms
+</a>
+or
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+IRIs
+</a>
+used
+as
+the
+value
+of
+a
+<code>
+@type
+</code>
+key
+may
+be
+defined
+within
+the
+same
+context.
+This
+means
+that
+one
+may
+specify
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+like
+<code>
+xsd
+</code>
+and
+then
+use
+<code>
+xsd:integer
+</code>
+within
+the
+same
+context
+<del class="diff-old">definition
+-
+the
+JSON-LD
+processor
+will
+be
+able
+to
+determine
+the
+proper
+expansion
+for
+xsd:integer
+.
+</del>
+<ins class="diff-chg">definition.
+</ins>
+</p>
+<p>
+The
+example
+below
+demonstrates
+how
+a
+JSON-LD
+author
+can
+coerce
+values
+to
+<a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">
+typed
+<del class="diff-old">value
+s,
+</del>
+<ins class="diff-chg">values
+</ins></a>,
+IRIs
+and
+lists.
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 35</span>: Expanded term definition with types</div><pre class="example">{
+ "@context":
+ {
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "age":
+ <span class="diff">{
+ "@id": "http://xmlns.com/foaf/0.1/age",
+ "@type": "xsd:integer"
+ }</span>,
+ "homepage":
+ <span class="diff">{
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id",
+ "@container": "@list"
+ }</span>
+ },
+<ins class="diff-new"> "@id": "http://example.com/people#john",
+</ins>
+ "name": "John Smith",
+ "age": <span class="diff">"41"</span>,
+ "homepage":
+ <span class="diff">[
+ "http://personal.example.org/",
+ "http://work.example.com/jsmith/"
+ ]</span>
+}
+</pre>
+</div>
+<p>
+The
+<del class="diff-old">example
+</del>
+<ins class="diff-chg">markup
+shown
+</ins>
+above
+would
+generate
+the
+following
+<del class="diff-old">Turtle:
+</del>
+<ins class="diff-chg">data.
+The
+data
+has
+no
+inherent
+order
+except
+for
+the
+values
+the
+</ins><code><ins class="diff-chg">
+http://xmlns.com/foaf/0.1/homepage
+</ins></code><ins class="diff-chg">
+property
+which
+represent
+an
+ordered
+list.
+</ins>
+</p>
+<del class="diff-old">@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+</del>
+<table class="example">
+<thead>
+<tr>
+<del class="diff-old">[ foaf:name "John Smith";
+ foaf:age "41"^^xsd:integer;
+ foaf:homepage ( <http://personal.example.org/> <http://work.example.com/jsmith/> )
+]
+.
+</del>
+<th>
+<ins class="diff-chg">Subject
+</ins></th><th><ins class="diff-chg">
+Property
+</ins></th><th><ins class="diff-chg">
+Object
+</ins></th><th><ins class="diff-chg">
+Datatype
+</ins></th></tr>
+</thead>
+<tbody>
+<tr>
+<td>
+<ins class="diff-chg">http://example.com/people#john
+</ins></td><td><ins class="diff-chg">
+http://xmlns.com/foaf/0.1/name
+</ins></td><td><ins class="diff-chg">
+John
+Smith
+</ins></td><td></td></tr><tr><td><ins class="diff-chg">
+http://example.com/people#john
+</ins></td><td><ins class="diff-chg">
+http://xmlns.com/foaf/0.1/age
+</ins></td><td><ins class="diff-chg">
+41
+</ins></td><td><ins class="diff-chg">
+http://www.w3.org/2001/XMLSchema#integer
+</ins></td></tr><tr><td rowspan="2"><ins class="diff-chg">
+http://example.com/people#john
+</ins></td><td rowspan="2"><ins class="diff-chg">
+http://xmlns.com/foaf/0.1/homepage
+</ins></td><td><ins class="diff-chg">
+http://personal.example.org/
+</ins></td><td></td></tr><tr><td><ins class="diff-chg">
+http://work.example.com/jsmith/
+</ins></td><td></td></tr></tbody></table>
+<p>
+Terms
+may
+also
+be
+defined
+using
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+IRIs
+</a>
+or
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+IRIs
+</a>.
+This
+allows
+coercion
+rules
+to
+be
+applied
+to
+keys
+which
+are
+not
+represented
+as
+a
+simple
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>.
+For
+example:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 36</span>: Term definitions using compact and absolute IRIs</div><pre class="example">{
+ "@context":
+ {
+<del class="diff-old"> ,
+</del>
+<ins class="diff-chg"> "foaf": "http://xmlns.com/foaf/0.1/",
+</ins>
+ "<span class="diff">foaf:age</span>":
+ {
+ <span class="diff">"@id": "http://xmlns.com/foaf/0.1/age"</span>,
+ "@type": "xsd:integer"
+ },
+<del class="diff-old"> "":
+ {
+</del>
+<ins class="diff-chg"> "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>":
+ {
+</ins>
+ "@type": "@id"
+<del class="diff-old"> }
+</del>
+<ins class="diff-chg"> }
+</ins>
+ },
+ "foaf:name": "John Smith",
+<del class="diff-old"> "foaf:age": ,
+ "foaf:homepage":
+ [
+</del>
+<ins class="diff-chg"> "<span class="diff">foaf:age</span>": "41",
+ "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>":
+ [
+</ins>
+ "http://personal.example.org/",
+ "http://work.example.com/jsmith/"
+<del class="diff-old"> ]
+</del>
+<ins class="diff-chg"> ]
+</ins>
+}
+</pre>
+</div>
+<p>
+In
+this
+case
+the
+<code>
+@id
+</code>
+definition
+<ins class="diff-new">in
+the
+term
+definition
+</ins>
+is
+optional,
+but
+if
+it
+does
+exist,
+the
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+or
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+is
+treated
+as
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+(not
+a
+<code>
+prefix:suffix
+</code>
+construct)
+so
+that
+the
+actual
+definition
+of
+a
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>
+becomes
+unnecessary.
+<ins class="diff-new">Type
+coercion
+is
+performed
+using
+the
+unexpanded
+value
+of
+the
+key,
+which
+has
+to
+match
+exactly
+an
+entry
+in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a>.
+</p>
+<div class="note">
+<div class="note-title">
+<span>
+Note
+</span>
+</div>
+<p class="">
+Keys
+in
+the
+context
+are
+treated
+as
+<a class="tref internalDFN" title="term" href="#dfn-term">
+terms
+</a>
+for
+the
+purpose
+of
+expansion
+and
+value
+coercion.
+At
+times,
+this
+may
+result
+in
+multiple
+representations
+for
+the
+same
+expanded
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>.
+For
+example,
+one
+could
+specify
+that
+<code>
+dog
+</code>
+and
+<code>
+cat
+</code>
+both
+expanded
+to
+<code>
+http://example.com/vocab#animal
+</code>.
+Doing
+this
+could
+be
+useful
+for
+establishing
+different
+type
+coercion
+or
+language
+specification
+rules.
+It
+also
+allows
+a
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+(or
+even
+an
+absolute
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+)
+to
+be
+defined
+as
+something
+else
+entirely.
+For
+example,
+one
+could
+specify
+that
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+<code>
+http://example.org/zoo
+</code>
+should
+expand
+to
+<code>
+http://example.org/river
+</code>,
+but
+this
+usage
+is
+discouraged
+because
+it
+would
+lead
+to
+a
+great
+deal
+of
+confusion
+among
+developers
+attempting
+to
+understand
+the
+JSON-LD
+document.
+</p>
+</div>
+<del class="diff-old">Type
+coercion
+is
+performed
+using
+the
+unexpanded
+value
+of
+the
+key,
+which
+must
+have
+an
+exact
+match
+for
+an
+entry
+in
+the
+active
+context
+.
+</del>
+</section>
+<section id="property-generators">
+<h3>
+<span class="secno">
+<del class="diff-old">4.7
+</del>
+<ins class="diff-chg">6.7
+</ins>
+</span>
+Property
+Generators
+</h3>
+<p>
+At
+times,
+an
+author
+may
+find
+that
+they
+need
+to
+express
+the
+same
+value
+for
+multiple
+properties.
+The
+simplest
+approach
+to
+accomplish
+this
+goal
+would
+be
+to
+do
+the
+following:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 37</span>: Verbose expression of multiple properties with the same value</div><pre class="example">{
+ "@context":
+ {
+ <span class="diff">"title1": "http://purl.org/dc/terms/title"</span>,
+ <span class="diff">"title2": "http://schema.org/name"</span>,
+ <span class="diff">"title3": "http://www.w3.org/2000/01/rdf-schema#label"</span>
+ },
+ "@id": "http://example.com/book",
+ <span class="diff">"title1": "The Count of Monte Cristo"</span>,
+ <span class="diff">"title2": "The Count of Monte Cristo"</span>,
+ <span class="diff">"title3": "The Count of Monte Cristo"</span>
+}
+</pre>
+</div>
+<p>
+Unfortunately,
+the
+approach
+above
+produces
+redundant
+data
+and
+would
+become
+a
+publishing
+burden
+for
+large
+data
+sets.
+In
+these
+situations,
+the
+author
+may
+use
+a
+<dfn title="property_generator" id="dfn-property_generator">
+property
+generator
+</dfn>
+to
+express
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+<del class="diff-old">once,
+but
+have
+</del>
+<ins class="diff-chg">that
+maps
+to
+multiple
+</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
+properties
+</ins></a><ins class="diff-chg">
+in
+</ins>
+the
+<a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">
+JSON-LD
+<del class="diff-old">processor
+expand
+the
+single
+statement
+into
+multiple
+statements.
+</del>
+<ins class="diff-chg">graph
+</ins></a>.
+This
+method
+can
+be
+accomplished
+by
+using
+the
+following
+markup
+pattern:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 38</span>: Generating multiple properties using a single term</div><pre class="example">{
+ "@context":
+ {
+ <span class="diff">"title": { "@id": [ "http://purl.org/dc/terms/title",
+ "http://schema.org/name",
+ "http://www.w3.org/2000/01/rdf-schema#label" ] }</span>
+ },
+ "@id": "http://example.com/book",
+ <span class="diff">"title": "The Count of Monte Cristo"</span>
+}
+</pre>
+</div>
+<p>
+While
+the
+term
+above
+is
+only
+used
+once
+outside
+of
+the
+<code>
+@context
+</code>,
+<del class="diff-old">a
+JSON-LD
+processor
+will
+internally
+transform
+</del>
+the
+document
+above
+<del class="diff-old">into
+</del>
+<ins class="diff-chg">is
+equivalent
+to
+</ins>
+the
+<del class="diff-old">following
+set
+of
+statements:
+</del>
+<ins class="diff-chg">following:
+</ins>
+</p>
+<del class="diff-old"><http://example.com/book>
+ <http://purl.org/dc/terms/title>
+ "The Count of Monte Cristo" .
+<http://example.com/book>
+ <http://schema.org/name>
+ "The Count of Monte Cristo" .
+<http://example.com/book>
+ <http://www.w3.org/2000/01/rdf-schema#label>
+"The
+</del>
+<table class="example">
+<thead>
+<tr>
+<th>
+<ins class="diff-chg">Subject
+</ins></th><th><ins class="diff-chg">
+Property
+</ins></th><th><ins class="diff-chg">
+Object
+</ins></th></tr></thead><tbody><tr><td><ins class="diff-chg">
+http://example.com/book
+</ins></td><td><ins class="diff-chg">
+http://purl.org/dc/terms/title
+</ins></td><td><ins class="diff-chg">
+The
+</ins>
+Count
+of
+Monte
+<del class="diff-old">Cristo"
+.
+</del>
+<ins class="diff-chg">Cristo
+</ins></td></tr><tr><td><ins class="diff-chg">
+http://example.com/book
+</ins></td><td><ins class="diff-chg">
+http://schema.org/name
+</ins></td><td><ins class="diff-chg">
+The
+Count
+of
+Monte
+Cristo
+</ins></td></tr><tr><td><ins class="diff-chg">
+http://example.com/book
+</ins></td><td><ins class="diff-chg">
+http://www.w3.org/2000/01/rdf-schema#label
+</ins></td><td><ins class="diff-chg">
+The
+Count
+of
+Monte
+Cristo
+</ins></td></tr></tbody></table>
+</section>
+<section id="iri-expansion-within-a-context">
+<h3>
+<span class="secno">
+<del class="diff-old">4.8
+</del>
+<ins class="diff-chg">6.8
+</ins>
+</span>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+Within
+a
+Context
+</h3>
+<p>
+In
+general,
+normal
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+expansion
+rules
+apply
+anywhere
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+is
+expected
+(see
+<a href="#iris" class="sec-ref">
+<span class="secno">
+<del class="diff-old">3.7
+</del>
+<ins class="diff-chg">5.3
+</ins>
+</span>
+<span class="sec-title">
+IRIs
+</span>
+</a>
+).
+Within
+a
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+definition,
+this
+can
+mean
+that
+terms
+defined
+within
+the
+context
+may
+also
+be
+used
+within
+that
+context
+as
+long
+as
+there
+are
+no
+circular
+dependencies.
+For
+example,
+it
+is
+common
+to
+use
+the
+<code>
+xsd
+</code>
+namespace
+when
+defining
+<a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">
+typed
+value
+</a>
+s:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 39</span>: IRI expansion within a context</div><pre class="example">{
+ "@context":
+ {
+ <span class="diff">"xsd": "http://www.w3.org/2001/XMLSchema#"</span>,
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "age":
+ {
+ "@id": "http://xmlns.com/foaf/0.1/age",
+ "@type": <span class="diff">"xsd:integer"</span>
+ },
+ "homepage":
+ {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ },
+ ...
+}
+</pre>
+</div>
+<p>
+In
+this
+example,
+the
+<code>
+xsd
+</code>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+is
+defined
+and
+used
+as
+a
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>
+for
+the
+<code>
+@type
+</code>
+coercion
+of
+the
+<code>
+age
+</code>
+property.
+</p>
+<p>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">Term
+</del>
+<ins class="diff-chg">Terms
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+may
+also
+be
+used
+when
+defining
+the
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+of
+another
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 40</span>: Using a term to define the IRI of another term within a context</div><pre class="example">{
+ "@context":
+ {
+ <span class="diff">"foaf": "http://xmlns.com/foaf/0.1/"</span>,
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "name": <span class="diff">"foaf:name"</span>,
+ "age":
+ {
+ "@id": <span class="diff">"foaf:age"</span>,
+ "@type": "xsd:integer"
+ },
+ "homepage":
+ {
+ "@id": <span class="diff">"foaf:homepage"</span>,
+ "@type": "@id"
+ }
+ },
+ ...
+}
+</pre>
+</div>
+<p>
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+Compact
+IRIs
+</a>
+and
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+IRIs
+</a>
+may
+be
+used
+on
+the
+left-hand
+side
+of
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+definition.
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 41</span>: Using a compact IRI as a term</div><pre class="example">{
+ "@context":
+ {
+ <span class="diff">"foaf": "http://xmlns.com/foaf/0.1/"</span>,
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "name": "foaf:name",
+ "<span class="diff">foaf:age</span>":
+ {
+ "@type": "xsd:integer"
+ },
+ "<span class="diff">foaf:homepage</span>":
+ <span class="diff">{
+ "@type": "@id"
+ }</span>
+ },
+ ...
+}
+</pre>
+</div>
+<p>
+In
+this
+example,
+the
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+form
+is
+used
+in
+two
+different
+ways.
+In
+the
+first
+approach,
+<code>
+foaf:age
+</code>
+declares
+both
+the
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+for
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+(using
+short-form)
+as
+well
+as
+the
+<code>
+@type
+</code>
+associated
+with
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>.
+In
+the
+second
+approach,
+only
+the
+<code>
+@type
+</code>
+associated
+with
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+is
+specified.
+The
+<del class="diff-old">JSON-LD
+processor
+will
+derive
+the
+</del>
+full
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+for
+<code>
+foaf:homepage
+</code>
+<ins class="diff-new">is
+determined
+</ins>
+by
+looking
+up
+the
+<code>
+foaf
+</code>
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>
+in
+the
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>.
+</p>
+<p>
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+Absolute
+IRIs
+</a>
+may
+also
+be
+used
+in
+the
+key
+position
+in
+a
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 42</span>: Associating context definitions with absolute IRIs</div><pre class="example">{
+ "@context":
+ {
+ "foaf": "http://xmlns.com/foaf/0.1/",
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "name": "foaf:name",
+ "foaf:age":
+ {
+ "@id": "foaf:age",
+ "@type": "xsd:integer"
+ },
+ "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>":
+ {
+ "@type": "@id"
+ }
+ },
+ ...
+}
+</pre>
+</div>
+<p>
+In
+order
+for
+the
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+to
+match
+above,
+the
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+<del class="diff-old">must
+also
+</del>
+<ins class="diff-chg">needs
+to
+</ins>
+be
+used
+in
+the
+<a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">
+JSON-LD
+<del class="diff-old">document.
+</del>
+<ins class="diff-chg">document
+</ins></a>.
+Also
+note
+that
+<code>
+foaf:homepage
+</code>
+will
+not
+use
+the
+<code>
+{
+"@type":
+"@id"
+}
+</code>
+declaration
+because
+<code>
+foaf:homepage
+</code>
+is
+not
+the
+same
+as
+<code>
+http://xmlns.com/foaf/0.1/homepage
+</code>.
+That
+is,
+<del class="diff-old">a
+JSON-LD
+processor
+will
+use
+direct
+string
+comparison
+when
+looking
+up
+</del>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">terms
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+<ins class="diff-chg">are
+looked
+up
+</ins>
+in
+a
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+<ins class="diff-new">using
+direct
+string
+comparison
+</ins>
+before
+<del class="diff-old">it
+applies
+</del>
+the
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>
+lookup
+<del class="diff-old">mechanism.
+</del>
+<ins class="diff-chg">mechanism
+is
+applied.
+</ins>
+</p>
+<p>
+The
+only
+exception
+for
+using
+terms
+in
+the
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+is
+that
+<del class="diff-old">they
+must
+not
+be
+used
+in
+a
+</del>
+circular
+<del class="diff-old">manner.
+</del>
+<ins class="diff-chg">definitions
+are
+not
+allowed.
+</ins>
+That
+is,
+a
+definition
+of
+<em>
+term-1
+</em>
+<del class="diff-old">must
+not
+</del>
+<ins class="diff-chg">cannot
+</ins>
+depend
+on
+the
+definition
+of
+<em>
+term-2
+</em>
+if
+<em>
+term-2
+</em>
+also
+depends
+on
+<em>
+term-1
+</em>.
+For
+example,
+the
+following
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+definition
+is
+illegal:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 43</span>: Illegal circular definition of terms within a context</div><pre class="example">{
+ "@context":
+ {
+ <span class="diff">"term1": "term2:foo",
+ "term2": "term1:bar"</span>
+ },
+ ...
+}
+</pre>
+</div>
+</section>
+<section id="sets-and-lists">
+<h3>
+<span class="secno">
+<del class="diff-old">4.9
+</del>
+<ins class="diff-chg">6.9
+</ins>
+</span>
+Sets
+and
+Lists
+</h3>
+<p>
+A
+JSON-LD
+author
+can
+express
+multiple
+values
+in
+a
+compact
+way
+by
+using
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<del class="diff-old">array
+s.
+</del>
+<ins class="diff-chg">arrays
+</ins></a>.
+Since
+graphs
+do
+not
+describe
+ordering
+for
+links
+between
+nodes,
+arrays
+in
+JSON-LD
+do
+not
+provide
+an
+ordering
+of
+the
+contained
+elements
+by
+default.
+This
+is
+exactly
+the
+opposite
+from
+regular
+JSON
+arrays,
+which
+are
+ordered
+by
+default.
+For
+example,
+consider
+the
+following
+simple
+document:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 44</span>: Multiple values with no inherent order</div><pre class="example">{
+...
+ "@id": "http://example.org/people#joebob",
+ "nick": <span class="diff">[ "joe", "bob", "jaybee" ]</span>,
+...
+}
+</pre>
+</div>
+<p>
+The
+markup
+shown
+above
+would
+result
+in
+the
+following
+data
+being
+generated,
+each
+relating
+the
+node
+to
+an
+individual
+value,
+with
+no
+inherent
+order:
+</p>
+<table class="example">
+<thead>
+<tr>
+<th>
+Subject
+</th>
+<th>
+Property
+</th>
+<th>
+Object
+</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>
+http://example.org/people#joebob
+</td>
+<td>
+http://xmlns.com/foaf/0.1/nick
+</td>
+<td>
+joe
+</td>
+</tr>
+<tr>
+<td>
+http://example.org/people#joebob
+</td>
+<td>
+http://xmlns.com/foaf/0.1/nick
+</td>
+<td>
+bob
+</td>
+</tr>
+<tr>
+<td>
+http://example.org/people#joebob
+</td>
+<td>
+http://xmlns.com/foaf/0.1/nick
+</td>
+<td>
+jaybee
+</td>
+</tr>
+</tbody>
+</table>
+<p>
+Multiple
+values
+may
+also
+be
+expressed
+using
+the
+expanded
+form:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 45</span>: Using an expanded form to set multiple values</div><pre class="example">{
+ "@id": "http://example.org/articles/8",
+ "dc:title": <span class="diff">
+ [
+ {
+ "@value": "Das Kapital",
+ "@language": "de"
+ },
+ {
+ "@value": "Capital",
+ "@language": "en"
+ }
+ ]</span>
+}
+</pre>
+</div>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+data,
+again
+with
+no
+inherent
+order:
+</p>
+<table class="example">
+<thead>
+<tr>
+<th>
+Subject
+</th>
+<th>
+Property
+</th>
+<th>
+Object
+</th>
+<th>
+Language
+</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>
+http://example.org/articles/8
+</td>
+<td>
+http://purl.org/dc/terms/title
+</td>
+<td>
+Das
+Kapital
+</td>
+<td>
+de
+</td>
+</tr>
+<tr>
+<td>
+http://example.org/articles/8
+</td>
+<td>
+http://purl.org/dc/terms/title
+</td>
+<td>
+Capital
+</td>
+<td>
+en
+</td>
+</tr>
+</tbody>
+</table>
+<p>
+As
+the
+notion
+of
+ordered
+collections
+is
+rather
+important
+in
+data
+modeling,
+it
+is
+useful
+to
+have
+specific
+language
+support.
+In
+JSON-LD,
+a
+list
+may
+be
+represented
+using
+the
+<code>
+@list
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+as
+follows:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 46</span>: An ordered collection of values in JSON-LD</div><pre class="example">{
+...
+ "@id": "http://example.org/people#joebob",
+ "foaf:nick":
+ <span class="diff">{
+ "@list": [ "joe", "bob", "jaybee" ]
+ }</span>,
+...
+}
+</pre>
+</div>
+<p>
+This
+describes
+the
+use
+of
+this
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+as
+being
+ordered,
+and
+order
+is
+maintained
+when
+processing
+a
+document.
+If
+every
+use
+of
+a
+given
+multi-valued
+property
+is
+a
+list,
+this
+may
+be
+abbreviated
+by
+setting
+<code>
+@container
+</code>
+to
+<code>
+@list
+</code>
+in
+the
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 47</span>: Specifying that a collection is ordered in the context</div><pre class="example">{
+ <span class="diff">"@context":
+ {
+ ...
+ "nick":
+ {
+ "@id": "http://xmlns.com/foaf/0.1/nick",
+ "@container": "@list"
+ }
+ }</span>,
+...
+ "@id": "http://example.org/people#joebob",
+ "nick": <span class="diff">[ "joe", "bob", "jaybee" ]</span>,
+...
+}
+</pre>
+</div>
+<div class="note">
+<div class="note-title">
+<span>
+Note
+</span>
+</div>
+<p class="">
+List
+of
+lists
+are
+not
+allowed
+in
+this
+version
+of
+JSON-LD.
+<del class="diff-old">If
+a
+list
+of
+lists
+is
+detected,
+a
+JSON-LD
+processor
+will
+throw
+an
+exception.
+</del>
+This
+decision
+was
+made
+due
+to
+the
+extreme
+amount
+of
+added
+complexity
+when
+processing
+lists
+of
+lists.
+</p>
+</div>
+<p>
+Similarly
+to
+<code>
+@list
+</code>,
+there
+exists
+the
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+<code>
+@set
+</code>
+to
+describe
+unordered
+sets.
+While
+its
+use
+in
+the
+body
+of
+a
+JSON-LD
+document
+represents
+just
+syntactic
+sugar
+<del class="diff-old">that
+must
+be
+</del>
+optimized
+away
+when
+processing
+the
+document,
+it
+is
+very
+helpful
+when
+used
+within
+the
+context
+of
+a
+document.
+Values
+of
+terms
+associated
+with
+a
+<code>
+@set
+</code>
+or
+<code>
+@list
+</code>
+container
+are
+always
+represented
+in
+the
+form
+of
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+-
+even
+if
+there
+is
+just
+a
+single
+value
+that
+would
+otherwise
+be
+optimized
+to
+a
+non-array
+form
+in
+a
+<a href="#compact-document-form" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.15
+</del>
+<ins class="diff-chg">6.17
+</ins>
+</span>
+<span class="sec-title">
+Compact
+Document
+Form
+</span>
+</a>.
+This
+makes
+post-processing
+of
+the
+data
+easier
+as
+the
+data
+is
+always
+in
+array
+form,
+even
+if
+the
+array
+only
+contains
+a
+single
+value.
+</p>
+<div class="note">
+<div class="note-title">
+<span>
+Note
+</span>
+</div>
+<p class="">
+The
+use
+of
+<code>
+@container
+</code>
+in
+the
+body
+of
+a
+JSON-LD
+<del class="diff-old">document,
+i.e.,
+outside
+@context
+must
+be
+ignored
+</del>
+<ins class="diff-chg">document
+has
+no
+meaning
+and
+is
+not
+allowed
+</ins>
+by
+<ins class="diff-new">the
+</ins>
+JSON-LD
+<del class="diff-old">processors.
+</del>
+<ins class="diff-chg">grammar
+(see
+</ins><a href="#json-ld-grammar" class="sec-ref"><span class="secno"><ins class="diff-chg">
+B.
+</ins></span><span class="sec-title"><ins class="diff-chg">
+JSON-LD
+Grammar
+</ins></span></a><ins class="diff-chg">
+).
+</ins>
+</p>
+</div>
+</section>
+<section id="embedding">
+<h3>
+<span class="secno">
+<del class="diff-old">4.10
+</del>
+<ins class="diff-chg">6.10
+</ins>
+</span>
+Embedding
+</h3>
+<p>
+<dfn title="embedding" id="dfn-embedding">
+Embedding
+</dfn>
+is
+a
+JSON-LD
+feature
+that
+allows
+an
+author
+to
+use
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definitions
+</del>
+<ins class="diff-chg">objects
+</ins>
+</a>
+as
+<a class="tref internalDFN" title="property" href="#dfn-property">
+property
+</a>
+values.
+This
+is
+a
+commonly
+used
+mechanism
+for
+creating
+a
+parent-child
+relationship
+between
+two
+<a class="tref internalDFN" title="node" href="#dfn-node">
+<del class="diff-old">node
+s.
+</del>
+<ins class="diff-chg">nodes
+</ins></a>.
+</p>
+<p>
+The
+example
+shows
+two
+nodes
+related
+by
+a
+property
+from
+the
+first
+node:
+</p>
+<del class="diff-old"> {
+</del>
+ <div class="example"><div class="example-title"><span>Example 48</span>: Embedding a node object as property value of another node object</div><pre class="example">{
+...
+ "name": "Manu Sporny",
+ "<span class="diff">knows</span>":
+ {
+ "<span class="diff">@type</span>": "<span class="diff">Person</span>",
+ "<span class="diff">name</span>": "<span class="diff">Gregg Kellogg</span>",
+ }
+...
+}
+</pre>
+</div>
+<p>
+A
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definition
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>,
+like
+the
+one
+used
+above,
+may
+be
+used
+in
+any
+value
+position
+in
+the
+body
+of
+a
+JSON-LD
+document.
+</p>
+</section>
+<section id="named-graphs">
+<h3>
+<span class="secno">
+<del class="diff-old">4.11
+</del>
+<ins class="diff-chg">6.11
+</ins>
+</span>
+Named
+Graphs
+</h3>
+<p>
+<del class="diff-old">The
+@graph
+keyword
+</del>
+<ins class="diff-chg">At
+times,
+it
+</ins>
+is
+<del class="diff-old">used
+</del>
+<ins class="diff-chg">necessary
+</ins>
+to
+<del class="diff-old">express
+</del>
+<ins class="diff-chg">make
+statements
+about
+</ins>
+a
+<del class="diff-old">set
+of
+</del>
+<a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">
+JSON-LD
+<del class="diff-old">node
+definition
+</del>
+<ins class="diff-chg">graph
+</ins>
+</a>
+<del class="diff-old">s
+that
+may
+not
+be
+directly
+related
+to
+one
+another
+through
+</del>
+<ins class="diff-chg">itself,
+rather
+than
+just
+</ins>
+a
+<del class="diff-old">property.
+The
+mechanism
+may
+also
+be
+used
+where
+embedding
+is
+not
+desirable
+to
+the
+application.
+For
+example:
+ {
+ "@context": ...,
+ "":
+ [
+ {
+ "@id": "http://manu.sporny.org/i/public",
+ "@type": "foaf:Person",
+ "name": "Manu Sporny",
+ "knows": "http://greggkellogg.net/foaf#me"
+ },
+ {
+ "@id": "http://greggkellogg.net/foaf#me",
+ "@type": "foaf:Person",
+ "name": "Gregg Kellogg",
+ "knows": "http://manu.sporny.org/i/public"
+ }
+ ]
+}
+In
+this
+case,
+embedding
+doesn't
+work
+as
+each
+</del>
+<ins class="diff-chg">single
+</ins><a class="tref internalDFN" title="node" href="#dfn-node">
+node
+<del class="diff-old">definition
+references
+the
+other.
+Using
+the
+@graph
+keyword
+allows
+multiple
+resources
+to
+be
+defined
+within
+an
+array
+,
+and
+allows
+the
+use
+of
+a
+shared
+context
+</del>
+</a>.
+<del class="diff-old">When
+used
+in
+</del>
+<ins class="diff-chg">This
+can
+be
+done
+by
+grouping
+</ins>
+a
+<del class="diff-old">JSON
+object
+</del>
+<ins class="diff-chg">set
+of
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-chg">
+nodes
+</ins>
+</a>
+<del class="diff-old">that
+is
+not
+otherwise
+a
+node
+definition
+,
+this
+describes
+resources
+in
+the
+default
+graph
+.
+This
+is
+equivalent
+to
+</del>
+using
+<del class="diff-old">multiple
+node
+definitions
+in
+array
+and
+defining
+</del>
+the
+<code>
+<del class="diff-old">@context
+within
+each
+node
+definition
+:
+
+ {
+
+ "@id": "http://manu.sporny.org/i/public",
+ "@type": "foaf:Person",
+ "name": "Manu Sporny",
+ "knows": "http://greggkellogg.net/foaf#me"
+ },
+ {
+
+ "@id": "http://greggkellogg.net/foaf#me",
+ "@type": "foaf:Person",
+ "name": "Gregg Kellogg",
+ "knows": "http://manu.sporny.org/i/public"
+ }
+]
+JSON-LD
+allows
+you
+to
+name
+things
+on
+the
+Web
+by
+assigning
+an
+@id
+</del>
+<ins class="diff-chg">@graph
+</ins>
+</code>
+<del class="diff-old">to
+them,
+which
+is
+typically
+an
+IRI
+</del>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+<ins class="diff-chg">keyword
+</ins>
+</a>.
+<del class="diff-old">This
+notion
+extends
+to
+the
+ability
+to
+identify
+graphs
+in
+the
+same
+manner.
+</del>
+A
+developer
+may
+<ins class="diff-new">also
+</ins>
+name
+data
+expressed
+using
+the
+<code>
+@graph
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+by
+pairing
+it
+with
+an
+<code>
+@id
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+<del class="diff-old">.
+This
+enables
+the
+developer
+to
+make
+statements
+about
+a
+linked
+data
+graph
+</del>
+</a>
+<del class="diff-old">itself,
+rather
+than
+just
+a
+single
+node
+.
+</del>
+<ins class="diff-chg">as
+shown
+in
+the
+following
+example:
+</ins>
+</p>
+<del class="diff-old"> {
+</del>
+ <div class="example"><div class="example-title"><span>Example 49</span>: Identifying and making statements about a graph</div><pre class="example">{
+ "@context": {
+<del class="diff-old"> "asOf": "http://purl.org/net/provenance/ns#accessedResource",
+</del>
+<ins class="diff-chg"> "generatedAt": "http://www.w3.org/ns/prov#generatedAtTime",
+</ins>
+ "Person": "http://xmlns.com/foaf/0.1/Person",
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "knows": "http://xmlns.com/foaf/0.1/knows",
+ "xsd": "http://www.w3.org/2001/XMLSchema#"
+ },
+ <span class="diff">"@id": "http://example.org/graphs/73",
+<del class="diff-old"> "asOf": { "@value": "2012-04-09", "@type": "xsd:date" },
+</del>
+<ins class="diff-chg"> "generatedAt": { "@value": "2012-04-09", "@type": "xsd:date" },
+</ins>
+ "@graph":</span>
+ [
+ {
+ "@id": "http://manu.sporny.org/i/public",
+ "@type": "Person",
+ "name": "Manu Sporny",
+ "knows": "http://greggkellogg.net/foaf#me"
+ },
+ {
+ "@id": "http://greggkellogg.net/foaf#me",
+ "@type": "Person",
+ "name": "Gregg Kellogg",
+ "knows": "http://manu.sporny.org/i/public"
+ }
+ ]
+}
+</pre>
+</div>
+<p>
+The
+example
+above
+expresses
+a
+<em>
+named
+</em>
+<del class="diff-old">linked
+data
+</del>
+<a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">
+<ins class="diff-chg">JSON-LD
+</ins>
+graph
+</a>
+that
+is
+identified
+by
+the
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+<code>
+http://example.org/graphs/73
+</code>.
+That
+graph
+is
+composed
+of
+the
+statements
+about
+Manu
+and
+Gregg.
+Metadata
+about
+the
+graph
+itself
+is
+also
+expressed
+via
+the
+<code>
+<del class="diff-old">asOf
+</del>
+<ins class="diff-chg">generatedAt
+</ins>
+</code>
+property,
+which
+specifies
+when
+the
+<del class="diff-old">information
+</del>
+<ins class="diff-chg">graph
+</ins>
+was
+<del class="diff-old">retrieved
+from
+the
+Web.
+</del>
+<ins class="diff-chg">generated.
+</ins>
+An
+alternative
+view
+of
+the
+information
+above
+is
+represented
+in
+table
+form
+below:
+</p>
+<table class="example">
+<thead>
+<tr>
+<th>
+Graph
+</th>
+<th>
+Subject
+</th>
+<th>
+Property
+</th>
+<th>
+Object
+</th>
+<th>
+Datatype
+</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>
+http://example.org/graphs/73
+</td>
+<td>
+http://example.org/graphs/73
+</td>
+<td>
+<del class="diff-old">http://purl.org/net/provenance/ns#accessedResource
+</del>
+<ins class="diff-chg">http://www.w3.org/ns/prov#generatedAtTime
+</ins>
+</td>
+<td>
+2012-04-09
+</td>
+<td>
+http://www.w3.org/2001/XMLSchema#date
+</td>
+</tr>
+<tr>
+<td>
+http://example.org/graphs/73
+</td>
+<td>
+http://manu.sporny.org/i/public
+</td>
+<td>
+http://www.w3.org/2001/XMLSchema#type
+</td>
+<td>
+http://xmlns.com/foaf/0.1/Person
+</td>
+<td>
+</td>
+</tr>
+<tr>
+<td>
+http://example.org/graphs/73
+</td>
+<td>
+http://manu.sporny.org/i/public
+</td>
+<td>
+http://xmlns.com/foaf/0.1/name
+</td>
+<td>
+Manu
+Sporny
+</td>
+<td>
+</td>
+</tr>
+<tr>
+<td>
+http://example.org/graphs/73
+</td>
+<td>
+http://manu.sporny.org/i/public
+</td>
+<td>
+http://xmlns.com/foaf/0.1/knows
+</td>
+<td>
+http://greggkellogg.net/foaf#me
+</td>
+<td>
+</td>
+</tr>
+<tr>
+<td>
+http://example.org/graphs/73
+</td>
+<td>
+http://greggkellogg.net/foaf#me
+</td>
+<td>
+http://www.w3.org/2001/XMLSchema#type
+</td>
+<td>
+http://xmlns.com/foaf/0.1/Person
+</td>
+<td>
+</td>
+</tr>
+<tr>
+<td>
+http://example.org/graphs/73
+</td>
+<td>
+http://greggkellogg.net/foaf#me
+</td>
+<td>
+http://xmlns.com/foaf/0.1/name
+</td>
+<td>
+Gregg
+Kellogg
+</td>
+<td>
+</td>
+</tr>
+<tr>
+<td>
+http://example.org/graphs/73
+</td>
+<td>
+http://greggkellogg.net/foaf#me
+</td>
+<td>
+http://xmlns.com/foaf/0.1/knows
+</td>
+<td>
+http://manu.sporny.org/i/public
+</td>
+<td>
+</td>
+</tr>
+</tbody>
+</table>
+<p>
+<ins class="diff-new">When
+</ins><code><ins class="diff-new">
+@graph
+</ins></code><ins class="diff-new">
+is
+used
+in
+a
+document's
+top-level
+object
+which
+has
+no
+other
+</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-new">
+properties
+</ins></a><ins class="diff-new">
+that
+are
+mapped
+to
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr></a><ins class="diff-new">
+or
+a
+</ins><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-new">
+keyword
+</ins></a><ins class="diff-new">
+it
+is
+considered
+to
+express
+the
+otherwise
+implicit
+default
+graph.
+This
+mechanism
+can
+be
+useful
+when
+a
+number
+of
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-new">
+nodes
+</ins></a><ins class="diff-new">
+thay
+may
+not
+directly
+relate
+to
+one
+another
+through
+a
+property
+or
+where
+</ins><a class="tref internalDFN" title="embedding" href="#dfn-embedding"><ins class="diff-new">
+embedding
+</ins></a><ins class="diff-new">
+is
+not
+desirable
+to
+the
+application.
+For
+example:
+</ins></p> <div class="example"><div class="example-title"><span>Example 50</span>: Using @graph to explicitly express the default graph</div><pre class="example">{<ins class="diff-new">
+ "@context": ...,
+ "<span class="diff">@graph</span>":
+ [
+ {
+ "@id": "http://manu.sporny.org/i/public",
+ "@type": "foaf:Person",
+ "name": "Manu Sporny",
+ "knows": "http://greggkellogg.net/foaf#me"
+ },
+ {
+ "@id": "http://greggkellogg.net/foaf#me",
+ "@type": "foaf:Person",
+ "name": "Gregg Kellogg",
+ "knows": "http://manu.sporny.org/i/public"
+ }
+ ]
+}
+</ins></pre></div><p><ins class="diff-new">
+In
+this
+case,
+embedding
+doesn't
+work
+as
+each
+</ins><a class="tref internalDFN" title="node_object" href="#dfn-node_object"><ins class="diff-new">
+node
+object
+</ins></a><ins class="diff-new">
+references
+the
+other.
+Using
+the
+</ins><code><ins class="diff-new">
+@graph
+</ins></code><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-new">
+keyword
+</ins></a><ins class="diff-new">
+allows
+multiple
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-new">
+nodes
+</ins></a><ins class="diff-new">
+to
+be
+defined
+within
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-new">
+array
+</ins></a>,<ins class="diff-new">
+and
+allows
+the
+use
+of
+a
+shared
+</ins><a class="tref internalDFN" title="context" href="#dfn-context"><ins class="diff-new">
+context
+</ins></a>.<ins class="diff-new">
+This
+is
+equivalent
+to
+using
+multiple
+</ins><a class="tref internalDFN" title="node_object" href="#dfn-node_object"><ins class="diff-new">
+node
+objects
+</ins></a><ins class="diff-new">
+in
+array
+and
+defining
+the
+</ins><code><ins class="diff-new">
+@context
+</ins></code><ins class="diff-new">
+within
+each
+</ins><a class="tref internalDFN" title="node_object" href="#dfn-node_object"><ins class="diff-new">
+node
+object
+</ins></a>:</p> <div class="example"><div class="example-title"><span>Example 51</span>: Context needs to be duplicated if @graph is not used</div><pre class="example">[<ins class="diff-new">
+ {
+</ins> <span class="diff">"@context": ...,</span><ins class="diff-new">
+ "@id": "http://manu.sporny.org/i/public",
+ "@type": "foaf:Person",
+ "name": "Manu Sporny",
+ "knows": "http://greggkellogg.net/foaf#me"
+ },
+ {
+</ins> <span class="diff">"@context": ...,</span><ins class="diff-new">
+ "@id": "http://greggkellogg.net/foaf#me",
+ "@type": "foaf:Person",
+ "name": "Gregg Kellogg",
+ "knows": "http://manu.sporny.org/i/public"
+ }
+]
+</ins></pre></div>
+</section>
+<section id="identifying-blank-nodes">
+<h3>
+<span class="secno">
+<del class="diff-old">4.12
+</del>
+<ins class="diff-chg">6.12
+</ins>
+</span>
+Identifying
+<del class="diff-old">Unlabeled
+</del>
+<ins class="diff-chg">Blank
+</ins>
+Nodes
+</h3>
+<p>
+At
+times,
+it
+becomes
+necessary
+to
+be
+able
+to
+express
+information
+without
+being
+able
+to
+specify
+the
+node.
+<del class="diff-old">Typically,
+this
+</del>
+<ins class="diff-chg">This
+</ins>
+type
+of
+node
+is
+called
+<del class="diff-old">an
+unlabeled
+node
+or
+</del>
+a
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+<del class="diff-old">(see
+[
+RDF-CONCEPTS
+</del>
+</a>
+<del class="diff-old">]
+</del>
+<ins class="diff-chg">(see
+</ins>
+<cite>
+<a href="http://www.w3.org/TR/rdf11-concepts/#section-blank-nodes">
+Section
+3.4:
+Blank
+Nodes
+</a>
+</cite>
+<del class="diff-old">).
+</del>
+<ins class="diff-chg">of
+[
+</ins><cite><a class="bibref" href="#bib-RDF-CONCEPTS"><ins class="diff-chg">
+RDF-CONCEPTS
+</ins></a></cite><ins class="diff-chg">
+]).
+</ins>
+In
+JSON-LD,
+<del class="diff-old">unlabeled
+</del>
+<a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">
+<ins class="diff-chg">blank
+</ins>
+node
+identifiers
+</a>
+are
+automatically
+created
+if
+a
+node
+is
+not
+specified
+using
+the
+<code>
+@id
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>.
+However,
+authors
+may
+provide
+identifiers
+for
+<del class="diff-old">unlabeled
+</del>
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+<ins class="diff-chg">blank
+</ins>
+nodes
+</a>
+by
+using
+the
+special
+<code>
+_
+</code>
+(underscore)
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>.
+This
+allows
+one
+to
+reference
+the
+node
+locally
+within
+the
+document,
+but
+makes
+it
+impossible
+to
+reference
+the
+node
+from
+an
+external
+document.
+The
+<del class="diff-old">unlabeled
+</del>
+<a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">
+<ins class="diff-chg">blank
+</ins>
+node
+identifier
+</a>
+is
+scoped
+to
+the
+document
+in
+which
+it
+is
+used.
+</p>
+<del class="diff-old">{
+</del>
+ <div class="example"><div class="example-title"><span>Example 52</span>: Specifying a local blank node identifier</div><pre class="example">{
+...
+ "@id": "<span class="diff">_:foo</span>",
+...
+}
+</pre>
+</div>
+<p>
+The
+example
+above
+would
+set
+the
+node
+to
+<code>
+_:foo
+</code>,
+which
+can
+then
+be
+used
+elsewhere
+in
+the
+JSON-LD
+document
+to
+refer
+back
+to
+the
+<del class="diff-old">unlabeled
+</del>
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+<ins class="diff-chg">blank
+</ins>
+node
+</a>.
+If
+a
+developer
+finds
+that
+they
+refer
+to
+the
+<del class="diff-old">unlabeled
+</del>
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+<ins class="diff-chg">blank
+</ins>
+node
+</a>
+more
+than
+once,
+they
+should
+consider
+naming
+the
+node
+using
+a
+<del class="diff-old">de-referenceable
+</del>
+<ins class="diff-chg">dereferenceable
+</ins>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+so
+that
+it
+can
+<ins class="diff-new">also
+</ins>
+be
+referenced
+<del class="diff-old">also
+</del>
+from
+other
+documents.
+</p>
+</section>
+<section id="aliasing-keywords">
+<h3>
+<span class="secno">
+<del class="diff-old">4.13
+</del>
+<ins class="diff-chg">6.13
+</ins>
+</span>
+Aliasing
+Keywords
+</h3>
+<p>
+Each
+of
+the
+JSON-LD
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keywords
+</a>,
+except
+for
+<code>
+@context
+</code>,
+may
+be
+aliased
+to
+application-specific
+keywords.
+This
+feature
+allows
+legacy
+JSON
+content
+to
+be
+utilized
+by
+JSON-LD
+by
+re-using
+JSON
+keys
+that
+already
+exist
+in
+legacy
+documents.
+This
+feature
+also
+allows
+developers
+to
+design
+domain-specific
+implementations
+using
+only
+the
+JSON-LD
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>.
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 53</span>: Aliasing keywords</div><pre class="example">{
+ "@context":
+ {
+ <span class="diff">"url": "@id"</span>,
+ <span class="diff">"a": "@type"</span>,
+ "name": "http://schema.org/name"
+ },
+ "<span class="diff">url</span>": "http://example.com/about#gregg",
+ "<span class="diff">a</span>": "http://schema.org/Person",
+ "name": "Gregg Kellogg"
+}
+</pre>
+</div>
+<p>
+In
+the
+example
+above,
+the
+<code>
+@id
+</code>
+and
+<code>
+@type
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keywords
+</a>
+have
+been
+given
+the
+aliases
+<strong>
+url
+</strong>
+and
+<strong>
+a
+</strong>,
+respectively.
+</p>
+</section>
+<section id="data-annotations">
+<h3>
+<span class="secno">
+<ins class="diff-new">6.14
+</ins></span><ins class="diff-new">
+Data
+Annotations
+</ins></h3><p><ins class="diff-new">
+It
+is
+common
+for
+developers
+using
+JSON
+to
+organize
+their
+data
+in
+ways
+that
+makes
+working
+with
+the
+data
+more
+efficient.
+It
+is
+often
+that
+these
+methods
+of
+organizing
+data
+are
+not
+meant
+to
+express
+Linked
+Data,
+but
+should
+survive
+transformation
+by
+JSON-LD.
+For
+example,
+if
+a
+developer
+organizes
+employees
+in
+a
+JSON-LD
+document
+by
+a
+company-issued
+ID
+number,
+JSON-LD
+should
+not
+destroy
+that
+'database
+index'
+when
+transforming
+the
+data.
+Data
+annotations
+allow
+content
+that
+would
+otherwise
+be
+removed
+from
+a
+JSON-LD
+graph
+to
+be
+preserved
+by
+instructing
+the
+JSON-LD
+processor
+to
+syntactically
+preserve
+the
+annotation
+information
+and
+continue
+processing
+deeper
+into
+the
+JSON
+data
+structure.
+</ins></p><div class="example"><div class="example-title"><span>Example 54</span>: Data annotations</div><pre class="example">{<ins class="diff-new">
+ "@context":
+ {
+ "schema": "http://schema.org/",
+ "Article": "schema:Blog",
+ "name": "schema:name",
+ "articleBody": "schema:articleBody",
+ "wordCount": "schema:wordCount",
+ "commentCount": "http://example.com/schema/wordCount",
+ "blogPost": {
+ "@id": "schema:blogPost",
+</ins> <span class="diff">"@container": "@annotation"</span><ins class="diff-new">
+ },
+ "@id": "http://example.com/",
+ "@type": "Blog",
+ "name": "World Financial News",
+</ins> <span class="diff">"blogPost": {<ins class="diff-new">
+ "en": {
+ "@id": "http://example.com/posts/1/en",
+ "articleBody": "World commodities were up today with heavy trading of crude oil...",
+ "wordCount": 1539,
+ "commentCount": 64
+ },
+ "de": {
+ "@id": "http://example.com/posts/1/de",
+ "articleBody": "Welt Rohstoffe waren bis heute mit schweren Handel mit Rohöl...",
+ "wordCount": 1204,
+ "commentCount": 23
+ }</span>
+ }
+}
+</ins></pre></div><p><ins class="diff-new">
+In
+the
+example
+above,
+the
+</ins><strong><ins class="diff-new">
+blogPost
+</ins></strong><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a><ins class="diff-new">
+has
+been
+marked
+as
+a
+</ins><em><ins class="diff-new">
+data
+annotation
+container
+</ins></em>.<ins class="diff-new">
+The
+</ins><strong><ins class="diff-new">
+en
+</ins></strong>,<strong><ins class="diff-new">
+de
+</ins></strong>,<ins class="diff-new">
+and
+</ins><strong><ins class="diff-new">
+ja
+</ins></strong><ins class="diff-new">
+keys
+will
+effectively
+be
+ignored
+semantically,
+but
+preserved
+syntactically,
+by
+the
+JSON-LD
+Processor
+as
+</ins><em><ins class="diff-new">
+annotations
+</ins></em>.<ins class="diff-new">
+The
+interpretation
+of
+the
+data
+above
+is
+expressed
+in
+the
+table
+below.
+Note
+how
+the
+annotations
+do
+not
+appear
+in
+the
+Linked
+Data
+below,
+but
+would
+continue
+to
+exist
+if
+the
+document
+were
+compacted
+or
+expanded
+using
+a
+JSON-LD
+processor:
+</ins></p><table class="example"><thead><tr><th><ins class="diff-new">
+Subject
+</ins></th><th><ins class="diff-new">
+Property
+</ins></th><th><ins class="diff-new">
+Object
+</ins></th><th><ins class="diff-new">
+Datatype
+</ins></th></tr></thead><tbody><tr><td><ins class="diff-new">
+http://example.com/
+</ins></td><td><ins class="diff-new">
+http://www.w3.org/1999/02/22-rdf-syntax-ns#type
+</ins></td><td><ins class="diff-new">
+http://schema.org/Blog
+</ins></td><td></td></tr><tr><td><ins class="diff-new">
+http://example.com/
+</ins></td><td><ins class="diff-new">
+http://schema.org/name
+</ins></td><td><ins class="diff-new">
+World
+Financial
+News
+</ins></td><td></td></tr><tr><td><ins class="diff-new">
+http://example.com/
+</ins></td><td><ins class="diff-new">
+http://schema.org/blogPost
+</ins></td><td><ins class="diff-new">
+http://example.com/posts/1/en
+</ins></td><td></td></tr><tr><td><ins class="diff-new">
+http://example.com/
+</ins></td><td><ins class="diff-new">
+http://schema.org/blogPost
+</ins></td><td><ins class="diff-new">
+http://example.com/posts/1/de
+</ins></td><td></td></tr><tr><td><ins class="diff-new">
+http://example.com/posts/1/en
+</ins></td><td><ins class="diff-new">
+http://schema.org/articleBody
+</ins></td><td><ins class="diff-new">
+World
+commodities
+were
+up
+today
+with
+heavy
+trading
+of
+crude
+oil...
+</ins></td><td></td></tr><tr><td><ins class="diff-new">
+http://example.com/posts/1/en
+</ins></td><td><ins class="diff-new">
+http://schema.org/wordCount
+</ins></td><td><ins class="diff-new">
+1539
+</ins></td><td><ins class="diff-new">
+http://www.w3.org/2001/XMLSchema#integer
+</ins></td></tr><tr><td><ins class="diff-new">
+http://example.com/posts/1/en
+</ins></td><td><ins class="diff-new">
+http://example.com/schema/commentCount
+</ins></td><td><ins class="diff-new">
+64
+</ins></td><td><ins class="diff-new">
+http://www.w3.org/2001/XMLSchema#integer
+</ins></td></tr><tr><td><ins class="diff-new">
+http://example.com/posts/1/de
+</ins></td><td><ins class="diff-new">
+http://schema.org/articleBody
+</ins></td><td><ins class="diff-new">
+Welt
+Rohstoffe
+waren
+bis
+heute
+mit
+schweren
+Handel
+mit
+Rohöl...
+</ins></td><td></td></tr><tr><td><ins class="diff-new">
+http://example.com/posts/1/de
+</ins></td><td><ins class="diff-new">
+http://schema.org/wordCount
+</ins></td><td><ins class="diff-new">
+1204
+</ins></td><td><ins class="diff-new">
+http://www.w3.org/2001/XMLSchema#integer
+</ins></td></tr><tr><td><ins class="diff-new">
+http://example.com/posts/1/de
+</ins></td><td><ins class="diff-new">
+http://example.com/schema/commentCount
+</ins></td><td><ins class="diff-new">
+23
+</ins></td><td><ins class="diff-new">
+http://www.w3.org/2001/XMLSchema#integer
+</ins></td></tr></tbody></table></section><section id="explicitly-ignoring-data"><h3><span class="secno"><ins class="diff-new">
+6.15
+</ins></span><ins class="diff-new">
+Explicitly
+Ignoring
+Data
+</ins></h3><p><ins class="diff-new">
+At
+times,
+it
+becomes
+necessary
+to
+explicitly
+ignore
+data
+expressed
+in
+JSON
+documents
+because
+it
+has
+no
+semantic
+meaning.
+For
+example,
+when
+the
+</ins><code><ins class="diff-new">
+@vocab
+</ins></code><ins class="diff-new">
+keyword
+is
+used,
+every
+key
+in
+a
+JSON-LD
+object
+is
+appended
+to
+the
+vocabulary
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr></a>.<ins class="diff-new">
+The
+author
+may
+not
+want
+that
+behavior
+to
+apply
+to
+every
+key,
+and
+it
+may
+be
+easier
+to
+specify
+just
+the
+keys
+that
+they
+want
+the
+JSON-LD
+processor
+to
+ignore.
+For
+this
+purpose,
+an
+author
+may
+associate
+the
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-new">
+null
+</ins></a><ins class="diff-new">
+keyword
+with
+a
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a><ins class="diff-new">
+in
+the
+JSON-LD
+Context.
+</ins></p><div class="example"><div class="example-title"><span>Example 55</span>: Using the null keyword to ignore data</div><pre class="example">{<ins class="diff-new">
+ "@context":
+ {
+ "@vocab": "http://schema.org/",
+</ins> <span class="diff">"databaseId": null</span><ins class="diff-new">
+ },
+ "name": "Manu Sporny",
+ "description": "That guy",
+ "gender": "Male",
+</ins> <span class="diff">"databaseId": "23987520"</span><ins class="diff-new">
+}
+</ins></pre></div><p><ins class="diff-new">
+In
+the
+example
+above,
+the
+author
+has
+used
+</ins><code><ins class="diff-new">
+@vocab
+</ins></code><ins class="diff-new">
+as
+the
+base
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+for
+all
+terms
+in
+the
+document,
+but
+has
+expressed
+that
+the
+</ins><code><ins class="diff-new">
+databaseId
+</ins></code><ins class="diff-new">
+value
+should
+not
+be
+processed
+by
+the
+JSON-LD
+processor
+by
+associating
+it
+with
+the
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-new">
+null
+</ins></a><ins class="diff-new">
+keyword
+in
+the
+JSON-LD
+Context.
+</ins></p></section>
+<section id="expanded-document-form">
+<h3>
+<span class="secno">
+<del class="diff-old">4.14
+</del>
+<ins class="diff-chg">6.16
+</ins>
+</span>
+Expanded
+Document
+Form
+</h3>
+<p>
+The
+JSON-LD
+API
+[
+<cite>
+<a class="bibref" href="#bib-JSON-LD-API">
+JSON-LD-API
+</a>
+</cite>
+]
+defines
+an
+method
+for
+<em>
+expanding
+</em>
+a
+JSON-LD
+document.
+Expansion
+is
+the
+process
+of
+taking
+a
+JSON-LD
+document
+and
+applying
+a
+<code>
+@context
+</code>
+such
+that
+all
+IRIs,
+types,
+and
+values
+are
+expanded
+so
+that
+the
+<code>
+@context
+</code>
+is
+no
+longer
+necessary.
+</p>
+<p>
+For
+example,
+assume
+the
+following
+JSON-LD
+input
+document:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 56</span>: Sample JSON-LD document</div><pre class="example">{
+ "@context":
+ {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ },
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/"
+}
+</pre>
+</div>
+<p>
+Running
+the
+JSON-LD
+Expansion
+algorithm
+against
+the
+JSON-LD
+input
+document
+provided
+above
+would
+result
+in
+the
+following
+output:
+</p>
+<del class="diff-old">[
+</del>
+<div class="example"><div class="example-title"><span>Example 57</span>: Expanded form for the previous example</div><pre class="example">[
+ {
+ "http://xmlns.com/foaf/0.1/name": [
+ { "@value": "Manu Sporny" }
+ ],
+ "http://xmlns.com/foaf/0.1/homepage": [
+ { "@id": "http://manu.sporny.org/" }
+ ]
+ }
+]
+</pre>
+</div>
+<p>
+Expanded
+document
+form
+is
+useful
+when
+an
+application
+has
+to
+process
+input
+data
+in
+a
+deterministic
+form.
+It
+has
+been
+optimized
+to
+ensure
+that
+the
+code
+that
+developers
+have
+to
+write
+is
+minimized
+compared
+to
+the
+code
+that
+would
+have
+to
+be
+written
+to
+operate
+on
+<a href="#compact-document-form" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.15
+</del>
+<ins class="diff-chg">6.17
+</ins>
+</span>
+<span class="sec-title">
+Compact
+Document
+Form
+</span>
+</a>.
+</p>
+</section>
+<section id="compact-document-form">
+<h3>
+<span class="secno">
+<del class="diff-old">4.15
+</del>
+<ins class="diff-chg">6.17
+</ins>
+</span>
+Compact
+Document
+Form
+</h3>
+<p>
+The
+JSON-LD
+API
+[
+<cite>
+<a class="bibref" href="#bib-JSON-LD-API">
+JSON-LD-API
+</a>
+</cite>
+]
+defines
+a
+method
+for
+<em>
+compacting
+</em>
+a
+JSON-LD
+document.
+Compaction
+is
+the
+process
+of
+taking
+a
+JSON-LD
+document
+and
+applying
+a
+context
+such
+that
+the
+most
+compact
+form
+of
+the
+document
+is
+generated.
+JSON
+is
+typically
+expressed
+in
+a
+very
+compact,
+key-value
+format.
+That
+is,
+full
+IRIs
+are
+rarely
+used
+as
+keys.
+At
+times,
+a
+JSON-LD
+document
+may
+be
+received
+that
+is
+not
+in
+its
+most
+compact
+form.
+JSON-LD,
+via
+the
+API,
+provides
+a
+way
+to
+compact
+a
+JSON-LD
+document.
+</p>
+<p>
+For
+example,
+assume
+the
+following
+JSON-LD
+input
+document:
+</p>
+<del class="diff-old">[
+</del>
+<div class="example"><div class="example-title"><span>Example 58</span>: Sample expanded JSON-LD document</div><pre class="example">[
+ {
+ "http://xmlns.com/foaf/0.1/name": [ "Manu Sporny" ],
+ "http://xmlns.com/foaf/0.1/homepage": [
+ {
+ "@id": "http://manu.sporny.org/"
+ }
+ ]
+ }
+]
+</pre>
+</div>
+<p>
+Additionally,
+assume
+the
+following
+developer-supplied
+JSON-LD
+context:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 59</span>: Sample context</div><pre class="example">{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ }
+}
+</pre>
+</div>
+<p>
+Running
+the
+JSON-LD
+Compaction
+algorithm
+given
+the
+context
+supplied
+above
+against
+the
+JSON-LD
+input
+document
+provided
+above
+would
+result
+in
+the
+following
+output:
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 60</span>: Compact form of the sample document once sample context has been applied</div><pre class="example">{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ },
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/"
+}
+</pre>
+</div>
+<p>
+The
+compaction
+algorithm
+enables
+a
+developer
+to
+map
+any
+document
+into
+an
+application-specific
+compacted
+form
+by
+first
+<a href="#expanded-document-form" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.14
+</del>
+<ins class="diff-chg">6.16
+</ins>
+</span>
+<span class="sec-title">
+Expanded
+Document
+Form
+</span>
+</a>.
+While
+the
+context
+provided
+above
+mapped
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>
+to
+<strong>
+name
+</strong>,
+it
+could
+have
+also
+mapped
+it
+to
+any
+arbitrary
+string
+provided
+by
+the
+developer.
+This
+powerful
+<del class="diff-old">mechanism,
+along
+with
+another
+JSON-LD
+API
+technique
+called
+framing
+,
+</del>
+<ins class="diff-chg">mechanism
+</ins>
+allows
+the
+developer
+to
+re-shape
+the
+incoming
+JSON
+data
+into
+a
+format
+that
+is
+optimized
+for
+their
+application.
+</p>
+</section>
+</section>
+<section class="appendix normative" id="data-model">
+<h2>
+<span class="secno">
+A.
+</span>
+<del class="diff-old">JSON-LD
+Grammar
+</del>
+<ins class="diff-chg">Data
+Model
+</ins>
+</h2>
+<del class="diff-old">This
+section
+is
+normative
+This
+section
+</del>
+<p>
+<ins class="diff-chg">JSON-LD
+</ins>
+is
+<del class="diff-old">an
+attempt
+to
+formalize
+</del>
+a
+<del class="diff-old">normative
+grammar
+</del>
+<ins class="diff-chg">serialization
+format
+</ins>
+for
+<del class="diff-old">JSON-LD.
+This
+appendix
+restates
+</del>
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+<ins class="diff-chg">Linked
+Data
+</ins></a><ins class="diff-chg">
+based
+on
+JSON.
+It
+is
+therefore
+important
+to
+distinguish
+between
+</ins>
+the
+<del class="diff-old">syntactic
+conventions
+described
+</del>
+<ins class="diff-chg">syntax,
+which
+is
+defined
+by
+JSON
+</ins>
+in
+<del class="diff-old">the
+previous
+sections
+more
+formally.
+</del>
+<ins class="diff-chg">[
+</ins><cite><a class="bibref" href="#bib-RFC4627"><ins class="diff-chg">
+RFC4627
+</ins></a></cite><ins class="diff-chg">
+],
+and
+</ins><dfn title="json-ld_data_model" id="dfn-json-ld_data_model"><ins class="diff-chg">
+JSON-LD's
+data
+model
+</ins></dfn><ins class="diff-chg">
+which
+is
+defined
+as
+follows:
+</ins>
+</p>
+<ul>
+<li>
+A
+<dfn title="json-ld_document" id="dfn-json-ld_document">
+JSON-LD
+<del class="diff-old">processor
+</del>
+<ins class="diff-chg">document
+</ins></dfn><ins class="diff-chg">
+serializes
+a
+collection
+of
+</ins><a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph"><ins class="diff-chg">
+JSON-LD
+graphs
+</ins></a><ins class="diff-chg">
+and
+comprises
+exactly
+one
+</ins><dfn title="default_graph" id="dfn-default_graph"><ins class="diff-chg">
+default
+graph
+</ins></dfn><ins class="diff-chg">
+and
+zero
+or
+more
+</ins><dfn title="named_graph" id="dfn-named_graph"><ins class="diff-chg">
+named
+graphs
+</ins></dfn>.</li><li><ins class="diff-chg">
+The
+default
+graph
+does
+not
+have
+a
+name
+and
+</ins><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em><ins class="diff-chg">
+be
+empty.
+</ins></li><li><ins class="diff-chg">
+Each
+named
+graph
+is
+a
+pair
+consisting
+of
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a><ins class="diff-chg">
+or
+</ins><a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-chg">
+blank
+node
+</ins></a><ins class="diff-chg">
+(the
+</ins><dfn title="graph_name" id="dfn-graph_name"><ins class="diff-chg">
+graph
+name
+</ins></dfn><ins class="diff-chg">
+)
+and
+a
+</ins><a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph"><ins class="diff-chg">
+JSON-LD
+graph
+</ins></a>.<ins class="diff-chg">
+Whenever
+possible,
+the
+</ins><a class="tref internalDFN" title="graph_name" href="#dfn-graph_name"><ins class="diff-chg">
+graph
+name
+</ins></a>
+<em class="rfc2119" title="should">
+should
+</em>
+<del class="diff-old">attempt
+to
+process
+non-conforming
+</del>
+<ins class="diff-chg">be
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a>.</li><li><ins class="diff-chg">
+A
+</ins><dfn title="json-ld_graph" id="dfn-json-ld_graph">
+JSON-LD
+<del class="diff-old">documents.
+Conformance
+violations
+</del>
+<ins class="diff-chg">graph
+</ins></dfn><ins class="diff-chg">
+is
+a
+labeled
+directed
+graph,
+i.e.,
+a
+set
+of
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-chg">
+nodes
+</ins></a><ins class="diff-chg">
+connected
+by
+</ins><a class="tref internalDFN" title="edge" href="#dfn-edge"><ins class="diff-chg">
+edges
+</ins></a>.</li><li><ins class="diff-chg">
+Every
+</ins><dfn title="edge" id="dfn-edge"><ins class="diff-chg">
+edge
+</ins></dfn><ins class="diff-chg">
+has
+a
+direction
+associated
+with
+it
+and
+is
+labeled
+with
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a><ins class="diff-chg">
+or
+a
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-chg">
+blank
+node
+identifier
+</ins></a>.<ins class="diff-chg">
+Within
+the
+JSON-LD
+syntax
+these
+edge
+labels
+are
+called
+</ins><dfn title="property" id="dfn-property"><ins class="diff-chg">
+properties
+</ins></dfn>.<ins class="diff-chg">
+Whenever
+possible,
+an
+</ins><a class="tref internalDFN" title="edge" href="#dfn-edge"><ins class="diff-chg">
+edge
+</ins></a><em class="rfc2119" title="should"><ins class="diff-chg">
+should
+</ins></em><ins class="diff-chg">
+be
+labeled
+with
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a>.</li><li><ins class="diff-chg">
+Every
+</ins><dfn title="node" id="dfn-node"><ins class="diff-chg">
+node
+</ins></dfn><ins class="diff-chg">
+is
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a>,<ins class="diff-chg">
+a
+</ins><a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-chg">
+blank
+node
+</ins></a>,<ins class="diff-chg">
+a
+</ins><a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value"><ins class="diff-chg">
+JSON-LD
+value
+</ins></a>,<ins class="diff-chg">
+or
+a
+</ins><a class="tref internalDFN" title="list" href="#dfn-list"><ins class="diff-chg">
+list
+</ins></a>.</li><li><ins class="diff-chg">
+A
+node
+having
+an
+outgoing
+edge
+</ins>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+<del class="diff-old">reported
+through
+</del>
+<ins class="diff-chg">an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a><ins class="diff-chg">
+or
+</ins>
+a
+<del class="diff-old">conformance
+violation
+callback
+mechanism
+</del>
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+<ins class="diff-chg">blank
+node
+</ins></a>.</li><li><ins class="diff-chg">
+A
+</ins><a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph"><ins class="diff-chg">
+JSON-LD
+graph
+</ins></a><em class="rfc2119" title="should not"><ins class="diff-chg">
+should
+not
+</ins></em><ins class="diff-chg">
+contain
+unconnected
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-chg">
+nodes
+</ins></a>,<ins class="diff-chg">
+i.e.,
+nodes
+which
+are
+not
+connected
+by
+an
+</ins><a class="tref internalDFN" title="edge" href="#dfn-edge"><ins class="diff-chg">
+edge
+</ins></a><ins class="diff-chg">
+to
+any
+other
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-chg">
+node
+</ins></a>.</li><li><ins class="diff-chg">
+An
+</ins><dfn title="iri" id="dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></dfn><ins class="diff-chg">
+(Internationalized
+Resource
+Identifier)
+is
+a
+string
+that
+conforms
+to
+the
+syntax
+</ins>
+defined
+in
+<del class="diff-old">the
+</del>
+[
+<cite>
+<del class="diff-old">JSON-LD-API
+</del>
+<a class="bibref" href="#bib-RFC3987">
+<ins class="diff-chg">RFC3987
+</ins>
+</a>
+</cite>
+].
+<del class="diff-old">For
+</del>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<ins class="diff-chg">IRIs
+</ins></a><ins class="diff-chg">
+used
+within
+</ins>
+a
+<a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">
+JSON-LD
+<ins class="diff-new">graph
+</ins></a><em class="rfc2119" title="should"><ins class="diff-new">
+should
+</ins></em><ins class="diff-new">
+return
+a
+</ins><a class="tref internalDFN" title="linked_data" href="#dfn-linked_data"><ins class="diff-new">
+Linked
+Data
+</ins></a>
+document
+<del class="diff-old">to
+</del>
+<ins class="diff-chg">describing
+the
+resource
+denoted
+by
+that
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+when
+being
+dereferenced.
+</ins></li><li><ins class="diff-chg">
+A
+</ins><dfn title="blank_node" id="dfn-blank_node"><ins class="diff-chg">
+blank
+node
+</ins></dfn><ins class="diff-chg">
+is
+a
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-chg">
+node
+</ins></a><ins class="diff-chg">
+which
+is
+neither
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a>,<ins class="diff-chg">
+nor
+a
+</ins><a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value"><ins class="diff-chg">
+JSON-LD
+value
+</ins></a>,<ins class="diff-chg">
+or
+a
+</ins><a class="tref internalDFN" title="list" href="#dfn-list"><ins class="diff-chg">
+list
+</ins></a>.<ins class="diff-chg">
+A
+blank
+node
+</ins><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em>
+be
+<del class="diff-old">conforming,
+it
+</del>
+<ins class="diff-chg">identified
+by
+a
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-chg">
+blank
+node
+identifier
+</ins></a>.</li><li><ins class="diff-chg">
+A
+</ins><dfn title="blank_node_identifier" id="dfn-blank_node_identifier"><ins class="diff-chg">
+blank
+node
+identifier
+</ins></dfn><ins class="diff-chg">
+is
+a
+string
+that
+can
+be
+used
+as
+an
+identifier
+for
+a
+</ins><a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-chg">
+blank
+node
+</ins></a><ins class="diff-chg">
+within
+the
+scope
+of
+a
+</ins><a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document"><ins class="diff-chg">
+JSON-LD
+document
+</ins></a>.<ins class="diff-chg">
+Blank
+node
+identifiers
+begin
+with
+</ins><code><ins class="diff-chg">
+_:
+</ins></code>.</li><li><ins class="diff-chg">
+A
+</ins><dfn title="json-ld_value" id="dfn-json-ld_value"><ins class="diff-chg">
+JSON-LD
+value
+</ins></dfn><ins class="diff-chg">
+is
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a>,<ins class="diff-chg">
+a
+</ins><a class="tref internalDFN" title="number" href="#dfn-number"><ins class="diff-chg">
+number
+</ins></a>,<a class="tref internalDFN" title="true" href="#dfn-true"><ins class="diff-chg">
+true
+</ins></a><ins class="diff-chg">
+or
+</ins><a class="tref internalDFN" title="false" href="#dfn-false"><ins class="diff-chg">
+false
+</ins></a>,<ins class="diff-chg">
+a
+</ins><a class="tref internalDFN" title="typed_value" href="#dfn-typed_value"><ins class="diff-chg">
+typed
+value
+</ins></a>,<ins class="diff-chg">
+or
+a
+</ins><a class="tref internalDFN" title="language-tagged_string" href="#dfn-language-tagged_string"><ins class="diff-chg">
+language-tagged
+string
+</ins></a>.</li><li><ins class="diff-chg">
+A
+</ins><dfn title="typed_value" id="dfn-typed_value"><ins class="diff-chg">
+typed
+value
+</ins></dfn><ins class="diff-chg">
+consists
+of
+a
+value,
+which
+is
+a
+string,
+and
+a
+type,
+which
+is
+an
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>.</li><li><ins class="diff-chg">
+A
+</ins><dfn title="language-tagged_string" id="dfn-language-tagged_string"><ins class="diff-chg">
+language-tagged
+string
+</ins></dfn><ins class="diff-chg">
+consists
+of
+a
+string
+and
+a
+non-empty
+language
+tag
+as
+defined
+by
+[
+</ins><cite><a class="bibref" href="#bib-BCP47"><ins class="diff-chg">
+BCP47
+</ins></a></cite><ins class="diff-chg">
+].
+The
+language
+tag
+must
+be
+well-formed
+according
+to
+section
+</ins><a href="http://tools.ietf.org/html/bcp47#section-2.2.9"><ins class="diff-chg">
+2.2.9
+</ins></a><ins class="diff-chg">
+of
+[
+</ins><cite><a class="bibref" href="#bib-BCP47"><ins class="diff-chg">
+BCP47
+</ins></a></cite><ins class="diff-chg">
+],
+and
+</ins>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+<del class="diff-old">a
+valid
+JSON
+document
+</del>
+<ins class="diff-chg">normalized
+to
+lowercase.
+</ins></li><li><ins class="diff-chg">
+A
+</ins><dfn title="list" id="dfn-list"><ins class="diff-chg">
+list
+</ins></dfn><ins class="diff-chg">
+is
+an
+ordered
+sequence
+of
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-chg">
+IRIs
+</ins></a>,<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-chg">
+blank
+nodes
+</ins></a>,<ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value"><ins class="diff-chg">
+JSON-LD
+values
+</ins></a>.</li></ul><div class="issue"><div class="issue-title"><span><ins class="diff-chg">
+Issue
+</ins></span></div><p class=""><ins class="diff-chg">
+In
+contrast
+to
+the
+RDF
+data
+model
+</ins>
+as
+<del class="diff-old">described
+</del>
+<ins class="diff-chg">defined
+</ins>
+in
+[
+<cite>
+<del class="diff-old">RFC4627
+</del>
+<a class="bibref" href="#bib-RDF-CONCEPTS">
+<ins class="diff-chg">RDF-CONCEPTS
+</ins>
+</a>
+</cite>
+<del class="diff-old">].
+</del>
+<ins class="diff-chg">],
+JSON-LD
+allows
+blank
+nodes
+as
+property
+labels
+and
+graph
+names.
+This
+feature
+is
+controversial
+in
+the
+RDF
+WG
+and
+may
+be
+removed
+in
+the
+future.
+</ins>
+</p>
+</div>
+<p>
+<a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">
+JSON-LD
+<del class="diff-old">introduces
+a
+number
+of
+keywords
+of
+the
+form
+'
+@
+'
+followed
+</del>
+<ins class="diff-chg">documents
+</ins></a><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em><ins class="diff-chg">
+contain
+data
+that
+cannot
+be
+represented
+</ins>
+by
+<ins class="diff-new">the
+</ins><a class="tref internalDFN" title="json-ld_data_model" href="#dfn-json-ld_data_model"><ins class="diff-new">
+data
+model
+</ins></a><ins class="diff-new">
+defined
+above.
+Unless
+otherwise
+specified,
+such
+data
+is
+ignored
+when
+</ins>
+a
+<del class="diff-old">set
+of
+one
+or
+more
+lower
+case
+alphabetic
+characters
+(
+@[a-z]+
+).
+</del>
+<a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">
+JSON-LD
+<del class="diff-old">documents
+should
+</del>
+<ins class="diff-chg">document
+</ins></a><ins class="diff-chg">
+is
+being
+processed.
+This
+means,
+e.g.,
+that
+properties
+which
+are
+</ins>
+not
+<del class="diff-old">define
+terms
+beginning
+with
+'
+@
+'.
+(See
+</del>
+<ins class="diff-chg">mapped
+to
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a><ins class="diff-chg">
+or
+</ins><a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-chg">
+blank
+node
+</ins></a><ins class="diff-chg">
+will
+be
+ignored.
+</ins></p><p style="text-align: center"><img src="linked-data-graph.png" title="An illustration of JSON-LD's data model" /></p><p style="text-align: center"><ins class="diff-chg">
+Figure
+1:
+An
+illustration
+of
+JSON-LD's
+data
+model.
+</ins></p></section><section class="appendix normative" id="json-ld-grammar"><h2>
+<span class="secno">
+<del class="diff-old">3.4
+</del>
+<ins class="diff-chg">B.
+</ins>
+</span>
+<del class="diff-old">Syntax
+Tokens
+and
+Keywords
+</del>
+<ins class="diff-chg">JSON-LD
+Grammar
+</ins></h2><em><ins class="diff-chg">
+This
+section
+is
+normative
+</ins></em><div class="issue"><div class="issue-title"><a href="https://github.com/json-ld/json-ld.org/issues/114"><span><ins class="diff-chg">
+Issue
+114
+</ins>
+</span>
+</a>
+<del class="diff-old">for
+</del>
+</div>
+<p class="">
+<ins class="diff-chg">This
+section
+is
+an
+attempt
+to
+formalize
+</ins>
+a
+<del class="diff-old">complete
+definition
+of
+JSON-LD
+keywords).
+</del>
+<ins class="diff-chg">normative
+grammar
+for
+JSON-LD.
+</ins></p></div><p><ins class="diff-chg">
+This
+appendix
+restates
+the
+syntactic
+conventions
+described
+in
+the
+previous
+sections
+more
+formally.
+</ins>
+</p>
+<div class="note">
+<div class="note-title">
+<span>
+Note
+</span>
+</div>
+<p class="">
+The
+JSON-LD
+context
+allows
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keywords
+</a>
+<del class="diff-old">to
+be
+aliased
+within
+the
+active
+context
+.
+</del>
+<a href="#aliasing-keywords" class="sec-ref">
+<span class="secno">
+<ins class="diff-chg">6.13
+</ins></span><span class="sec-title"><ins class="diff-chg">
+Aliasing
+Keywords
+</ins></span></a><ins class="diff-chg">
+).
+</ins>
+Whenever
+a
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+is
+<del class="diff-old">discussed,
+</del>
+<ins class="diff-chg">discussed
+in
+</ins>
+this
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">grammar,
+the
+statements
+</ins>
+also
+<del class="diff-old">understood
+to
+</del>
+apply
+to
+an
+alias
+for
+that
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>.
+For
+example,
+if
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+defines
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+<code>
+id
+</code>
+as
+an
+alias
+for
+<code>
+@id
+</code>,
+that
+alias
+may
+be
+legitimately
+used
+as
+a
+substitution
+for
+<code>
+@id
+</code>.
+Note
+that
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+aliases
+are
+not
+expanded
+during
+context
+processing.
+</p>
+</div>
+<p>
+A
+<a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">
+JSON-LD
+document
+<del class="diff-old">is
+either
+</del>
+</a>
+<em class="rfc2119" title="must">
+<ins class="diff-chg">must
+</ins></em><ins class="diff-chg">
+be
+</ins>
+a
+<ins class="diff-new">valid
+JSON
+document
+as
+described
+in
+[
+</ins><cite><a class="bibref" href="#bib-RFC4627"><ins class="diff-new">
+RFC4627
+</ins></a></cite><ins class="diff-new">
+].
+</ins></p><p><ins class="diff-new">
+A
+</ins><a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document"><ins class="diff-new">
+JSON-LD
+document
+</ins></a><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+</ins>
+a
+single
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definition
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>
+or
+a
+JSON
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+containing
+a
+set
+of
+one
+or
+more
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definitions
+</del>
+<ins class="diff-chg">objects
+</ins>
+</a>.
+</p>
+<del class="diff-old">{
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ "depiction": "http://twitter.com/account/profile_image/manusporny"
+}
+[
+ {
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ "depiction": "http://twitter.com/account/profile_image/manusporny"
+ }, {
+ "name": "Gregg Kellogg",
+ "homepage": "http://greggkellogg.net/",
+ "depiction": "http://twitter.com/account/profile_image/gkellogg"
+ }
+]
+</del>
+<section id="grammar-node-object" typeof="bibo:Chapter" resource="#grammar-node-object" rel="bibo:chapter">
+<h3>
+<span class="secno">
+<del class="diff-old">A.1
+</del>
+<ins class="diff-chg">B.1
+</ins>
+</span>
+Node
+<del class="diff-old">Definition
+</del>
+<ins class="diff-chg">Object
+</ins>
+</h3>
+<p>
+A
+<dfn title="node_object" id="dfn-node_object">
+node
+<del class="diff-old">definition
+</del>
+<ins class="diff-chg">object
+</ins></dfn><ins class="diff-chg">
+represents
+zero
+or
+more
+properties
+of
+a
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-chg">
+node
+</ins></a><ins class="diff-chg">
+in
+the
+</ins><a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph"><ins class="diff-chg">
+JSON-LD
+graph
+</ins></a><ins class="diff-chg">
+serialized
+by
+the
+</ins><a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document"><ins class="diff-chg">
+JSON-LD
+document
+</ins></a>.<ins class="diff-chg">
+A
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+Object
+</ins>
+</a>
+is
+a
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+<ins class="diff-new">node
+object
+</ins></a><ins class="diff-new">
+if
+it
+exists
+outside
+of
+the
+JSON-LD
+Context
+and:
+</ins></p><ul><li><ins class="diff-new">
+it
+does
+not
+contain
+the
+</ins><code><ins class="diff-new">
+@value
+</ins></code>,<code><ins class="diff-new">
+@list
+</ins></code>,<code><ins class="diff-new">
+@annotation
+</ins></code>,<ins class="diff-new">
+or
+</ins><code><ins class="diff-new">
+@set
+</ins></code><ins class="diff-new">
+keywords,
+or
+</ins></li><li><ins class="diff-new">
+it
+does
+not
+contain
+the
+</ins><code><ins class="diff-new">
+@graph
+</ins></code><ins class="diff-new">
+keyword
+and
+is
+the
+top-most
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+Object
+</ins></a><ins class="diff-new">
+in
+the
+JSON-LD
+document.
+</ins></li></ul><ins class="diff-new">
+The
+properties
+of
+a
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-new">
+node
+</ins></a><ins class="diff-new">
+in
+the
+</ins><a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph"><ins class="diff-new">
+JSON-LD
+graph
+</ins></a><ins class="diff-new">
+may
+be
+spread
+among
+different
+</ins><a class="tref internalDFN" title="node_object" href="#dfn-node_object"><ins class="diff-new">
+node
+objects
+</ins></a><ins class="diff-new">
+within
+a
+document.
+When
+that
+happens,
+the
+keys
+of
+the
+different
+</ins><a class="tref internalDFN" title="node_object" href="#dfn-node_object"><ins class="diff-new">
+node
+objects
+</ins></a><ins class="diff-new">
+are
+merged
+to
+create
+the
+properties
+of
+the
+resulting
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-new">
+node
+</ins></a>.<p></p><p><ins class="diff-new">
+A
+</ins><a class="tref internalDFN" title="node_object" href="#dfn-node_object"><ins class="diff-new">
+node
+object
+</ins></a><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+a
+</ins>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+<del class="diff-old">containing
+</del>
+<ins class="diff-chg">that
+contains
+</ins>
+one
+or
+more
+key-value
+pairs.
+Keys
+<del class="diff-old">are
+</del>
+<em class="rfc2119" title="must">
+<ins class="diff-chg">must
+</ins></em><ins class="diff-chg">
+either
+be
+</ins>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<del class="diff-old">IRI
+s,
+</del>
+<ins class="diff-chg">IRIs
+</ins></a>,
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<del class="diff-old">IRI
+s,
+</del>
+<ins class="diff-chg">IRIs
+</ins></a>,
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">terms
+</ins>
+</a>
+<del class="diff-old">s
+defined
+within
+</del>
+<ins class="diff-chg">valid
+in
+</ins>
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+or
+one
+of
+the
+following
+<del class="diff-old">keywords:
+</del>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+<ins class="diff-chg">keywords
+</ins></a>:
+</p>
+<ul>
+<li>
+<code>
+@context
+</code>,
+</li>
+<li>
+<code>
+@graph
+</code>,
+</li>
+<li>
+<code>
+@id
+</code>,
+or
+</li>
+<li>
+<code>
+@type
+</code>
+</li>
+</ul>
+<p>
+If
+the
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definition
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>
+contains
+the
+<code>
+@context
+</code>
+key,
+its
+value
+<em class="rfc2119" title="must">
+must
+</em>
+be
+one
+of
+the
+following:
+</p>
+<ul>
+<li>
+<del class="diff-old">a
+string
+with
+the
+lexical
+form
+of
+</del>
+<ins class="diff-chg">an
+</ins>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+</li>
+<li>
+a
+<del class="diff-old">JSON
+object
+conforming
+the
+the
+syntax
+requirements
+stated
+in
+A.6
+Context
+Definition
+</del>
+<a class="tref internalDFN" title="context_definition" href="#dfn-context_definition">
+<ins class="diff-chg">context
+definition
+</ins>
+</a>,
+or
+</li>
+<li>
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+composed
+of
+any
+number
+of
+the
+previous
+two
+expressions.
+</li>
+</ul>
+<del class="diff-old">{
+ ,
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ "depiction": "http://twitter.com/account/profile_image/manusporny"
+}
+See
+3.8
+Node
+Identifiers
+,
+4.1
+Compact
+IRIs
+,
+and
+4.12
+Identifying
+Unlabeled
+Nodes
+for
+further
+discussion
+on
+@id
+values.
+</del>
+<p>
+If
+the
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definition
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>
+contains
+the
+<code>
+@id
+</code>
+key,
+<del class="diff-old">it's
+</del>
+<ins class="diff-chg">its
+</ins>
+value
+<em class="rfc2119" title="must">
+must
+</em>
+be
+<del class="diff-old">a
+string
+having
+the
+lexical
+form
+of
+</del>
+<ins class="diff-chg">an
+</ins>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+<ins class="diff-new">a
+</ins>
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+(including
+<del class="diff-old">unlabeled
+</del>
+<a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">
+<ins class="diff-chg">blank
+</ins>
+node
+<ins class="diff-new">identifiers
+</ins>
+</a>
+),
+or
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+defined
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+expanding
+into
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+or
+<del class="diff-old">an
+unlabeled
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-chg">
+blank
+</ins>
+node
+<ins class="diff-new">identifier
+</ins>
+</a>.
+<del class="diff-old">{
+ "@context": "http://json-ld.org/contexts/person.jsonld",
+ ,
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ "depiction": "http://twitter.com/account/profile_image/manusporny"
+}
+</del>
+<ins class="diff-chg">See
+</ins><a href="#node-identifiers" class="sec-ref">
+<span class="secno">
+<ins class="diff-chg">5.4
+</ins></span><span class="sec-title"><ins class="diff-chg">
+Node
+Identifiers
+</ins></span></a>,<a href="#compact-iris" class="sec-ref"><span class="secno"><ins class="diff-chg">
+6.1
+</ins></span><span class="sec-title"><ins class="diff-chg">
+Compact
+IRIs
+</ins></span></a>,<ins class="diff-chg">
+and
+</ins><a href="#identifying-blank-nodes" class="sec-ref"><span class="secno"><ins class="diff-chg">
+6.12
+</ins></span><span class="sec-title"><ins class="diff-chg">
+Identifying
+Blank
+Nodes
+</ins></span></a><ins class="diff-chg">
+for
+further
+discussion
+on
+</ins><code><ins class="diff-chg">
+@id
+</ins></code><ins class="diff-chg">
+values.
+</ins></p>
+<p>
+If
+the
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definition
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>
+contains
+the
+<code>
+@type
+</code>
+key,
+<del class="diff-old">it's
+</del>
+<ins class="diff-chg">its
+</ins>
+value
+<em class="rfc2119" title="must">
+must
+</em>
+be
+either
+<del class="diff-old">a
+string
+having
+the
+lexical
+form
+of
+</del>
+<ins class="diff-chg">an
+</ins>
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+<ins class="diff-new">a
+</ins>
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">,
+</del>
+</a>
+<ins class="diff-chg">(excluding
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-chg">
+blank
+node
+identifier
+</ins></a><ins class="diff-chg">
+),
+</ins>
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+defined
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+expanding
+into
+an
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+or
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+of
+any
+of
+these.
+<del class="diff-old">A
+JSON-LD
+processor
+should
+process
+non-conforming
+documents
+having
+@type
+values
+including
+node
+definition
+or
+node
+reference
+entries
+but
+must
+discard
+everything
+except
+for
+the
+value
+of
+the
+@id
+key.
+{
+ "@context": "http://json-ld.org/contexts/person.jsonld",
+ "@id": "http://manu.sporny.org/i/public",
+ ,
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ "depiction": "http://twitter.com/account/profile_image/manusporny"
+}
+</del>
+See
+<a href="#specifying-the-type" class="sec-ref">
+<span class="secno">
+<del class="diff-old">3.9
+</del>
+<ins class="diff-chg">5.5
+</ins>
+</span>
+<span class="sec-title">
+Specifying
+the
+Type
+</span>
+</a>
+for
+further
+discussion
+on
+<code>
+@type
+</code>
+values.
+</p>
+<p>
+If
+the
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definition
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>
+contains
+the
+<code>
+@graph
+</code>
+key,
+<del class="diff-old">it's
+</del>
+<ins class="diff-chg">its
+</ins>
+value
+<em class="rfc2119" title="must">
+must
+</em>
+be
+a
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definition
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>
+or
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+of
+zero
+or
+more
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definitions
+</del>
+<ins class="diff-chg">objects
+</ins>
+</a>.
+If
+the
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definition
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>
+contains
+an
+<code>
+@id
+</code>
+keyword,
+its
+value
+is
+used
+as
+the
+label
+of
+a
+named
+graph.
+<ins class="diff-new">See
+</ins><a href="#named-graphs" class="sec-ref"><span class="secno"><ins class="diff-new">
+6.11
+</ins></span><span class="sec-title"><ins class="diff-new">
+Named
+Graphs
+</ins></span></a><ins class="diff-new">
+for
+further
+discussion
+on
+</ins><code><ins class="diff-new">
+@graph
+</ins></code><ins class="diff-new">
+values.
+</ins>
+</p>
+<div class="note">
+<div class="note-title">
+<span>
+Note
+</span>
+</div>
+<p class="">
+As
+a
+special
+case,
+if
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">a
+</ins>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+contains
+no
+keys
+other
+than
+<code>
+@graph
+</code>
+and
+<code>
+@context
+</code>,
+and
+the
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+is
+the
+root
+of
+the
+JSON-LD
+document,
+the
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+is
+not
+treated
+as
+a
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definition
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>
+;
+this
+is
+used
+as
+a
+way
+of
+defining
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+definitions
+</a>
+that
+may
+not
+form
+a
+connected
+graph.
+This
+allows
+a
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+to
+be
+defined
+which
+is
+shared
+by
+all
+of
+the
+constituent
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definitions
+</del>
+<ins class="diff-chg">objects
+</ins>
+</a>.
+</p>
+</div>
+<del class="diff-old">{
+ "@context": ...,
+ "":
+ [
+ {
+ "@id": "http://manu.sporny.org/i/public",
+ "@type": "foaf:Person",
+ "name": "Manu Sporny",
+ "knows": "http://greggkellogg.net/foaf#me"
+ },
+ {
+ "@id": "http://greggkellogg.net/foaf#me",
+ "@type": "foaf:Person",
+ "name": "Gregg Kellogg",
+ "knows": "http://manu.sporny.org/i/public"
+ }
+ ]
+}
+See
+4.11
+Named
+Graphs
+for
+further
+discussion
+on
+@graph
+values.
+</del>
+<p>
+A
+<a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">
+JSON-LD
+document
+</a>
+<em class="rfc2119" title="must not">
+must
+not
+</em>
+contain
+any
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+<del class="diff-old">or
+alias
+</del>
+that
+expands
+to
+another
+keyword.
+</p>
+<p>
+<del class="diff-old">Other
+keys
+</del>
+<ins class="diff-chg">Keys
+in
+a
+</ins><a class="tref internalDFN" title="node_object" href="#dfn-node_object"><ins class="diff-chg">
+node
+object
+</ins></a><ins class="diff-chg">
+that
+are
+not
+</ins><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-chg">
+keywords
+</ins></a>
+<em class="rfc2119" title="must">
+must
+</em>
+expand
+to
+an
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+using
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+The
+values
+associated
+with
+these
+keys
+<del class="diff-old">may
+</del>
+<em class="rfc2119" title="must">
+<ins class="diff-chg">must
+</ins></em>
+be
+<del class="diff-old">any
+</del>
+<ins class="diff-chg">one
+</ins>
+of
+the
+following:
+</p>
+<ul>
+<li>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>,
+</li>
+<li>
+<a class="tref internalDFN" title="number" href="#dfn-number">
+number
+</a>,
+</li>
+<li>
+<a class="tref internalDFN" title="true" href="#dfn-true">
+true
+</a>,
+</li>
+<li>
+<a class="tref internalDFN" title="false" href="#dfn-false">
+false
+</a>,
+</li>
+<li>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>,
+</li>
+<li>
+<del class="diff-old">node
+reference
+,
+</del>
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definition
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>,
+</li>
+<li>
+<a class="tref internalDFN" title="expanded_typed_value" href="#dfn-expanded_typed_value">
+<ins class="diff-chg">expanded
+</ins>
+typed
+value
+</a>,
+</li>
+<li>
+<a class="tref internalDFN" title="expanded_language-tagged_string" href="#dfn-expanded_language-tagged_string">
+<ins class="diff-chg">expanded
+</ins>
+language-tagged
+string
+</a>,
+</li>
+<li>
+<del class="diff-old">@set
+or
+@list
+definition
+(see
+4.9
+Sets
+and
+Lists
+</del>
+<a class="tref internalDFN" title="list" href="#dfn-list">
+<ins class="diff-chg">list
+</ins>
+</a>
+<del class="diff-old">),
+</del>
+<ins class="diff-chg">or
+</ins><a class="tref internalDFN" title="set" href="#dfn-set"><ins class="diff-chg">
+set
+</ins></a>,
+</li>
+<li>
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+<ins class="diff-new">of
+</ins>
+zero
+or
+more
+of
+<del class="diff-old">these,
+or
+</del>
+<ins class="diff-chg">the
+possibilities
+above,
+</ins>
+</li>
+<li>
+a
+<a class="tref internalDFN" title="language_map" href="#dfn-language_map">
+language
+map
+</a>,
+<ins class="diff-new">or
+</ins></li><li><ins class="diff-new">
+an
+</ins><a class="tref internalDFN" title="annotation_map" href="#dfn-annotation_map"><ins class="diff-new">
+annotation
+map
+</ins>
+</a>
+</li>
+</ul>
+</section>
+<section id="grammar-term-reference" typeof="bibo:Chapter" resource="#grammar-term-reference" rel="bibo:chapter">
+<h3>
+<span class="secno">
+<del class="diff-old">A.2
+</del>
+<ins class="diff-chg">B.2
+</ins>
+</span>
+<del class="diff-old">Node
+Reference
+</del>
+<ins class="diff-chg">Term
+</ins>
+</h3>
+<p>
+A
+<del class="diff-old">JSON
+object
+</del>
+<dfn title="term" id="dfn-term">
+<ins class="diff-chg">term
+</ins></dfn><ins class="diff-chg">
+is
+a
+short-hand
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins>
+</a>
+<del class="diff-old">containing
+only
+</del>
+<ins class="diff-chg">that
+expands
+to
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a><ins class="diff-chg">
+or
+a
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-chg">
+blank
+node
+identifier
+</ins></a>.</p><p><ins class="diff-chg">
+A
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><em class="rfc2119" title="must not"><ins class="diff-chg">
+must
+not
+</ins></em><ins class="diff-chg">
+equal
+any
+of
+</ins>
+the
+<ins class="diff-new">JSON-LD
+</ins><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-new">
+keywords
+</ins></a>.</p><p><ins class="diff-new">
+To
+avoid
+forward-compatibility
+issues,
+a
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a><em class="rfc2119" title="should not"><ins class="diff-new">
+should
+not
+</ins></em><ins class="diff-new">
+start
+with
+an
+</ins>
+<code>
+<del class="diff-old">@id
+</del>
+<ins class="diff-chg">@
+</ins>
+</code>
+<del class="diff-old">(or
+an
+alias
+for
+</del>
+<ins class="diff-chg">character
+as
+future
+versions
+of
+JSON-LD
+may
+introduce
+additional
+</ins><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-chg">
+keywords
+</ins></a>.<ins class="diff-chg">
+Furthermore,
+the
+use
+of
+empty
+terms
+(
+</ins>
+<code>
+<del class="diff-old">@id
+</del>
+<ins class="diff-chg">""
+</ins>
+</code>
+)
+is
+<del class="diff-old">a
+node
+reference
+</del>
+<ins class="diff-chg">discouraged
+as
+not
+all
+programming
+languages
+are
+able
+to
+handle
+empty
+property
+names.
+</ins></p><p><ins class="diff-chg">
+See
+</ins><a href="#the-context" class="sec-ref"><span class="secno"><ins class="diff-chg">
+5.1
+</ins></span><span class="sec-title"><ins class="diff-chg">
+The
+Context
+</ins></span>
+</a>
+and
+<del class="diff-old">not
+a
+node
+definition
+</del>
+<a href="#iris" class="sec-ref">
+<span class="secno">
+<ins class="diff-chg">5.3
+</ins></span><span class="sec-title"><ins class="diff-chg">
+IRIs
+</ins></span></a><ins class="diff-chg">
+for
+further
+discussion
+on
+mapping
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+terms
+</ins></a><ins class="diff-chg">
+to
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-chg">
+IRIs
+</ins>
+</a>.
+</p>
+<del class="diff-old">{
+ "@context": ...,
+ "@graph": [
+ {
+ "@id": "http://example.org/library",
+ "@type": "ex:Library",
+
+ }, {
+ "@id": "http://example.org/library/the-republic",
+ "@type": "ex:Book",
+ "dc:creator": "Plato",
+ "dc:title": "The Republic",
+
+ }, {
+ "@id": "http://example.org/library/the-republic#introduction",
+ "@type": "ex:Chapter",
+ "dc:description": "An introductory chapter on The Republic.",
+ "dc:title": "The Introduction"
+ }
+ ]
+}
+}
+</del>
+</section>
+<section id="grammar-language-map" typeof="bibo:Chapter" resource="#grammar-language-map" rel="bibo:chapter">
+<h3>
+<span class="secno">
+<del class="diff-old">A.3
+</del>
+<ins class="diff-chg">B.3
+</ins>
+</span>
+Language
+Map
+</h3>
+<p>
+A
+<dfn title="language_map" id="dfn-language_map">
+<ins class="diff-new">language
+map
+</ins></dfn><ins class="diff-new">
+is
+used
+to
+associate
+a
+language
+with
+a
+value
+in
+a
+way
+that
+allows
+easy
+programmatic
+access.
+A
+</ins>
+<a class="tref internalDFN" title="language_map" href="#dfn-language_map">
+language
+map
+</a>
+may
+be
+used
+as
+a
+term
+value
+within
+a
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definition
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>
+if
+the
+term
+is
+defined
+with
+<code>
+@container
+</code>
+set
+to
+<code>
+@language
+</code>.
+The
+keys
+of
+a
+<a class="tref internalDFN" title="language_map" href="#dfn-language_map">
+language
+map
+</a>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">lowercase
+</ins>
+[
+<cite>
+<a class="bibref" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+]
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<ins class="diff-new">strings
+</ins></a><ins class="diff-new">
+with
+an
+associated
+value
+that
+is
+any
+of
+the
+following
+types:
+</ins></p><ul><li><a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>,
+<ins class="diff-new">or
+</ins></li><li><ins class="diff-new">
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-new">
+array
+</ins></a><ins class="diff-new">
+of
+zero
+or
+more
+strings
+</ins></li></ul><p><ins class="diff-new">
+See
+</ins><a href="#language-tagged-strings" class="sec-ref"><span class="secno"><ins class="diff-new">
+6.3
+</ins></span><span class="sec-title"><ins class="diff-new">
+Language-tagged
+Strings
+</ins></span></a><ins class="diff-new">
+for
+further
+discussion
+on
+language
+maps.
+</ins></p></section><section id="grammar-annotation-map" typeof="bibo:Chapter" resource="#grammar-annotation-map" rel="bibo:chapter"><h3><span class="secno"><ins class="diff-new">
+B.4
+</ins></span><ins class="diff-new">
+Annotation
+Map
+</ins></h3><p><ins class="diff-new">
+An
+</ins><dfn title="annotation_map" id="dfn-annotation_map"><ins class="diff-new">
+annotation
+map
+</ins></dfn><ins class="diff-new">
+allows
+keys
+that
+have
+no
+semantic
+meaning,
+but
+should
+be
+preserved
+regardless,
+to
+be
+used
+in
+JSON-LD
+documents.
+An
+</ins><a class="tref internalDFN" title="annotation_map" href="#dfn-annotation_map"><ins class="diff-new">
+annotation
+map
+</ins></a><ins class="diff-new">
+may
+be
+used
+as
+a
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a><ins class="diff-new">
+value
+within
+a
+</ins><a class="tref internalDFN" title="node_object" href="#dfn-node_object"><ins class="diff-new">
+node
+object
+</ins></a><ins class="diff-new">
+if
+the
+term
+is
+defined
+with
+</ins><code><ins class="diff-new">
+@container
+</ins></code><ins class="diff-new">
+set
+to
+</ins><code><ins class="diff-new">
+@annotation
+</ins></code>.<ins class="diff-new">
+The
+keys
+of
+a
+</ins><a class="tref internalDFN" title="annotation_map" href="#dfn-annotation_map"><ins class="diff-new">
+annotation
+map
+</ins></a><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-new">
+strings
+</ins></a>
+with
+an
+associated
+value
+that
+is
+any
+of
+the
+following
+types:
+</p>
+<ul>
+<li>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>,
+</li>
+<li>
+<a class="tref internalDFN" title="number" href="#dfn-number">
+number
+</a>,
+</li>
+<li>
+<a class="tref internalDFN" title="true" href="#dfn-true">
+true
+</a>,
+</li>
+<li>
+<a class="tref internalDFN" title="false" href="#dfn-false">
+false
+</a>,
+</li>
+<li>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>,
+</li>
+<li>
+<del class="diff-old">node
+reference
+,
+</del>
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+node
+<del class="diff-old">definition
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>,
+</li>
+<li>
+<del class="diff-old">typed
+</del>
+<a class="tref internalDFN" title="expanded_value" href="#dfn-expanded_value">
+<ins class="diff-chg">expanded
+</ins>
+value
+</a>,
+</li>
+<li>
+<del class="diff-old">language-tagged
+string
+,
+@set
+or
+@list
+definition
+(see
+4.9
+Sets
+and
+Lists
+),
+or
+</del>
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+<ins class="diff-new">of
+</ins>
+zero
+or
+more
+of
+<del class="diff-old">these
+</del>
+<ins class="diff-chg">the
+above
+possibilities
+</ins>
+</li>
+</ul>
+<del class="diff-old">We
+had
+also
+discussed
+values
+other
+than
+strings,
+such
+as
+those
+that
+might
+represent
+a
+more
+reified
+version
+of
+a
+value
+with
+other
+properties,
+such
+as
+is
+described
+using
+SKOS-XL
+.
+{
+ "@context":
+ {
+ "title":
+ {
+ "@id": "http://purl.org/dc/terms/title"
+
+ }
+ },
+...
+ "title":
+ {
+ "en": "JSON-LD Syntax",
+ "ru": "JSON-LD Синтаксис",
+ "ja": "JSON-LDの構文"
+ }
+...
+}
+</del>
+<p>
+<ins class="diff-chg">See
+</ins><a href="#data-annotations" class="sec-ref">
+<span class="secno">
+<ins class="diff-chg">6.14
+</ins></span><span class="sec-title"><ins class="diff-chg">
+Data
+Annotations
+</ins></span></a><ins class="diff-chg">
+for
+further
+information
+on
+this
+topic.
+</ins></p>
+</section>
+<section id="grammar-expanded-values" typeof="bibo:Chapter" resource="#grammar-expanded-values" rel="bibo:chapter">
+<h3>
+<span class="secno">
+<del class="diff-old">A.4
+</del>
+<ins class="diff-chg">B.5
+</ins>
+</span>
+Expanded
+Values
+</h3>
+<p>
+An
+<dfn title="expanded_value" id="dfn-expanded_value">
+expanded
+value
+</dfn>
+is
+<ins class="diff-new">used
+to
+explicitly
+associate
+a
+type
+or
+a
+language
+with
+a
+value
+to
+create
+a
+</ins><a class="tref internalDFN" title="typed_value" href="#dfn-typed_value"><ins class="diff-new">
+typed
+value
+</ins></a><ins class="diff-new">
+or
+a
+</ins><a class="tref internalDFN" title="language-tagged_string" href="#dfn-language-tagged_string"><ins class="diff-new">
+language-tagged
+string
+</ins></a>.</p><p><ins class="diff-new">
+An
+</ins><a class="tref internalDFN" title="expanded_value" href="#dfn-expanded_value"><ins class="diff-new">
+expanded
+value
+</ins></a><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+</ins>
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+containing
+the
+<code>
+@value
+</code>
+<del class="diff-old">key,
+or
+an
+alias
+for
+the
+@value
+value
+</del>
+key.
+It
+<em class="rfc2119" title="may">
+may
+</em>
+also
+contain
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">a
+</ins>
+<code>
+@type
+</code>
+or
+<ins class="diff-new">a
+</ins>
+<code>
+@language
+</code>
+<del class="diff-old">keys,
+or
+their
+respective
+keyword
+aliases.
+</del>
+<ins class="diff-chg">key
+but
+</ins><em class="rfc2119" title="must not"><ins class="diff-chg">
+must
+not
+</ins></em><ins class="diff-chg">
+contain
+both
+a
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+and
+a
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+key.
+</ins>
+An
+<a class="tref internalDFN" title="expanded_value" href="#dfn-expanded_value">
+expanded
+value
+</a>
+<em class="rfc2119" title="must not">
+must
+not
+</em>
+contain
+keys
+other
+than
+<code>
+@value
+</code>,
+<code>
+@language
+</code>,
+and
+<code>
+@type
+</code>.
+An
+<a class="tref internalDFN" title="expanded_value" href="#dfn-expanded_value">
+expanded
+value
+</a>
+<del class="diff-old">must
+not
+contain
+both
+the
+</del>
+<ins class="diff-chg">that
+contains
+a
+</ins>
+<code>
+<del class="diff-old">@language
+</del>
+<ins class="diff-chg">@type
+</ins>
+</code>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">key
+is
+called
+an
+</ins><dfn title="expanded_typed_value" id="dfn-expanded_typed_value"><ins class="diff-chg">
+expanded
+typed
+value
+</ins></dfn>.<ins class="diff-chg">
+An
+</ins><a class="tref internalDFN" title="expanded_value" href="#dfn-expanded_value"><ins class="diff-chg">
+expanded
+value
+</ins></a><ins class="diff-chg">
+that
+contains
+a
+</ins>
+<code>
+<del class="diff-old">@type
+</del>
+<ins class="diff-chg">@language
+</ins>
+</code>
+<del class="diff-old">keys.
+</del>
+<ins class="diff-chg">key
+is
+called
+an
+</ins><dfn title="expanded_language-tagged_string" id="dfn-expanded_language-tagged_string"><ins class="diff-chg">
+expanded
+language-tagged
+string
+</ins></dfn>.
+</p>
+<p>
+The
+value
+<del class="diff-old">of
+</del>
+<ins class="diff-chg">associated
+with
+</ins>
+the
+<code>
+@value
+</code>
+<del class="diff-old">key,
+or
+its
+alias,
+</del>
+<ins class="diff-chg">key
+</ins>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+either
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>,
+<a class="tref internalDFN" title="number" href="#dfn-number">
+number
+</a>,
+<a class="tref internalDFN" title="true" href="#dfn-true">
+true
+</a>,
+<del class="diff-old">or
+</del>
+<a class="tref internalDFN" title="false" href="#dfn-false">
+false
+</a>
+<ins class="diff-new">or
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-new">
+null
+</ins>
+</a>.
+</p>
+<p>
+<del class="diff-old">If
+an
+expanded
+value
+contains
+a
+@language
+key,
+it
+must
+not
+contain
+any
+other
+key
+except
+@value
+.
+</del>
+The
+value
+<del class="diff-old">of
+</del>
+<ins class="diff-chg">associated
+with
+</ins>
+the
+<code>
+@language
+</code>
+key
+<em class="rfc2119" title="must">
+must
+</em>
+have
+the
+lexical
+form
+described
+in
+[
+<cite>
+<a class="bibref" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+],
+or
+be
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>.
+</p>
+<p>
+<del class="diff-old">If
+an
+expanded
+</del>
+<ins class="diff-chg">The
+</ins>
+value
+<del class="diff-old">contains
+a
+</del>
+<ins class="diff-chg">associated
+with
+the
+</ins>
+<code>
+<del class="diff-old">@type
+</del>
+<ins class="diff-chg">@annotation
+</ins>
+</code>
+<del class="diff-old">key,
+it
+</del>
+<ins class="diff-chg">key
+</ins><em class="rfc2119" title="must">
+must
+<del class="diff-old">not
+</del>
+</em>
+<del class="diff-old">contain
+any
+other
+key
+except
+@value
+.
+</del>
+<ins class="diff-chg">be
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a>.</p><p>
+The
+value
+<del class="diff-old">of
+</del>
+<ins class="diff-chg">associated
+with
+the
+</ins>
+<code>
+@type
+</code>
+<ins class="diff-new">key
+</ins>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>,
+<ins class="diff-new">a
+</ins>
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+<ins class="diff-new">an
+</ins>
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+or
+<code>
+null
+</code>.
+</p>
+<p>
+See
+<a href="#typed-values" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.2
+</del>
+<ins class="diff-chg">6.2
+</ins>
+</span>
+<span class="sec-title">
+Typed
+Values
+</span>
+</a>
+and
+<a href="#language-tagged-strings" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.3
+</del>
+<ins class="diff-chg">6.3
+</ins>
+</span>
+<span class="sec-title">
+Language-tagged
+Strings
+</span>
+</a>
+for
+<del class="diff-old">a
+further
+discussion
+of
+</del>
+<ins class="diff-chg">more
+information
+on
+</ins>
+<a class="tref internalDFN" title="expanded_value" href="#dfn-expanded_value">
+expanded
+values
+</a>.
+</p>
+</section>
+<section id="grammar-set-list" typeof="bibo:Chapter" resource="#grammar-set-list" rel="bibo:chapter">
+<h3>
+<span class="secno">
+<del class="diff-old">A.5
+</del>
+<ins class="diff-chg">B.6
+</ins>
+</span>
+List
+and
+Set
+Values
+</h3>
+<p>
+A
+<a class="tref internalDFN" title="list" href="#dfn-list">
+list
+</a>
+<ins class="diff-new">represents
+an
+</ins><em><ins class="diff-new">
+ordered
+</ins></em><ins class="diff-new">
+set
+of
+values.
+A
+</ins><dfn title="set" id="dfn-set"><ins class="diff-new">
+set
+</ins>
+</dfn>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">represents
+an
+</ins><em><ins class="diff-chg">
+unordered
+</ins></em><ins class="diff-chg">
+set
+of
+values.
+Unless
+otherwise
+specified
+(typically
+through
+the
+use
+of
+</ins>
+a
+<del class="diff-old">JSON
+object
+</del>
+<a class="tref internalDFN" title="list" href="#dfn-list">
+<ins class="diff-chg">list
+</ins>
+</a>
+<del class="diff-old">having
+only
+</del>
+<ins class="diff-chg">),
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+arrays
+</ins></a><ins class="diff-chg">
+are
+unordered
+in
+JSON-LD.
+As
+such,
+the
+</ins><code><ins class="diff-chg">
+@set
+</ins></code><ins class="diff-chg">
+keyword,
+when
+used
+in
+the
+body
+of
+a
+JSON-LD
+document,
+represents
+just
+syntactic
+sugar
+which
+is
+optimized
+away
+when
+processing
+the
+document.
+However,
+it
+is
+very
+helpful
+when
+used
+within
+</ins>
+the
+<ins class="diff-new">context
+of
+a
+document.
+Values
+of
+terms
+associated
+with
+a
+</ins><code><ins class="diff-new">
+@set
+</ins></code><ins class="diff-new">
+or
+</ins>
+<code>
+@list
+</code>
+<del class="diff-old">keyword
+.
+Its
+</del>
+<ins class="diff-chg">container
+will
+always
+be
+represented
+in
+the
+form
+of
+an
+array
+when
+a
+document
+is
+processed
+-
+even
+if
+there
+is
+just
+a
+single
+</ins>
+value
+<ins class="diff-new">that
+would
+otherwise
+be
+optimized
+to
+a
+non-array
+form
+in
+</ins><a href="#compact-document-form"><ins class="diff-new">
+compact
+document
+form
+</ins></a>.<ins class="diff-new">
+This
+simplifies
+post-processing
+of
+the
+data
+as
+the
+data
+is
+always
+in
+array
+form.
+</ins></p><p><ins class="diff-new">
+A
+</ins><a class="tref internalDFN" title="list" href="#dfn-list"><ins class="diff-new">
+list
+</ins></a>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+<del class="diff-old">an
+array
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins>
+</a>
+<del class="diff-old">of
+any
+of
+</del>
+<ins class="diff-chg">that
+contains
+a
+single
+key-value
+pair
+where
+</ins>
+the
+<del class="diff-old">following:
+</del>
+<ins class="diff-chg">key
+is
+</ins><code><ins class="diff-chg">
+@list
+</ins></code>.
+</p>
+<del class="diff-old">string
+,
+node
+reference
+,
+node
+definition
+,
+typed
+value
+,
+or
+language-tagged
+string
+.
+</del>
+<p>
+A
+<a class="tref internalDFN" title="set" href="#dfn-set">
+set
+<del class="diff-old">is
+</del>
+</a>
+<em class="rfc2119" title="must">
+<ins class="diff-chg">must
+</ins></em><ins class="diff-chg">
+be
+</ins>
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+<del class="diff-old">having
+only
+</del>
+<ins class="diff-chg">that
+contains
+a
+single
+key-value
+pair
+where
+</ins>
+the
+<ins class="diff-new">key
+is
+</ins>
+<code>
+@set
+<del class="diff-old">keyword
+.
+Its
+</del>
+</code>.
+</p>
+<p>
+<ins class="diff-chg">In
+both
+cases,
+the
+</ins>
+value
+<ins class="diff-new">associated
+with
+the
+key
+</ins>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+of
+any
+of
+the
+following:
+</p>
+<ul>
+<li>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>,
+</li>
+<li>
+<del class="diff-old">node
+reference
+</del>
+<a class="tref internalDFN" title="number" href="#dfn-number">
+<ins class="diff-chg">number
+</ins>
+</a>,
+</li>
+<li>
+<del class="diff-old">node
+definition
+</del>
+<a class="tref internalDFN" title="true" href="#dfn-true">
+<ins class="diff-chg">true
+</ins>
+</a>,
+</li>
+<li>
+<del class="diff-old">typed
+value
+</del>
+<a class="tref internalDFN" title="false" href="#dfn-false">
+<ins class="diff-chg">false
+</ins>
+</a>,
+</li>
+<li>
+<del class="diff-old">language-tagged
+string
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins>
+</a>,
+</li>
+<li>
+<del class="diff-old">@set
+or
+@list
+definition
+(see
+4.9
+Sets
+and
+Lists
+</del>
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+<ins class="diff-chg">node
+object
+</ins></a>,</li><li>
+<del class="diff-old">),
+</del>
+<a class="tref internalDFN" title="expanded_typed_value" href="#dfn-expanded_typed_value">
+<ins class="diff-chg">expanded
+typed
+value
+</ins></a>,
+or
+</li>
+<li>
+<del class="diff-old">an
+array
+</del>
+<a class="tref internalDFN" title="expanded_language-tagged_string" href="#dfn-expanded_language-tagged_string">
+<ins class="diff-chg">expanded
+language-tagged
+string
+</ins>
+</a>
+<del class="diff-old">zero
+or
+more
+of
+these.
+</del>
+</li>
+</ul>
+<p>
+See
+<a href="#sets-and-lists" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.9
+</del>
+<ins class="diff-chg">6.9
+</ins>
+</span>
+<span class="sec-title">
+Sets
+and
+Lists
+</span>
+</a>
+for
+<del class="diff-old">a
+</del>
+further
+discussion
+<del class="diff-old">of
+</del>
+<ins class="diff-chg">on
+</ins>
+List
+and
+Set
+Values.
+</p>
+</section>
+<section id="grammar-context" typeof="bibo:Chapter" resource="#grammar-context" rel="bibo:chapter">
+<h3>
+<span class="secno">
+<del class="diff-old">A.6
+</del>
+<ins class="diff-chg">B.7
+</ins>
+</span>
+Context
+Definition
+</h3>
+<p>
+A
+<dfn title="context_definition" id="dfn-context_definition">
+context
+definition
+</dfn>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">defines
+a
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+in
+a
+</ins><a class="tref internalDFN" title="node_object" href="#dfn-node_object"><ins class="diff-chg">
+node
+object
+</ins></a>.</p><p><ins class="diff-chg">
+A
+</ins><a class="tref internalDFN" title="context_definition" href="#dfn-context_definition"><ins class="diff-chg">
+context
+definition
+</ins></a><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+be
+</ins>
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+containing
+one
+or
+more
+key-value
+pairs.
+Keys
+<del class="diff-old">are
+non-keyword
+strings
+</del>
+<em class="rfc2119" title="must">
+<ins class="diff-chg">must
+</ins></em><ins class="diff-chg">
+either
+be
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+terms
+</ins>
+</a>
+or
+<del class="diff-old">the
+</del>
+<code>
+@language
+</code>
+or
+<code>
+@vocab
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keywords
+</a>.
+<del class="diff-old">A
+context
+definition
+should
+not
+contain
+any
+keys
+having
+the
+lexical
+form
+of
+keyword
+other
+than
+@language
+or
+@vocab
+.
+</del>
+</p>
+<p>
+If
+the
+<a class="tref internalDFN" title="context_definition" href="#dfn-context_definition">
+context
+definition
+</a>
+has
+a
+<code>
+@language
+</code>
+key,
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">its
+</ins>
+value
+<em class="rfc2119" title="must">
+must
+</em>
+have
+the
+lexical
+form
+described
+in
+[
+<cite>
+<a class="bibref" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+]
+or
+be
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>.
+</p>
+<p>
+If
+the
+<a class="tref internalDFN" title="context_definition" href="#dfn-context_definition">
+context
+definition
+</a>
+has
+a
+<code>
+@vocab
+</code>
+key,
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">its
+</ins>
+value
+<em class="rfc2119" title="must">
+must
+</em>
+have
+the
+lexical
+form
+of
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+or
+be
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>.
+</p>
+<p>
+<del class="diff-old">Other
+keys
+are
+</del>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">Term
+</ins>
+</a>
+<del class="diff-old">definitions.
+Their
+</del>
+values
+<em class="rfc2119" title="must">
+must
+</em>
+be
+either
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>,
+<code>
+<ins class="diff-new">null
+</ins></code>,
+or
+<del class="diff-old">a
+JSON
+object
+having
+the
+form
+of
+</del>
+an
+<a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">
+expanded
+term
+definition
+<del class="diff-old">(see
+4.5
+Expanded
+Term
+Definition
+).
+</del>
+</a>.
+</p>
+<p>
+An
+<dfn title="expanded_term_definition" id="dfn-expanded_term_definition">
+expanded
+term
+definition
+</dfn>
+is
+<ins class="diff-new">used
+to
+describe
+the
+mapping
+between
+a
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a><ins class="diff-new">
+and
+its
+expanded
+identifier,
+as
+well
+as
+other
+properties
+of
+the
+value
+associated
+with
+the
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a><ins class="diff-new">
+when
+it
+is
+used
+as
+key
+in
+a
+</ins><a class="tref internalDFN" title="node_object" href="#dfn-node_object"><ins class="diff-new">
+node
+object
+</ins></a>.</p><p><ins class="diff-new">
+An
+</ins><a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition"><ins class="diff-new">
+expanded
+term
+definition
+</ins></a><em class="rfc2119" title="should"><ins class="diff-new">
+should
+</ins></em><ins class="diff-new">
+be
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a>
+composed
+of
+zero
+or
+more
+keys
+from
+<code>
+@id
+</code>,
+<code>
+@type
+</code>,
+<code>
+@language
+</code>
+or
+<code>
+@container
+</code>.
+An
+<a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">
+expanded
+term
+definition
+</a>
+<em class="rfc2119" title="should not">
+should
+not
+</em>
+contain
+any
+other
+keys.
+<del class="diff-old">All
+values
+associated
+with
+@id
+must
+expand
+to
+an
+absolute
+IRI
+.
+</del>
+</p>
+<p>
+If
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+definition
+is
+not
+<code>
+<ins class="diff-new">null
+</ins></code>,
+a
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+or
+<ins class="diff-new">an
+</ins>
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+the
+<a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">
+expanded
+term
+definition
+</a>
+<em class="rfc2119" title="must">
+must
+</em>
+include
+the
+<code>
+@id
+</code>
+key.
+</p>
+<p>
+If
+the
+<a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">
+expanded
+term
+definition
+</a>
+contains
+the
+<code>
+@id
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>,
+<del class="diff-old">it
+</del>
+<ins class="diff-chg">its
+value
+</ins>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+<del class="diff-old">a
+string
+having
+the
+lexical
+form
+of
+</del>
+<code>
+<ins class="diff-chg">null
+</ins></code>,<ins class="diff-chg">
+an
+</ins>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+<ins class="diff-new">a
+</ins>
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+defined
+in
+the
+defining
+<a class="tref internalDFN" title="context_definition" href="#dfn-context_definition">
+context
+definition
+</a>
+or
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+or
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+composed
+of
+any
+of
+the
+previous
+allowed
+values.
+</p>
+<p>
+If
+the
+<a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">
+expanded
+term
+definition
+</a>
+contains
+the
+<code>
+@type
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>,
+<del class="diff-old">it
+</del>
+<ins class="diff-chg">its
+value
+</ins>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+<del class="diff-old">a
+string
+having
+the
+lexical
+form
+of
+</del>
+<ins class="diff-chg">an
+</ins>
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+<ins class="diff-new">a
+</ins>
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+<del class="diff-old">or
+</del>
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+defined
+in
+the
+defining
+<a class="tref internalDFN" title="context_definition" href="#dfn-context_definition">
+context
+definition
+</a>
+or
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+<ins class="diff-new">or
+the
+</ins><code><ins class="diff-new">
+@id
+</ins></code><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-new">
+keyword
+</ins>
+</a>.
+</p>
+<p>
+If
+the
+<a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">
+expanded
+term
+definition
+</a>
+contains
+the
+<code>
+@language
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>,
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">its
+</ins>
+value
+<em class="rfc2119" title="must">
+must
+</em>
+have
+the
+lexical
+form
+described
+in
+[
+<cite>
+<a class="bibref" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+]
+or
+be
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>.
+</p>
+<p>
+If
+the
+<a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">
+expanded
+term
+definition
+</a>
+contains
+the
+<code>
+@container
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>,
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">its
+</ins>
+value
+<em class="rfc2119" title="must">
+must
+</em>
+be
+either
+<code>
+@list
+</code>,
+<code>
+@set
+</code>,
+<code>
+@language
+</code>,
+<code>
+<ins class="diff-new">@annotation
+</ins></code>,
+or
+be
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>.
+If
+the
+value
+is
+<code>
+@language
+</code>,
+when
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+is
+used
+outside
+of
+the
+<code>
+@context
+</code>,
+the
+associated
+value
+<em class="rfc2119" title="must">
+must
+</em>
+be
+a
+<del class="diff-old">JSON
+object
+whose
+keys
+are
+string
+s
+that
+are
+[
+BCP47
+]
+</del>
+<a class="tref internalDFN" title="language_map" href="#dfn-language_map">
+language
+<del class="diff-old">identifiers.
+The
+values
+associated
+with
+each
+[
+BCP47
+</del>
+<ins class="diff-chg">map
+</ins></a>.<ins class="diff-chg">
+If
+the
+value
+is
+</ins><code><ins class="diff-chg">
+@annotation
+</ins></code>,<ins class="diff-chg">
+when
+the
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins>
+</a>
+<del class="diff-old">]
+language
+string
+</del>
+<ins class="diff-chg">is
+used
+outside
+of
+the
+</ins><code><ins class="diff-chg">
+@context
+</ins></code>,<ins class="diff-chg">
+the
+associated
+value
+</ins>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+<del class="diff-old">a
+string
+or
+</del>
+an
+<del class="diff-old">array
+</del>
+<a class="tref internalDFN" title="annotation_map" href="#dfn-annotation_map">
+<ins class="diff-chg">annotation
+map
+</ins></a>.</p><p><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+Terms
+</ins>
+</a>
+<em class="rfc2119" title="must not">
+<ins class="diff-new">must
+not
+</ins></em><ins class="diff-new">
+be
+used
+in
+a
+circular
+manner.
+That
+is,
+the
+definition
+</ins>
+of
+<del class="diff-old">string
+s.
+</del>
+<ins class="diff-chg">a
+term
+cannot
+depend
+on
+the
+definition
+of
+another
+term
+if
+that
+other
+term
+also
+depends
+on
+the
+first
+term.
+</ins>
+</p>
+<p>
+See
+<a href="#the-context" class="sec-ref">
+<span class="secno">
+<del class="diff-old">3.5
+</del>
+<ins class="diff-chg">5.1
+</ins>
+</span>
+<span class="sec-title">
+The
+Context
+</span>
+</a>
+and
+<a href="#expanded-term-definition" class="sec-ref">
+<span class="secno">
+<del class="diff-old">4.5
+</del>
+<ins class="diff-chg">6.5
+</ins>
+</span>
+<span class="sec-title">
+Expanded
+Term
+Definition
+</span>
+</a>
+for
+<del class="diff-old">a
+</del>
+further
+discussion
+<del class="diff-old">of
+</del>
+<ins class="diff-chg">on
+</ins>
+contexts.
+</p>
+</section>
+<del class="diff-old">{
+ "@language": "en",
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "foaf": "http://xmlns.com/foaf/0.1/",
+ "name": "foaf:name",
+ "depiction": {"@id": "foaf:depiction", "@type": "@id"},
+ "modified": {"@id": "http://purl.org/dc/terms/modified", "@type": "xsd:dateTime"},
+ "homepage": {"@id": "foaf:homepage", "@type": "@id", "@container": "@list"}
+}
+</del>
+</section>
+<section class="appendix normative" id="relationship-to-rdf">
+<h2>
+<span class="secno">
+<del class="diff-old">B.
+</del>
+<ins class="diff-chg">C.
+</ins>
+</span>
+Relationship
+to
+<del class="diff-old">Other
+Linked
+Data
+Formats
+and
+Data
+Models
+</del>
+<ins class="diff-chg">RDF
+</ins>
+</h2>
+<p>
+<del class="diff-old">This
+section
+is
+non-normative.
+Issue
+157
+</del>
+The
+<del class="diff-old">intent
+of
+the
+Working
+Group
+and
+the
+Editors
+of
+this
+specification
+is
+to
+eventually
+align
+terminology
+used
+in
+this
+document
+with
+the
+terminology
+used
+in
+the
+</del>
+RDF
+<del class="diff-old">Concepts
+document
+</del>
+<ins class="diff-chg">data
+model,
+as
+outlined
+in
+</ins>
+[
+<cite>
+<a class="bibref" href="#bib-RDF-CONCEPTS">
+RDF-CONCEPTS
+</a>
+</cite>
+<del class="diff-old">]
+to
+the
+extent
+to
+which
+it
+makes
+sense
+to
+do
+so.
+In
+general,
+if
+there
+</del>
+<ins class="diff-chg">],
+</ins>
+is
+an
+<del class="diff-old">analogue
+to
+terminology
+used
+in
+this
+document
+in
+the
+RDF
+Concepts
+document,
+the
+preference
+is
+to
+use
+the
+terminology
+in
+the
+RDF
+Concepts
+document.
+JSON-LD
+is
+a
+specification
+</del>
+<ins class="diff-chg">abstract
+syntax
+</ins>
+for
+representing
+<del class="diff-old">Linked
+Data
+in
+JSON.
+A
+common
+way
+</del>
+<ins class="diff-chg">a
+directed
+graph
+</ins>
+of
+<del class="diff-old">working
+with
+Linked
+Data
+</del>
+<ins class="diff-chg">information.
+It
+</ins>
+is
+<del class="diff-old">through
+RDF
+,
+</del>
+<ins class="diff-chg">a
+subset
+of
+</ins><a class="tref internalDFN" title="json-ld_data_model" href="#dfn-json-ld_data_model"><ins class="diff-chg">
+JSON-LD's
+data
+model
+</ins></a><ins class="diff-chg">
+with
+a
+few
+additional
+constraints.
+The
+differences
+between
+</ins>
+the
+<del class="diff-old">Resource
+Description
+Framework.
+RDF
+</del>
+<ins class="diff-chg">two
+data
+models
+are:
+</ins></p><ul><li><ins class="diff-chg">
+In
+JSON-LD
+</ins><a class="tref internalDFN" title="graph_name" href="#dfn-graph_name"><ins class="diff-chg">
+graph
+names
+</ins></a>
+can
+be
+<del class="diff-old">expressed
+using
+JSON-LD
+by
+associating
+JSON-LD
+concepts
+such
+as
+@id
+and
+@type
+with
+the
+equivalent
+</del>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<del class="diff-old">IRI
+</del>
+<ins class="diff-chg">IRIs
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+<ins class="diff-chg">or
+</ins><a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-chg">
+blank
+nodes
+</ins></a><ins class="diff-chg">
+whereas
+</ins>
+in
+<del class="diff-old">RDF.
+Further
+information
+about
+</del>
+RDF
+<del class="diff-old">may
+</del>
+<ins class="diff-chg">graph
+names
+have
+to
+</ins>
+be
+<del class="diff-old">found
+in
+the
+[
+RDF-PRIMER
+].
+The
+JSON-LD
+markup
+examples
+below
+demonstrate
+how
+</del>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<ins class="diff-chg">IRIs
+</ins></a>.</li><li><ins class="diff-chg">
+In
+</ins>
+JSON-LD
+<a class="tref internalDFN" title="property" href="#dfn-property">
+<ins class="diff-new">properties
+</ins></a>
+can
+be
+<del class="diff-old">used
+to
+express
+semantic
+data
+marked
+up
+</del>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<ins class="diff-chg">IRIs
+</ins></a><ins class="diff-chg">
+or
+</ins><a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-chg">
+blank
+nodes
+</ins></a><ins class="diff-chg">
+whereas
+</ins>
+in
+<del class="diff-old">other
+languages
+and
+data
+models
+such
+as
+RDF,
+Turtle,
+RDFa,
+Microformats,
+and
+Microdata.
+These
+sections
+are
+merely
+provided
+as
+evidence
+that
+</del>
+<ins class="diff-chg">RDF
+properties
+(predicates)
+have
+to
+be
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-chg">
+IRIs
+</ins></a>.</li><li><ins class="diff-chg">
+In
+contrast
+to
+RDF
+graphs
+</ins><a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">
+JSON-LD
+<del class="diff-old">is
+very
+flexible
+in
+what
+it
+can
+express
+across
+different
+Linked
+Data
+</del>
+<ins class="diff-chg">graphs
+</ins>
+</a>
+<del class="diff-old">approaches.
+Further
+information
+on
+transforming
+</del>
+<ins class="diff-chg">support
+unconnected
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-chg">
+nodes
+</ins></a>,<ins class="diff-chg">
+i.e.,
+nodes
+which
+are
+not
+connected
+to
+any
+other
+node.
+</ins></li><li><ins class="diff-chg">
+In
+</ins>
+JSON-LD
+<del class="diff-old">into
+RDF
+</del>
+<ins class="diff-chg">lists
+</ins>
+are
+<del class="diff-old">detailed
+in
+</del>
+<ins class="diff-chg">part
+of
+</ins>
+the
+<ins class="diff-new">data
+model
+whereas
+in
+RDF
+they
+are
+part
+of
+a
+vocabulary,
+namely
+</ins>
+[
+<cite>
+<del class="diff-old">JSON-LD-API
+</del>
+<a class="bibref" href="#bib-RDF-SCHEMA">
+<ins class="diff-chg">RDF-SCHEMA
+</ins>
+</a>
+</cite>
+].
+<del class="diff-old">B.1
+</del>
+</li>
+<li>
+RDF
+<ins class="diff-chg">values
+are
+either
+typed
+</ins>
+<em>
+<del class="diff-old">This
+section
+is
+non-normative.
+</del>
+<ins class="diff-chg">literals
+</ins>
+</em>
+<del class="diff-old">The
+RDF
+</del>
+<ins class="diff-chg">(
+</ins><a class="tref internalDFN" title="typed_value" href="#dfn-typed_value"><ins class="diff-chg">
+typed
+values
+</ins></a><ins class="diff-chg">
+)
+or
+</ins><em><ins class="diff-chg">
+language-tagged
+strings
+</ins></em><ins class="diff-chg">
+(
+</ins><a class="tref internalDFN" title="language-tagged_string" href="#dfn-language-tagged_string"><ins class="diff-chg">
+language-tagged
+strings
+</ins></a><ins class="diff-chg">
+)
+whereas
+JSON-LD
+also
+supports
+JSON's
+native
+</ins>
+data
+<del class="diff-old">model,
+as
+outlined
+in
+</del>
+<ins class="diff-chg">types,
+i.e.,
+</ins><a class="tref internalDFN" title="number" href="#dfn-number"><ins class="diff-chg">
+number
+</ins></a>,<a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+strings
+</ins></a>,<ins class="diff-chg">
+and
+the
+boolean
+values
+</ins><a class="tref internalDFN" title="true" href="#dfn-true"><ins class="diff-chg">
+true
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="false" href="#dfn-false"><ins class="diff-chg">
+false
+</ins></a>.<ins class="diff-chg">
+The
+JSON-LD
+API
+</ins>
+[
+<cite>
+<del class="diff-old">RDF-CONCEPTS
+</del>
+<a class="bibref" href="#bib-JSON-LD-API">
+<ins class="diff-chg">JSON-LD-API
+</ins>
+</a>
+</cite>
+<del class="diff-old">],
+is
+an
+abstract
+syntax
+for
+representing
+a
+directed
+graph
+of
+information.
+</del>
+<ins class="diff-chg">]
+specification
+defines
+the
+conversion
+rules
+between
+JSON's
+native
+data
+types
+and
+RDF's
+counterparts
+to
+allow
+full
+round-tripping.
+</ins></li></ul><p><ins class="diff-chg">
+Summarized
+these
+differences
+mean
+that
+</ins>
+JSON-LD
+is
+capable
+of
+serializing
+any
+RDF
+<del class="diff-old">graph,
+</del>
+<ins class="diff-chg">graph
+or
+dataset
+</ins>
+and
+<del class="diff-old">performing
+full
+RDF
+to
+</del>
+<ins class="diff-chg">most,
+but
+not
+all,
+</ins>
+JSON-LD
+<ins class="diff-new">documents
+can
+be
+transformed
+</ins>
+to
+<del class="diff-old">RDF
+round-tripping.
+</del>
+<ins class="diff-chg">RDF.
+</ins>
+A
+complete
+description
+of
+<del class="diff-old">how
+JSON-LD
+maps
+to
+RDF
+and
+</del>
+<ins class="diff-chg">the
+</ins>
+algorithms
+<del class="diff-old">detailing
+how
+one
+can
+</del>
+<ins class="diff-chg">to
+</ins>
+convert
+from
+RDF
+to
+JSON-LD
+and
+from
+JSON-LD
+to
+RDF
+<del class="diff-old">are
+</del>
+<ins class="diff-chg">is
+</ins>
+included
+in
+the
+JSON-LD
+API
+[
+<cite>
+<a class="bibref" href="#bib-JSON-LD-API">
+JSON-LD-API
+</a>
+</cite>
+]
+specification.
+</p>
+<p>
+<ins class="diff-new">Even
+though
+</ins>
+JSON-LD
+<del class="diff-old">allows
+properties
+to
+be
+BNodes,
+while
+</del>
+<ins class="diff-chg">serializes
+</ins>
+RDF
+<del class="diff-old">does
+not.
+Expressing
+properties
+</del>
+<ins class="diff-chg">datasets,
+it
+can
+also
+be
+used
+</ins>
+as
+<del class="diff-old">BNodes
+in
+JSON-LD
+</del>
+<ins class="diff-chg">a
+RDF
+graph
+source.
+In
+that
+case,
+a
+consumer
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em>
+only
+<del class="diff-old">becomes
+an
+issue
+(and
+could
+raise
+an
+exception)
+when
+it
+is
+transformed
+</del>
+<ins class="diff-chg">use
+the
+default
+graph
+and
+ignore
+all
+named
+graphs.
+This
+allows
+servers
+</ins>
+to
+<del class="diff-old">RDF.
+</del>
+<ins class="diff-chg">expose
+data
+in,
+e.g.,
+both
+Turtle
+and
+JSON-LD
+using
+content
+negotiation.
+</ins>
+</p>
+<div class="note">
+<div class="note-title">
+<span>
+Note
+</span>
+</div>
+<p class="">
+<ins class="diff-new">Publishers
+supporting
+both
+dataset
+and
+graph
+syntaxes
+have
+to
+ensure
+</ins>
+that
+the
+<del class="diff-old">JSON-LD
+</del>
+<ins class="diff-chg">primary
+</ins>
+data
+<del class="diff-old">model
+</del>
+is
+<del class="diff-old">silent
+on
+the
+topic
+of
+unlabeled
+nodes
+.
+Nevertheless,
+this
+specification
+allows
+for
+the
+expression
+of
+unlabeled
+nodes
+,
+as
+most
+graph-based
+data
+sets
+on
+</del>
+<ins class="diff-chg">stored
+in
+</ins>
+the
+<del class="diff-old">Web
+contain
+a
+number
+of
+associated
+nodes
+</del>
+<ins class="diff-chg">default
+graph
+to
+enable
+consumers
+</ins>
+that
+<del class="diff-old">are
+</del>
+<ins class="diff-chg">do
+</ins>
+not
+<del class="diff-old">named
+</del>
+<ins class="diff-chg">support
+datasets
+to
+process
+the
+information.
+</ins></p></div></section><section class="appendix informative" id="relationship-to-other-linked-data-formats"><h2><span class="secno"><ins class="diff-chg">
+D.
+</ins></span><ins class="diff-chg">
+Relationship
+to
+Other
+Linked
+Data
+Formats
+</ins></h2><p><em><ins class="diff-chg">
+This
+section
+is
+non-normative.
+</ins></em></p><p><ins class="diff-chg">
+The
+JSON-LD
+markup
+examples
+below
+demonstrate
+how
+JSON-LD
+can
+be
+used
+to
+express
+semantic
+data
+marked
+up
+in
+other
+linked
+data
+formats
+such
+as
+Turtle,
+RDFa,
+Microformats,
+</ins>
+and
+<del class="diff-old">thus
+</del>
+<ins class="diff-chg">Microdata.
+These
+sections
+</ins>
+are
+<del class="diff-old">not
+directly
+de-referenceable.
+</del>
+<ins class="diff-chg">merely
+provided
+as
+evidence
+that
+JSON-LD
+is
+very
+flexible
+in
+what
+it
+can
+express
+across
+different
+</ins><a class="tref internalDFN" title="linked_data" href="#dfn-linked_data"><ins class="diff-chg">
+Linked
+Data
+</ins></a><ins class="diff-chg">
+approaches.
+</ins>
+</p>
+<section id="turtle">
+<h3>
+<span class="secno">
+<del class="diff-old">B.1.1
+</del>
+<ins class="diff-chg">D.1
+</ins>
+</span>
+Turtle
+</h3>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+The
+following
+are
+examples
+of
+converting
+RDF
+expressed
+in
+[
+<cite>
+<a class="bibref" href="#bib-TURTLE-TR">
+TURTLE-TR
+</a>
+</cite>
+]
+into
+JSON-LD.
+</p>
+<section id="prefix-definitions">
+<h4>
+<span class="secno">
+<del class="diff-old">B.1.1.1
+</del>
+<ins class="diff-chg">D.1.1
+</ins>
+</span>
+Prefix
+definitions
+</h4>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+The
+JSON-LD
+context
+has
+direct
+equivalents
+for
+the
+Turtle
+<code>
+@prefix
+</code>
+declaration:
+</p>
+<del class="diff-old">@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+</del>
+<div class="example"><div class="example-title"><span>Example 61</span>: A set of statements serialized in Turtle</div><pre class="example">@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+<http://manu.sporny.org/i/public> a foaf:Person;
+ foaf:name "Manu Sporny";
+foaf:homepage
+<http://manu.sporny.org/>
+.
+</pre>
+</div>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 62</span>: The same set of statements serialized in JSON-LD</div><pre class="example">{
+ "@context":
+ {
+ "foaf": "http://xmlns.com/foaf/0.1/"
+ },
+ "@id": "http://manu.sporny.org/i/public",
+ "@type": "foaf:Person",
+ "foaf:name": "Manu Sporny",
+ "foaf:homepage": { "@id": "http://manu.sporny.org/" }
+}
+</pre>
+</div>
+<div class="note">
+<div class="note-title">
+<span>
+Note
+</span>
+</div>
+<p class="">
+JSON-LD
+has
+no
+equivalent
+for
+the
+Turtle
+<code>
+@base
+</code>
+declaration.
+</p>
+</div>
+</section>
+<section id="embedding-1">
+<h4>
+<span class="secno">
+<del class="diff-old">B.1.1.2
+</del>
+<ins class="diff-chg">D.1.2
+</ins>
+</span>
+Embedding
+</h4>
+<p>
+Both
+Turtle
+and
+JSON-LD
+allow
+embedding,
+although
+Turtle
+only
+allows
+embedding
+of
+<del class="diff-old">unlabeled
+</del>
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+<ins class="diff-chg">blank
+</ins>
+nodes
+</a>.
+</p>
+</section>
+<del class="diff-old">@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+</del>
+<div class="example"><div class="example-title"><span>Example 63</span>: Embedding in Turtle</div><pre class="example">@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+<http://manu.sporny.org/i/public>
+ a foaf:Person;
+ foaf:name "Manu Sporny";
+foaf:knows
+[
+a
+foaf:Person;
+foaf:name
+"Gregg
+Kellogg"
+]
+.
+</pre>
+</div>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 64</span>: Same embedding example in JSON-LD</div><pre class="example">{
+ "@context":
+ {
+ "foaf": "http://xmlns.com/foaf/0.1/"
+ },
+ "@id": "http://manu.sporny.org/i/public",
+ "@type": "foaf:Person",
+ "foaf:name": "Manu Sporny",
+ "foaf:knows":
+ {
+ "@type": "foaf:Person",
+ "foaf:name": "Gregg Kellogg"
+ }
+}
+</pre>
+</div>
+<section id="lists">
+<h4>
+<span class="secno">
+<del class="diff-old">B.1.1.3
+</del>
+<ins class="diff-chg">D.1.3
+</ins>
+</span>
+Lists
+</h4>
+<p>
+Both
+JSON-LD
+and
+Turtle
+can
+represent
+sequential
+lists
+of
+values.
+</p>
+<del class="diff-old">@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+</del>
+<div class="example"><div class="example-title"><span>Example 65</span>: A list of values in Turtle</div><pre class="example">@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+<http://example.org/people#joebob> a foaf:Person;
+ foaf:name "Joe Bob";
+foaf:nick
+(
+"joe"
+"bob"
+"jaybee"
+)
+.
+</pre>
+</div>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 66</span>: Same example with a list of values in JSON-LD</div><pre class="example">{
+ "@context":
+ {
+ "foaf": "http://xmlns.com/foaf/0.1/"
+ },
+ "@id": "http://example.org/people#joebob",
+ "@type": "foaf:Person",
+ "foaf:name": "Joe Bob",
+ "foaf:nick":
+ {
+ "@list": [ "joe", "bob", "jaybee" ]
+ }
+}
+</pre>
+</div>
+</section>
+</section>
+<section id="rdfa">
+<h3>
+<span class="secno">
+<del class="diff-old">B.1.2
+</del>
+<ins class="diff-chg">D.2
+</ins>
+</span>
+RDFa
+</h3>
+<p>
+The
+following
+example
+describes
+three
+people
+with
+their
+respective
+names
+and
+homepages.
+</p>
+<del class="diff-old">>
+</del>
+<div class="example"><div class="example-title"><span>Example 67</span>: RDFa fragment that describes three people</div><pre class="example"><div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>>
+ <ul>
+ <li <span class="diff">typeof="foaf:Person"</span>>
+ <a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>>Bob</a>
+ </li>
+ <li <span class="diff">typeof="foaf:Person"</span>>
+ <a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>>Eve</a>
+ </li>
+ <li <span class="diff">typeof="foaf:Person"</span>>
+ <a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>>Manu</a>
+ </li>
+ </ul>
+</div>
+</pre>
+</div>
+<p>
+An
+example
+JSON-LD
+implementation
+using
+a
+single
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+is
+described
+below.
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 68</span>: Same description in JSON-LD (context shared among node objects)</div><pre class="example">{
+ "@context":
+ {
+ "foaf": "http://xmlns.com/foaf/0.1/"
+ },
+ "@graph":
+ [
+ {
+ "@type": "foaf:Person",
+ "foaf:homepage": "http://example.com/bob/",
+ "foaf:name": "Bob"
+ },
+ {
+ "@type": "foaf:Person",
+ "foaf:homepage": "http://example.com/eve/",
+ "foaf:name": "Eve"
+ },
+ {
+ "@type": "foaf:Person",
+ "foaf:homepage": "http://example.com/manu/",
+ "foaf:name": "Manu"
+ }
+ ]
+}
+</pre>
+</div>
+</section>
+<section id="microformats">
+<h3>
+<span class="secno">
+<del class="diff-old">B.1.3
+</del>
+<ins class="diff-chg">D.3
+</ins>
+</span>
+Microformats
+</h3>
+<p>
+The
+following
+example
+uses
+a
+simple
+Microformats
+hCard
+example
+to
+express
+how
+the
+Microformat
+is
+represented
+in
+JSON-LD.
+</p>
+<del class="diff-old"><div class="vcard">
+</del>
+<div class="example"><div class="example-title"><span>Example 69</span>: HTML fragment with a simple Microformats hCard</div><pre class="example"><div class="vcard">
+ <a class="url fn" href="http://tantek.com/">Tantek Çelik</a>
+</div>
+</pre>
+</div>
+<p>
+The
+representation
+of
+the
+hCard
+expresses
+the
+Microformat
+terms
+in
+the
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+and
+uses
+them
+directly
+for
+the
+<code>
+url
+</code>
+and
+<code>
+fn
+</code>
+properties.
+Also
+note
+that
+the
+Microformat
+to
+JSON-LD
+processor
+has
+generated
+the
+proper
+URL
+type
+for
+<code>
+http://tantek.com/
+</code>.
+</p>
+<del class="diff-old">{
+</del>
+<div class="example"><div class="example-title"><span>Example 70</span>: Same hCard representation in JSON-LD</div><pre class="example">{
+ "@context":
+ {
+ "vcard": "http://microformats.org/profile/hcard#vcard",
+ "url":
+ {
+ "@id": "http://microformats.org/profile/hcard#url",
+ "@type": "@id"
+ },
+ "fn": "http://microformats.org/profile/hcard#fn"
+ },
+ "@type": "vcard",
+ "url": "http://tantek.com/",
+ "fn": "Tantek Çelik"
+}
+</pre>
+</div>
+</section>
+<section id="microdata">
+<h3>
+<span class="secno">
+<del class="diff-old">B.1.4
+</del>
+<ins class="diff-chg">D.4
+</ins>
+</span>
+Microdata
+</h3>
+<p>
+The
+microdata
+example
+below
+expresses
+book
+information
+as
+a
+microdata
+Work
+item.
+</p>
+<del class="diff-old"><dl itemscope
+</del>
+<div class="example"><div class="example-title"><span>Example 71</span>: HTML fragments that describes a book using microdata</div><pre class="example"><dl itemscope
+ itemtype="http://purl.org/vocab/frbr/core#Work"
+ itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N">
+ <dt>Title</dt>
+ <dd><cite itemprop="http://purl.org/dc/terms/title">Just a Geek</cite></dd>
+ <dt>By</dt>
+ <dd><span itemprop="http://purl.org/dc/terms/creator">Wil Wheaton</span></dd>
+ <dt>Format</dt>
+ <dd itemprop="http://purl.org/vocab/frbr/core#realization"
+ itemscope
+ itemtype="http://purl.org/vocab/frbr/core#Expression"
+ itemid="http://purl.oreilly.com/products/9780596007683.BOOK">
+ <link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK">
+ Print
+ </dd>
+ <dd itemprop="http://purl.org/vocab/frbr/core#realization"
+ itemscope
+ itemtype="http://purl.org/vocab/frbr/core#Expression"
+ itemid="http://purl.oreilly.com/products/9780596802189.EBOOK">
+ <link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK">
+ Ebook
+ </dd>
+</dl>
+</pre>
+</div>
+<p>
+Note
+that
+the
+JSON-LD
+representation
+of
+the
+Microdata
+information
+stays
+true
+to
+the
+desires
+of
+the
+Microdata
+community
+to
+avoid
+contexts
+and
+instead
+refer
+to
+items
+by
+their
+full
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+</p>
+<del class="diff-old">[
+</del>
+<div class="example"><div class="example-title"><span>Example 72</span>: Same book description in JSON-LD (avoiding contexts)</div><pre class="example">[
+ {
+ "@id": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
+ "@type": "http://purl.org/vocab/frbr/core#Work",
+ "http://purl.org/dc/terms/title": "Just a Geek",
+ "http://purl.org/dc/terms/creator": "Whil Wheaton",
+ "http://purl.org/vocab/frbr/core#realization":
+ [
+ "http://purl.oreilly.com/products/9780596007683.BOOK",
+ "http://purl.oreilly.com/products/9780596802189.EBOOK"
+ ]
+ },
+ {
+ "@id": "http://purl.oreilly.com/products/9780596007683.BOOK",
+ "@type": "http://purl.org/vocab/frbr/core#Expression",
+ "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
+ },
+ {
+ "@id": "http://purl.oreilly.com/products/9780596802189.EBOOK",
+ "@type": "http://purl.org/vocab/frbr/core#Expression",
+ "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
+ }
+]
+</pre>
+</div>
+</section>
+</section>
+<section class="appendix informative" id="iana-considerations">
+<h2>
+<span class="secno">
+<del class="diff-old">B.2
+</del>
+<ins class="diff-chg">E.
+</ins>
+</span>
+IANA
+Considerations
+</h2>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+This
+section
+is
+included
+merely
+for
+standards
+community
+review
+and
+will
+be
+submitted
+to
+the
+Internet
+Engineering
+Steering
+Group
+if
+this
+specification
+becomes
+a
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+Recommendation.
+</p>
+<h2 id="application-ld-json">
+application/ld+json
+</h2>
+<dl>
+<dt>
+Type
+name:
+</dt>
+<dd>
+application
+</dd>
+<dt>
+Subtype
+name:
+</dt>
+<dd>
+ld+json
+</dd>
+<dt>
+Required
+parameters:
+</dt>
+<dd>
+None
+</dd>
+<dt>
+Optional
+parameters:
+</dt>
+<dd>
+<dl>
+<dt>
+<code>
+form
+</code>
+</dt>
+<dd>
+Determines
+the
+serialization
+form
+for
+the
+JSON-LD
+document.
+The
+only
+valid
+value
+at
+the
+moment
+is
+<code>
+expanded
+</code>.
+If
+no
+form
+is
+specified
+in
+an
+HTTP
+request
+header
+to
+an
+HTTP
+server,
+the
+server
+<em class="rfc2119" title="may">
+may
+</em>
+choose
+any
+form.
+If
+no
+form
+is
+specified
+in
+an
+HTTP
+response,
+the
+form
+<em class="rfc2119" title="must not">
+must
+not
+</em>
+be
+assumed
+to
+take
+any
+particular
+form.
+</dd>
+</dl>
+<dl>
+<dt>
+<code>
+<ins class="diff-new">profile
+</ins></code></dt><dd><ins class="diff-new">
+A
+whitespace-separated
+list
+of
+IRIs
+identifying
+specific
+constraints
+or
+conventions
+that
+apply
+to
+a
+JSON-LD
+document.
+A
+profile
+</ins><em class="rfc2119" title="must not"><ins class="diff-new">
+must
+not
+</ins></em><ins class="diff-new">
+change
+the
+semantics
+of
+the
+resource
+representation
+when
+processed
+without
+profile
+knowledge,
+so
+that
+clients
+both
+with
+and
+without
+knowledge
+of
+a
+profiled
+resource
+can
+safely
+use
+the
+same
+representation.
+The
+</ins><code><ins class="diff-new">
+profile
+</ins></code><ins class="diff-new">
+parameter
+</ins><em class="rfc2119" title="may"><ins class="diff-new">
+may
+</ins></em><ins class="diff-new">
+also
+be
+used
+by
+clients
+to
+express
+their
+preferences
+in
+the
+content
+negotiation
+process.
+It
+is
+</ins><em class="rfc2119" title="recommended"><ins class="diff-new">
+recommended
+</ins></em><ins class="diff-new">
+that
+profile
+IRIs
+are
+dereferenceable
+and
+provide
+useful
+documentation
+at
+that
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr>.<ins class="diff-new">
+This
+specification,
+however,
+does
+not
+define
+any
+formats
+for
+such
+profile
+descriptions.
+</ins></dd></dl>
+</dd>
+<dt>
+Encoding
+considerations:
+</dt>
+<dd>
+The
+same
+as
+the
+<code>
+application/json
+</code>
+MIME
+media
+type.
+</dd>
+<dt>
+Security
+considerations:
+</dt>
+<dd>
+Since
+JSON-LD
+is
+intended
+to
+be
+a
+pure
+data
+exchange
+format
+for
+directed
+graphs,
+the
+serialization
+<em class="rfc2119" title="should not">
+should
+not
+</em>
+be
+passed
+through
+a
+code
+execution
+mechanism
+such
+as
+JavaScript's
+<code>
+eval()
+</code>
+function.
+It
+is
+<em class="rfc2119" title="recommended">
+recommended
+</em>
+that
+a
+conforming
+parser
+does
+not
+attempt
+to
+directly
+evaluate
+the
+JSON-LD
+serialization
+and
+instead
+purely
+parse
+the
+input
+into
+a
+language-native
+data
+structure.
+</dd>
+<dt>
+Interoperability
+considerations:
+</dt>
+<dd>
+Not
+Applicable
+</dd>
+<dt>
+Published
+specification:
+</dt>
+<dd>
+The
+<a href="http://json-ld.org/spec/latest/">
+JSON-LD
+</a>
+specification.
+</dd>
+<dt>
+Applications
+that
+use
+this
+media
+type:
+</dt>
+<dd>
+Any
+programming
+environment
+that
+requires
+the
+exchange
+of
+directed
+graphs.
+Implementations
+of
+JSON-LD
+have
+been
+created
+for
+JavaScript,
+Python,
+Ruby,
+PHP
+and
+C++.
+</dd>
+<dt>
+Additional
+information:
+</dt>
+<dd>
+<dl>
+<dt>
+Magic
+number(s):
+</dt>
+<dd>
+Not
+Applicable
+</dd>
+<dt>
+File
+extension(s):
+</dt>
+<dd>.jsonld
+</dd>
+<dt>
+Macintosh
+file
+type
+code(s):
+</dt>
+<dd>
+TEXT
+</dd>
+</dl>
+</dd>
+<dt>
+Person
+&
+email
+address
+to
+contact
+for
+further
+information:
+</dt>
+<dd>
+Manu
+Sporny
+<msporny@digitalbazaar.com>
+</dd>
+<dt>
+Intended
+usage:
+</dt>
+<dd>
+Common
+</dd>
+<dt>
+Restrictions
+on
+usage:
+</dt>
+<dd>
+None
+</dd>
+<dt>
+Author(s):
+</dt>
+<dd>
+Manu
+Sporny,
+Gregg
+Kellogg,
+Markus
+Lanthaler,
+Dave
+Longley
+</dd>
+<dt>
+Change
+controller:
+</dt>
+<dd>
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+</dd>
+</dl>
+<p>
+Fragment
+identifiers
+used
+with
+<a href="#application-ld-json">
+application/ld+json
+</a>
+resources
+<em class="rfc2119" title="may">
+may
+</em>
+identify
+a
+node
+in
+<del class="diff-old">the
+linked
+data
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph"><ins class="diff-chg">
+JSON-LD
+</ins>
+graph
+</a>
+expressed
+in
+the
+resource.
+This
+idiom,
+which
+is
+also
+used
+in
+RDF
+[
+<cite>
+<a class="bibref" href="#bib-RDF-CONCEPTS">
+RDF-CONCEPTS
+</a>
+</cite>
+],
+gives
+a
+simple
+way
+to
+"mint"
+new,
+document-local
+IRIs
+to
+label
+nodes
+and
+therefore
+contributes
+considerably
+to
+the
+expressive
+power
+of
+JSON-LD.
+</p>
+</section>
+<section class="appendix informative" id="acknowledgements">
+<h2>
+<span class="secno">
+<del class="diff-old">B.3
+</del>
+<ins class="diff-chg">F.
+</ins>
+</span>
+Acknowledgements
+</h2>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+A
+large
+amount
+of
+thanks
+goes
+out
+to
+the
+JSON-LD
+Community
+Group
+participants
+who
+worked
+through
+many
+of
+the
+technical
+issues
+on
+the
+mailing
+list
+and
+the
+weekly
+telecons
+-
+of
+special
+mention
+are
+Niklas
+Lindström,
+François
+Daoust,
+<ins class="diff-new">Lin
+Clark,
+</ins>
+and
+Zdenko
+'Denny'
+Vrandečić.
+The
+editors
+would
+like
+to
+thank
+Mark
+Birbeck,
+who
+provided
+a
+great
+deal
+of
+the
+initial
+push
+behind
+the
+JSON-LD
+work
+via
+his
+work
+on
+RDFj.
+The
+work
+of
+Dave
+Lehn
+and
+Mike
+Johnson
+are
+appreciated
+for
+reviewing,
+and
+performing
+several
+implementations
+of
+the
+specification.
+Ian
+Davis
+is
+thanked
+for
+this
+work
+on
+RDF/JSON.
+Thanks
+also
+to
+Nathan
+Rixham,
+Bradley
+P.
+Allen,
+Kingsley
+Idehen,
+Glenn
+McDonald,
+Alexandre
+Passant,
+Danny
+Ayers,
+Ted
+Thibodeau
+Jr.,
+Olivier
+Grisel,
+Josh
+Mandel,
+Eric
+Prud'hommeaux,
+David
+Wood,
+Guus
+Schreiber,
+Pat
+Hayes,
+Sandro
+Hawke,
+and
+Richard
+Cyganiak
+for
+their
+input
+on
+the
+specification.
+</p>
+</section>
+<section id="references" class="appendix" typeof="bibo:Chapter" resource="#references" rel="bibo:chapter">
+<h2>
+<span class="secno">
+<del class="diff-old">C.
+</del>
+<ins class="diff-chg">G.
+</ins>
+</span>
+References
+</h2>
+<section id="normative-references" typeof="bibo:Chapter" resource="#normative-references" rel="bibo:chapter">
+<h3>
+<span class="secno">
+<del class="diff-old">C.1
+</del>
+<ins class="diff-chg">G.1
+</ins>
+</span>
+Normative
+references
+</h3>
+<dl class="bibliography" about="">
+<dt id="bib-BCP47">
+[BCP47]
+</dt>
+<dd rel="dcterms:requires">
+A.
+Phillips;
+M.
+Davis.
+<a href="http://tools.ietf.org/html/bcp47">
+<cite>
+Tags
+for
+Identifying
+Languages
+</cite>
+</a>
+September
+2009.
+IETF
+Best
+Current
+Practice.
+URL:
+<a href="http://tools.ietf.org/html/bcp47">
+http://tools.ietf.org/html/bcp47
+</a>
+</dd>
+<dt id="bib-RDF-CONCEPTS">
+[RDF-CONCEPTS]
+</dt>
+<dd rel="dcterms:requires">
+<cite>
+<a href="http://www.w3.org/TR/2011/WD-rdf11-concepts-20110830/">
+RDF
+1.1
+Concepts
+and
+Abstract
+Syntax
+</a>
+</cite>
+Richard
+Cyganiak,
+David
+Wood,
+Editors.
+World
+Wide
+Web
+Consortium
+(work
+in
+progress).
+30
+May
+2012.
+Editor's
+Draft.
+This
+edition
+of
+the
+JSON-LD
+Syntax
+specification
+is
+http://www.w3.org/TR/2011/WD-rdf11-concepts-20110830/.
+The
+<a href="http://www.w3.org/TR/rdf11-concepts/">
+latest
+edition
+of
+the
+JSON-LD
+Syntax
+</a>
+is
+available
+at
+http://www.w3.org/TR/rdf11-concepts/
+</dd>
+<dt id="bib-RFC2119">
+<ins class="diff-new">[RFC2119]
+</ins></dt><dd rel="dcterms:requires"><ins class="diff-new">
+S.
+Bradner.
+</ins><a href="http://www.ietf.org/rfc/rfc2119.txt"><cite><ins class="diff-new">
+Key
+words
+for
+use
+in
+RFCs
+to
+Indicate
+Requirement
+Levels.
+</ins></cite></a><ins class="diff-new">
+March
+1997.
+Internet
+RFC
+2119.
+URL:
+</ins><a href="http://www.ietf.org/rfc/rfc2119.txt"><ins class="diff-new">
+http://www.ietf.org/rfc/rfc2119.txt
+</ins></a></dd>
+<dt id="bib-RFC3987">
+[RFC3987]
+</dt>
+<dd rel="dcterms:requires">
+M.
+Dürst;
+M.
+Suignard.
+<a href="http://www.ietf.org/rfc/rfc3987.txt">
+<cite>
+Internationalized
+Resource
+Identifiers
+(IRIs).
+</cite>
+</a>
+January
+2005.
+Internet
+RFC
+3987.
+URL:
+<a href="http://www.ietf.org/rfc/rfc3987.txt">
+http://www.ietf.org/rfc/rfc3987.txt
+</a>
+</dd>
+<dt id="bib-RFC4627">
+[RFC4627]
+</dt>
+<dd rel="dcterms:requires">
+D.
+Crockford.
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+<cite>
+The
+application/json
+Media
+Type
+for
+JavaScript
+Object
+Notation
+(JSON)
+</cite>
+</a>
+July
+2006.
+Internet
+RFC
+4627.
+URL:
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+http://www.ietf.org/rfc/rfc4627.txt
+</a>
+</dd>
+<dt id="bib-RFC5988">
+[RFC5988]
+</dt>
+<dd rel="dcterms:requires">
+<cite>
+<a href="http://tools.ietf.org/rfc/rfc5988">
+Web
+Linking
+</a>
+</cite>
+M.
+Nottingham.
+Editor.
+October
+2010.
+IETF
+Standard.
+URL:
+<a href="http://tools.ietf.org/rfc/rfc5988.txt">
+http://tools.ietf.org/rfc/rfc5988.txt
+</a>
+</dd>
+</dl>
+</section>
+<section id="informative-references" typeof="bibo:Chapter" resource="#informative-references" rel="bibo:chapter">
+<h3>
+<span class="secno">
+<del class="diff-old">C.2
+</del>
+<ins class="diff-chg">G.2
+</ins>
+</span>
+Informative
+references
+</h3>
+<dl class="bibliography" about="">
+<dt id="bib-JSON-LD-API">
+[JSON-LD-API]
+</dt>
+<dd rel="dcterms:references">
+<cite>
+<a href="http://json-ld.org/spec/ED/json-ld-api/20120524/">
+The
+JSON-LD
+API
+1.0
+</a>
+</cite>
+Manu
+Sporny,
+Gregg
+Kellogg,
+Dave
+Longley,
+Markus
+Lanthaler,
+Editors.
+World
+Wide
+Web
+Consortium
+(work
+in
+progress).
+24
+May
+2012.
+Editor's
+Draft.
+This
+edition
+of
+the
+JSON-LD
+Syntax
+specification
+is
+http://json-ld.org/spec/ED/json-ld-api/20120524/.
+The
+<a href="http://json-ld.org/spec/latest/json-ld-api/">
+latest
+edition
+of
+the
+JSON-LD
+Syntax
+</a>
+is
+available
+at
+http://json-ld.org/spec/latest/json-ld-api/
+</dd>
+<del class="diff-old">[RDF-PRIMER]
+</del>
+<dt id="bib-RDF-SCHEMA">
+<ins class="diff-chg">[RDF-SCHEMA]
+</ins>
+</dt>
+<del class="diff-old">Frank
+Manola;
+Eric
+Miller.
+</del>
+<dd rel="dcterms:references">
+<ins class="diff-chg">Dan
+Brickley;
+Ramanathan
+V.
+Guha.
+</ins><a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">
+<cite>
+RDF
+<del class="diff-old">Primer.
+</del>
+<ins class="diff-chg">Vocabulary
+Description
+Language
+1.0:
+RDF
+Schema.
+</ins>
+</cite>
+</a>
+10
+February
+2004.
+W3C
+Recommendation.
+URL:
+<del class="diff-old">http://www.w3.org/TR/2004/REC-rdf-primer-20040210/
+[RDF-SPARQL-QUERY]
+Andy
+Seaborne;
+Eric
+Prud'hommeaux.
+SPARQL
+Query
+Language
+for
+RDF.
+15
+January
+2008.
+W3C
+Recommendation.
+URL:
+http://www.w3.org/TR/2008/REC-rdf-sparql-query-20080115
+</del>
+<a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">
+<ins class="diff-chg">http://www.w3.org/TR/2004/REC-rdf-schema-20040210
+</ins>
+</a>
+</dd>
+<dt id="bib-RDFA-CORE">
+[RDFA-CORE]
+</dt>
+<dd rel="dcterms:references">
+Shane
+McCarron;
+et
+al.
+<a href="http://www.w3.org/TR/2012/REC-rdfa-core-20120607/">
+<cite>
+RDFa
+Core
+1.1:
+Syntax
+and
+processing
+rules
+for
+embedding
+RDF
+through
+attributes.
+</cite>
+</a>
+7
+June
+2012.
+W3C
+Recommendation.
+URL:
+<a href="http://www.w3.org/TR/2012/REC-rdfa-core-20120607/">
+http://www.w3.org/TR/2012/REC-rdfa-core-20120607/
+</a>
+</dd>
+<dt id="bib-TURTLE-TR">
+[TURTLE-TR]
+</dt>
+<dd rel="dcterms:references">
+Eric
+Prud'hommeaux,
+Gavin
+Carothers.
+<cite>
+<a href="http://www.w3.org/TR/2011/WD-turtle-20110809/">
+Turtle:
+Terse
+RDF
+Triple
+Language.
+</a>
+</cite>
+09
+August
+2011.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/2011/WD-turtle-20110809/">
+http://www.w3.org/TR/2011/WD-turtle-20110809/
+</a>
+</dd>
+</dl>
+</section>
+</section>
+</body>
+</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20121225/index.html Sun Dec 23 13:52:00 2012 -0500
@@ -0,0 +1,3433 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML+RDFa 1.1//EN' 'http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" prefix='bibo: http://purl.org/ontology/bibo/' typeof="bibo:Document">
+<head>
+<title>JSON-LD Syntax 1.0</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--
+ === NOTA BENE ===
+ For the three scripts below, if your spec resides on dev.w3 you can check them
+ out in the same tree and use relative links so that they'll work offline,
+ -->
+
+
+
+
+<style type="text/css">
+ .diff { font-weight:bold; color:#0a3; }
+ table, thead, tr, td { padding: 5px; border-width: 1px; border-spacing: 0px; border-style: solid; border-collapse: collapse;}
+</style>
+<style>/*****************************************************************
+ * ReSpec 3 CSS
+ * Robin Berjon - http://berjon.com/
+ *****************************************************************/
+
+/* --- INLINES --- */
+em.rfc2119 {
+ text-transform: lowercase;
+ font-variant: small-caps;
+ font-style: normal;
+ color: #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+ border: none;
+}
+
+dfn {
+ font-weight: bold;
+}
+
+a.internalDFN {
+ color: inherit;
+ border-bottom: 1px solid #99c;
+ text-decoration: none;
+}
+
+a.externalDFN {
+ color: inherit;
+ border-bottom: 1px dotted #ccc;
+ text-decoration: none;
+}
+
+a.bibref {
+ text-decoration: none;
+}
+
+cite .bibref {
+ font-style: normal;
+}
+
+code {
+ color: #ff4500;
+}
+
+
+/* --- --- */
+ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+/* --- TOC --- */
+.toc a, .tof a {
+ text-decoration: none;
+}
+
+a .secno, a .figno {
+ color: #000;
+}
+
+ul.tof, ol.tof {
+ list-style: none outside none;
+}
+
+.caption {
+ margin-top: 0.5em;
+ font-style: italic;
+}
+
+/* --- TABLE --- */
+table.simple {
+ border-spacing: 0;
+ border-collapse: collapse;
+ border-bottom: 3px solid #005a9c;
+}
+
+.simple th {
+ background: #005a9c;
+ color: #fff;
+ padding: 3px 5px;
+ text-align: left;
+}
+
+.simple th[scope="row"] {
+ background: inherit;
+ color: inherit;
+ border-top: 1px solid #ddd;
+}
+
+.simple td {
+ padding: 3px 10px;
+ border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+ background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+ margin-top: 0;
+}
+
+.section dd > p:last-child {
+ margin-bottom: 0;
+}
+
+.section dd {
+ margin-bottom: 1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+ margin-bottom: 0;
+}
+</style><style>/* --- EXAMPLES --- */
+div.example-title {
+ min-width: 7.5em;
+ color: #b9ab2d;
+}
+div.example-title span {
+ text-transform: uppercase;
+}
+aside.example, div.example, div.illegal-example {
+ padding: 0.5em;
+ margin: 1em 0;
+ position: relative;
+ clear: both;
+}
+div.illegal-example { color: red }
+div.illegal-example p { color: black }
+aside.example, div.example {
+ padding: .5em;
+ border-left-width: .5em;
+ border-left-style: solid;
+ border-color: #e0cb52;
+ background: #fcfaee;
+}
+
+aside.example div.example {
+ border-left-width: .1em;
+ border-color: #999;
+ background: #fff;
+}
+aside.example div.example div.example-title {
+ color: #999;
+}
+</style><style>/* --- ISSUES/NOTES --- */
+div.issue-title, div.note-title {
+ padding-right: 1em;
+ min-width: 7.5em;
+ color: #b9ab2d;
+}
+div.issue-title { color: #e05252; }
+div.note-title { color: #52e052; }
+div.issue-title span, div.note-title span {
+ text-transform: uppercase;
+}
+div.note, div.issue {
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+.note > p:first-child, .issue > p:first-child { margin-top: 0 }
+.issue, .note {
+ padding: .5em;
+ border-left-width: .5em;
+ border-left-style: solid;
+}
+div.issue, div.note {
+ padding: 0.5em;
+ margin: 1em 0;
+ position: relative;
+ clear: both;
+}
+span.note, span.issue { padding: .1em .5em .15em; }
+
+.issue {
+ border-color: #e05252;
+ background: #fbe9e9;
+}
+.note {
+ border-color: #52e052;
+ background: #e9fbe9;
+}
+
+
+</style><link rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/W3C-ED" />
+<!--[if lt IE 9]><script src='http://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]-->
+
+<!--[if lt IE 9]><script src='http://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]-->
+</head>
+
+<body><div class="head">
+ <p>
+
+ <a href="http://www.w3.org/"><img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C" /></a>
+
+ </p>
+ <h1 class="title" id="title">JSON-LD Syntax 1.0</h1>
+
+ <h2 id="subtitle">A JSON Serialization for Linking Data</h2>
+
+ <h2 id="w3c-editor-s-draft-25-december-2012"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft 25 December 2012</h2>
+ <dl>
+
+ <dt>This version:</dt>
+ <dd><a href="http://dvcs.w3.org/hg/json-ld/file/default/spec/ED/json-ld-syntax/20121225/index.html">http://dvcs.w3.org/hg/json-ld/file/default/spec/ED/json-ld-syntax/20121225/index.html</a></dd>
+ <dt>Latest published version:</dt>
+ <dd><a href="http://www.w3.org/TR/json-ld-syntax/">http://www.w3.org/TR/json-ld-syntax/</a></dd>
+
+
+ <dt>Latest editor's draft:</dt>
+ <dd><a href="http://dvcs.w3.org/hg/json-ld/raw-file/default/spec/latest/json-ld-syntax/index.html">http://dvcs.w3.org/hg/json-ld/raw-file/default/spec/latest/json-ld-syntax/index.html</a></dd>
+
+
+
+
+
+
+
+
+ <dt>Editors:</dt>
+ <dd rel="bibo:editor" inlist=""><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Manu Sporny" href="http://manu.sporny.org/">Manu Sporny</a>, <a rel="foaf:workplaceHomepage" href="http://digitalbazaar.com/">Digital Bazaar</a></span>
+</dd>
+<dd rel="bibo:editor" inlist=""><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Gregg Kellogg" href="http://greggkellogg.net/">Gregg Kellogg</a>, <a rel="foaf:workplaceHomepage" href="http://kellogg-assoc.com/">Kellogg Associates</a></span>
+</dd>
+<dd rel="bibo:editor" inlist=""><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Markus Lanthaler" href="http://www.markus-lanthaler.com/">Markus Lanthaler</a>, <a rel="foaf:workplaceHomepage" href="http://www.tugraz.at/">Graz University of Technology</a></span>
+</dd>
+
+
+ <dt>Authors:</dt>
+ <dd rel="dcterms:contributor"><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Manu Sporny" href="http://digitalbazaar.com/">Manu Sporny</a>, <a rel="foaf:workplaceHomepage" href="http://digitalbazaar.com/">Digital Bazaar</a></span>
+</dd>
+<dd rel="dcterms:contributor"><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Dave Longley" href="http://digitalbazaar.com/">Dave Longley</a>, <a rel="foaf:workplaceHomepage" href="http://digitalbazaar.com/">Digital Bazaar</a></span>
+</dd>
+<dd rel="dcterms:contributor"><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Gregg Kellogg" href="http://greggkellogg.net/">Gregg Kellogg</a>, <a rel="foaf:workplaceHomepage" href="http://kellogg-assoc.com/">Kellogg Associates</a></span>
+</dd>
+<dd rel="dcterms:contributor"><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Markus Lanthaler" href="http://www.markus-lanthaler.com/">Markus Lanthaler</a>, <a rel="foaf:workplaceHomepage" href="http://www.tugraz.at/">Graz University of Technology</a></span>
+</dd>
+<dd rel="dcterms:contributor"><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Mark Birbeck" href="http://webbackplane.com/">Mark Birbeck</a>, <a rel="foaf:workplaceHomepage" href="http://webbackplane.com/">Backplane Ltd.</a></span>
+</dd>
+
+
+ </dl>
+
+
+ <p>
+
+ This document is also available in this non-normative format:
+
+ <a href="diff-20120930.html">diff to previous version</a>
+ </p>
+
+
+
+
+ <p class="copyright">
+ <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> ©
+ 2010-2012
+
+ <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup>
+ (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>,
+ <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>,
+ <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved.
+ <abbr title="World Wide Web Consortium">W3C</abbr> <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
+ <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and
+ <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.
+ </p>
+
+
+ <hr />
+</div>
+<section id="abstract" class="introductory" property="dcterms:abstract" datatype="" typeof="bibo:Chapter" resource="#abstract" rel="bibo:chapter"><h2>Abstract</h2>
+<p>
+JSON has proven to be a highly useful object serialization and messaging format.
+In an attempt to harmonize the representation of <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a>
+in JSON, this specification outlines a common JSON representation format for
+expressing directed graphs; mixing both Linked Data and non-Linked Data in
+a single document.
+</p>
+</section><section id="sotd" class="introductory" typeof="bibo:Chapter" resource="#sotd" rel="bibo:chapter"><h2>Status of This Document</h2>
+
+
+
+ <p>
+ <em>This section describes the status of this document at the time of its publication. Other
+ documents may supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and the latest revision
+ of this technical report can be found in the <a href="http://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical reports
+ index</a> at http://www.w3.org/TR/.</em>
+ </p>
+
+<p>This document has been under development for over 20 months in the
+JSON for Linking Data Community Group. The document has recently been
+transferred to the RDF Working Group for review, improvement, and publication
+along the Recommendation track. The specification has undergone significant
+development, review, and changes during the course of the last 20 months.
+</p>
+<p>There are several independent
+<a href="http://json-ld.org/#impl">interoperable implementations</a> of
+this specification. There is
+a <a href="https://github.com/json-ld/json-ld.org/tree/master/test-suite">fairly complete test suite</a>
+and a <a href="http://json-ld.org/playground/">live JSON-LD editor</a>
+that is capable of demonstrating the features described in
+this document. While development on implementations, the test suite
+and the live editor will continue, they are believed to be mature enough
+to be integrated into a non-production system at this point in time with
+the expectation that they could be used in a production system within the
+next year.
+</p>
+
+<p>There are a number of ways that one may participate in the development of
+this specification:</p>
+
+<ul>
+ <li>If you want to make sure that your feedback is formally addressed by
+ the RDF Working Group, you should send it to public-rdf-comments:
+ <a href="http://lists.w3.org/Archives/Public/public-rdf-comments/">public-rdf-comments@w3.org</a></li>
+
+ <li>Ad-hoc technical discussion primarily occurs on the public community mailing list:
+ <a href="http://lists.w3.org/Archives/Public/public-linked-json/">public-linked-json@w3.org</a></li>
+
+ <li><a href="http://json-ld.org/minutes/">Public JSON-LD Community Group teleconferences</a>
+ are held on Tuesdays at 1500UTC every week.</li>
+
+ <li>RDF Working Group teleconferences are held on Wednesdays at 1500UTC
+ every week. Participation is limited to RDF Working Group members.</li>
+
+ <li>Specification bugs and issues should be reported in the
+ <a href="https://github.com/json-ld/json-ld.org/issues">issue tracker</a>
+ if you do not want to send an e-mail to the public-rdf-comments mailing
+ list.</li>
+
+ <li><a href="https://github.com/json-ld/json-ld.org/tree/master/spec">Source code</a>
+ for the specification can be found on Github.</li>
+
+ <li>The <a href="http://webchat.freenode.net/?channels=json-ld">#json-ld</a>
+ IRC channel is available for real-time discussion on irc.freenode.net.</li>
+</ul>
+
+
+ <p>
+ This document was published by the <a href="http://www.w3.org/2011/rdf-wg/">RDF Working Group</a> as an Editor's Draft.
+
+ If you wish to make comments regarding this document, please send them to
+ <a href="mailto:public-rdf-comments@w3.org">public-rdf-comments@w3.org</a>
+ (<a href="mailto:public-rdf-comments-request@w3.org?subject=subscribe">subscribe</a>,
+ <a href="http://lists.w3.org/Archives/Public/public-rdf-comments/">archives</a>).
+
+
+ All feedback is welcome.
+ </p>
+
+ <p>
+ Publication as an Editor's Draft does not imply endorsement by the <abbr title="World Wide Web Consortium">W3C</abbr> Membership.
+ This is a draft document and may be updated, replaced or obsoleted by other documents at
+ any time. It is inappropriate to cite this document as other than work in progress.
+ </p>
+
+
+ <p>
+
+ This document was produced by a group operating under the
+ <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
+
+
+
+
+ <abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a href="http://www.w3.org/2004/01/pp-impl/46168/status" rel="disclosure">public list of any patent disclosures</a>
+
+ made in connection with the deliverables of the group; that page also includes instructions for
+ disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains
+ <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the
+ information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
+ 6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
+
+
+ </p>
+
+
+
+
+</section><section id="toc"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li></ul></li><li class="tocline"><a href="#design-goals-and-rationale" class="tocxref"><span class="secno">2. </span>Design Goals and Rationale</a></li><li class="tocline"><a href="#terminology" class="tocxref"><span class="secno">3. </span>Terminology</a><ul class="toc"><li class="tocline"><a href="#general-terminology" class="tocxref"><span class="secno">3.1 </span>General Terminology</a></li><li class="tocline"><a href="#syntax-tokens-and-keywords" class="tocxref"><span class="secno">3.2 </span>Syntax Tokens and Keywords</a></li></ul></li><li class="tocline"><a href="#conformance" class="tocxref"><span class="secno">4. </span>Conformance</a></li><li class="tocline"><a href="#basic-concepts" class="tocxref"><span class="secno">5. </span>Basic Concepts</a><ul class="toc"><li class="tocline"><a href="#the-context" class="tocxref"><span class="secno">5.1 </span>The Context</a></li><li class="tocline"><a href="#from-json-to-json-ld" class="tocxref"><span class="secno">5.2 </span>From JSON to JSON-LD</a></li><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">5.3 </span>IRIs</a></li><li class="tocline"><a href="#node-identifiers" class="tocxref"><span class="secno">5.4 </span>Node Identifiers</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">5.5 </span>Specifying the Type</a></li><li class="tocline"><a href="#string-internationalization" class="tocxref"><span class="secno">5.6 </span>String Internationalization</a></li><li class="tocline"><a href="#json-ld-syntax" class="tocxref"><span class="secno">5.7 </span>JSON-LD Syntax</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">6. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#compact-iris" class="tocxref"><span class="secno">6.1 </span>Compact IRIs</a></li><li class="tocline"><a href="#typed-values" class="tocxref"><span class="secno">6.2 </span>Typed Values</a></li><li class="tocline"><a href="#language-tagged-strings" class="tocxref"><span class="secno">6.3 </span>Language-tagged Strings</a></li><li class="tocline"><a href="#referencing-contexts-from-json-documents" class="tocxref"><span class="secno">6.4 </span>Referencing Contexts from JSON Documents</a></li><li class="tocline"><a href="#expanded-term-definition" class="tocxref"><span class="secno">6.5 </span>Expanded Term Definition</a></li><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">6.6 </span>Type Coercion</a></li><li class="tocline"><a href="#property-generators" class="tocxref"><span class="secno">6.7 </span>Property Generators</a></li><li class="tocline"><a href="#iri-expansion-within-a-context" class="tocxref"><span class="secno">6.8 </span><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion Within a Context</a></li><li class="tocline"><a href="#sets-and-lists" class="tocxref"><span class="secno">6.9 </span>Sets and Lists</a></li><li class="tocline"><a href="#embedding" class="tocxref"><span class="secno">6.10 </span>Embedding</a></li><li class="tocline"><a href="#named-graphs" class="tocxref"><span class="secno">6.11 </span>Named Graphs</a></li><li class="tocline"><a href="#identifying-blank-nodes" class="tocxref"><span class="secno">6.12 </span>Identifying Blank Nodes</a></li><li class="tocline"><a href="#aliasing-keywords" class="tocxref"><span class="secno">6.13 </span>Aliasing Keywords</a></li><li class="tocline"><a href="#data-annotations" class="tocxref"><span class="secno">6.14 </span>Data Annotations</a></li><li class="tocline"><a href="#explicitly-ignoring-data" class="tocxref"><span class="secno">6.15 </span>Explicitly Ignoring Data</a></li><li class="tocline"><a href="#expanded-document-form" class="tocxref"><span class="secno">6.16 </span>Expanded Document Form</a></li><li class="tocline"><a href="#compact-document-form" class="tocxref"><span class="secno">6.17 </span>Compact Document Form</a></li></ul></li><li class="tocline"><a href="#data-model" class="tocxref"><span class="secno">A. </span>Data Model</a></li><li class="tocline"><a href="#json-ld-grammar" class="tocxref"><span class="secno">B. </span>JSON-LD Grammar</a><ul class="toc"><li class="tocline"><a href="#grammar-node-object" class="tocxref"><span class="secno">B.1 </span>Node Object</a></li><li class="tocline"><a href="#grammar-term-reference" class="tocxref"><span class="secno">B.2 </span>Term</a></li><li class="tocline"><a href="#grammar-language-map" class="tocxref"><span class="secno">B.3 </span>Language Map</a></li><li class="tocline"><a href="#grammar-annotation-map" class="tocxref"><span class="secno">B.4 </span>Annotation Map</a></li><li class="tocline"><a href="#grammar-expanded-values" class="tocxref"><span class="secno">B.5 </span>Expanded Values</a></li><li class="tocline"><a href="#grammar-set-list" class="tocxref"><span class="secno">B.6 </span>List and Set Values</a></li><li class="tocline"><a href="#grammar-context" class="tocxref"><span class="secno">B.7 </span>Context Definition</a></li></ul></li><li class="tocline"><a href="#relationship-to-rdf" class="tocxref"><span class="secno">C. </span>Relationship to RDF</a></li><li class="tocline"><a href="#relationship-to-other-linked-data-formats" class="tocxref"><span class="secno">D. </span>Relationship to Other Linked Data Formats</a><ul class="toc"><li class="tocline"><a href="#turtle" class="tocxref"><span class="secno">D.1 </span>Turtle</a><ul class="toc"><li class="tocline"><a href="#prefix-definitions" class="tocxref"><span class="secno">D.1.1 </span>Prefix definitions</a></li><li class="tocline"><a href="#embedding-1" class="tocxref"><span class="secno">D.1.2 </span>Embedding</a></li><li class="tocline"><a href="#lists" class="tocxref"><span class="secno">D.1.3 </span>Lists</a></li></ul></li><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">D.2 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">D.3 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">D.4 </span>Microdata</a></li></ul></li><li class="tocline"><a href="#iana-considerations" class="tocxref"><span class="secno">E. </span>IANA Considerations</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">F. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">G. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">G.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">G.2 </span>Informative references</a></li></ul></li></ul></section>
+
+
+
+<section class="informative" id="introduction">
+
+<!--OddPage-->
+<h2><span class="secno">1. </span>Introduction</h2><p><em>This section is non-normative.</em></p>
+
+ <p><dfn title="linked_data" id="dfn-linked_data">Linked Data</dfn> is a technique for creating a network
+ of inter-connected data across different documents and Web sites. In general,
+ Linked Data has four properties: 1) it uses <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a>
+ to name things; 2) it uses HTTP <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a>
+ for those names; 3) the name <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a>, when dereferenced,
+ provide more information about the name; and 4) the data expresses links
+ to data on other Web sites. These properties allow data published on the Web
+ to work much like Web pages do today. One can start at one piece of Linked Data,
+ and follow the links to other pieces of data that are hosted on different
+ sites across the Web.</p>
+
+ <p>JSON-LD is designed as a lightweight syntax to express <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a> in
+ JSON [<cite><a class="bibref" href="#bib-RFC4627">RFC4627</a></cite>]. It is primarily intended to be a way to use Linked Data in
+ Web-based programming environments. It is also useful when building interoperable
+ Web services and when storing Linked Data in JSON-based storage engines. Since
+ JSON-LD is 100% compatible with JSON the large number of JSON parsers and libraries
+ available today can be reused. Additionally to all the features JSON provides,
+ JSON-LD introduces:</p>
+
+ <ul>
+ <li>a universal identifier mechanism for <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON objects</a> via the
+ use of <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a>,</li>
+ <li>a way to disambiguate the keys used between multiple JSON documents
+ by mapping them to <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a> via a <a class="tref internalDFN" title="context" href="#dfn-context">context</a>,</li>
+ <li>a mechanism in which a value in a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> may refer
+ to a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> on a different site on the Web,</li>
+ <li>the ability to express the language associated with a <a class="tref internalDFN" title="string" href="#dfn-string">string</a></li>
+ <li>a way to associate datatypes with values such as dates, times, weights,
+ and distances,</li>
+ <li>and a facility to express one or more directed graphs, such as a social
+ network, in a single document.</li>
+ </ul>
+
+ <p>Developers that require any of the facilities listed above or need to serialize
+ an RDF graph or dataset [<cite><a class="bibref" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>] in a JSON-based syntax will find
+ JSON-LD of interest. The syntax is designed to not disturb already deployed
+ systems running on JSON, but provide a smooth upgrade path from JSON to
+ JSON-LD.</p>
+
+ <section id="how-to-read-this-document">
+ <h3><span class="secno">1.1 </span>How to Read this Document</h3><p><em>This section is non-normative.</em></p>
+
+ <p>This document is a detailed specification for a serialization of Linked
+ Data in JSON. The document is primarily intended for the following audiences:</p>
+
+ <ul>
+ <li>Software developers that want to encode Linked Data in a variety of
+ programing languages that can use JSON.</li>
+ <li>Software developers that want to understand the design decisions and
+ language syntax for JSON-LD.</li>
+ <li>Software developers that want to implement processors and APIs for
+ JSON-LD.</li>
+ </ul>
+
+ <p>This specification does not describe the programming interfaces for the
+ JSON-LD Syntax. The specification that describes the programming interfaces
+ for JSON-LD documents is the JSON-LD Application Programming Interface
+ [<cite><a class="bibref" href="#bib-JSON-LD-API">JSON-LD-API</a></cite>].</p>
+
+ <p>To understand the basics in this specification you must first be familiar with
+ JSON, which is detailed in [<cite><a class="bibref" href="#bib-RFC4627">RFC4627</a></cite>].</p>
+ </section>
+</section>
+
+<section class="informative" id="design-goals-and-rationale">
+
+<!--OddPage-->
+<h2><span class="secno">2. </span>Design Goals and Rationale</h2><p><em>This section is non-normative.</em></p>
+
+<p>A number of design goals were established before the creation of this
+ markup language:</p>
+
+<dl>
+ <dt>Simplicity</dt>
+ <dd>No extra
+ processors or software libraries should be necessary to use JSON-LD in its most
+ basic form. The language will provide developers with a very easy
+ learning curve. Developers only need to know JSON and two
+ <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keywords</a> (<code>@context</code>
+ and <code>@id</code>) to use the basic functionality in JSON-LD.</dd>
+ <dt>Compatibility</dt>
+ <dd>The JSON-LD markup must be 100% compatible with JSON. This ensures that
+ all of the standard JSON libraries work seamlessly with JSON-LD documents.</dd>
+ <dt>Expressiveness</dt>
+ <dd>The syntax must be able to express directed graphs, which have been proven
+ to be able to express almost every real world data model.</dd>
+ <dt>Terseness</dt>
+ <dd>The JSON-LD syntax must be very terse and human readable, requiring as
+ little effort as possible from the developer.</dd>
+
+<!--<dt>Pragmatism</dt>
+ <dd>Mixing the expression of pure Linked Data with data that is not
+ linked was an approach that was driven by pragmatism. JSON-LD attempts to be
+ more practical than theoretical in its approach to Linked Data.</dd>-->
+
+ <dt>Zero Edits, most of the time</dt>
+ <dd>JSON-LD must provide a
+ <a href="#referencing-contexts-from-json-documents">mechanism</a>
+ that allows developers to reference <a class="tref internalDFN" title="context" href="#dfn-context">contexts</a> in
+ responses using plain old JSON. This allows organizations that have
+ already deployed large JSON-based infrastructure to use JSON-LD's features
+ in a way that is not disruptive to their day-to-day operations and is
+ transparent to their current customers. At times, mapping JSON to
+ a graph representation can become difficult. In these instances, rather than
+ having JSON-LD support an esoteric use case, we chose not to support the
+ use case and support a simplified syntax instead. So, while Zero Edits is
+ a design goal, it is not always possible without adding great complexity to
+ the language.
+ </dd>
+ <dt>One-pass Processing</dt>
+ <dd>JSON-LD supports one-pass processing, which results in a very small memory
+ footprint when processing documents. For example, to expand a JSON-LD document
+ from a compacted form, only one pass is required over the data.</dd>
+
+<!--<dt>Linked Data-centric</dt>
+ <dd>The focus on Linked Data is placed at a much higher priority than the
+ focus on the Semantic Web. One outcome of this ordering of
+ priorities is an aggressively reduced focus on the Semantic Web stack.
+ While this may be off-putting to proponents of the Semantic Web, the audience
+ for this specification are Web developers that want a gentler introduction
+ and a simpler technology stack for using Linked Data in their Web applications.
+ Semantic Web concepts, such as conversion to and from RDF, are fully supported
+ by JSON-LD, but the implementation of these features are not elaborated upon
+ in this specification. See <a href="#relationship-to-other-linked-data-formats"></a>
+ for more information about how JSON-LD integrates into the more traditional
+ Semantic Web stack.
+ </dd>-->
+
+</dl>
+</section>
+
+<section class="normative" id="terminology">
+
+<!--OddPage-->
+<h2><span class="secno">3. </span>Terminology</h2>
+
+<section id="general-terminology">
+ <h3><span class="secno">3.1 </span>General Terminology</h3>
+
+ <p>This document uses the following terms as defined in JSON [<cite><a class="bibref" href="#bib-RFC4627">RFC4627</a></cite>]. Refer
+ to the <em>JSON Grammar</em> section in [<cite><a class="bibref" href="#bib-RFC4627">RFC4627</a></cite>] for formal definitions.</p>
+
+ <dl>
+ <dt><dfn title="json_object" id="dfn-json_object">JSON object</dfn></dt><dd>
+ An object structure is represented as a pair of curly brackets
+ surrounding zero or more key-value pairs. A key is a
+ <a class="tref internalDFN" title="string" href="#dfn-string">string</a>. A single colon comes after each key, separating the
+ key from the value. A single comma separates a value from a following
+ key.
+ </dd>
+ <dt><dfn title="array" id="dfn-array">array</dfn></dt>
+ <dd>
+ An array structure is represented as square brackets surrounding zero
+ or more values (or elements). Elements are separated by commas.
+ In JSON, an array is an <em>ordered</em> sequence of zero or more values.
+ While JSON-LD uses the same array representation as JSON,
+ the collection is <em>unordered</em> by default. While order is
+ preserved in regular JSON arrays, it is not in regular JSON-LD arrays
+ unless specific markup is provided (see <a href="#sets-and-lists" class="sec-ref"><span class="secno">6.9</span> <span class="sec-title">Sets and Lists</span></a>).</dd>
+ <dt><dfn title="string" id="dfn-string">string</dfn></dt><dd>
+ A string is a sequence of zero or more Unicode characters,
+ wrapped in double quotes, using backslash escapes (if necessary). A
+ character is represented as a single character string.</dd>
+ <dt><dfn title="number" id="dfn-number">number</dfn></dt>
+ <dd>
+ A number is similar to that used in most programming languages, except
+ that the octal and hexadecimal formats are not used and that leading
+ zeros are not allowed.</dd>
+ <dt><dfn title="true" id="dfn-true">true</dfn> and <dfn title="false" id="dfn-false">false</dfn></dt><dd>
+ Values that are used to express one of two possible boolean states.</dd>
+ <dt><dfn title="null" id="dfn-null">null</dfn></dt>
+ <dd>The <a class="tref internalDFN" title="null" href="#dfn-null">null</a> value. A key-value pair in the
+ <code>@context</code> where the value, or the <code>@id</code> of the
+ value, is <a class="tref internalDFN" title="null" href="#dfn-null">null</a> explicitly decouples a term's association
+ with an <abbr title="Internationalized Resource Identifier">IRI</abbr>. A key-value pair in the body of a JSON-LD document whose
+ value is <a class="tref internalDFN" title="null" href="#dfn-null">null</a> has the same meaning as if the key-value pair
+ was not defined. If <code>@value</code>, <code>@list</code>, or
+ <code>@set</code> is set to <a class="tref internalDFN" title="null" href="#dfn-null">null</a> in expanded form, then
+ the entire <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> is ignored.</dd>
+ </dl>
+</section>
+
+<section id="syntax-tokens-and-keywords">
+<h3><span class="secno">3.2 </span>Syntax Tokens and Keywords</h3>
+
+<p>JSON-LD specifies a number of syntax tokens and <dfn title="keyword" id="dfn-keyword">keywords</dfn>
+that are a core part of the language:</p>
+
+<dl>
+<dt><code>@context</code></dt>
+<dd>Used to define the short-hand names that are used throughout a JSON-LD
+ document. These short-hand names are called <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> and help
+ developers to express specific identifiers in a compact manner. The
+ <code>@context</code> keyword is described in detail in the section titled
+ <a href="#the-context" class="sec-ref"><span class="secno">5.1</span> <span class="sec-title">The Context</span></a>.</dd>
+<dt><code>@id</code></dt>
+<dd>Used to uniquely identify <em>things</em> that are being described in the document.
+ This keyword is described in <a href="#node-identifiers" class="sec-ref"><span class="secno">5.4</span> <span class="sec-title">Node Identifiers</span></a>.</dd>
+<dt><code>@value</code></dt>
+<dd>Used to specify the data that is associated with a particular
+ <a class="tref internalDFN" title="property" href="#dfn-property">property</a> in the graph. This keyword is described in
+ <a href="#string-internationalization" class="sec-ref"><span class="secno">5.6</span> <span class="sec-title">String Internationalization</span></a> and
+ <a href="#typed-values" class="sec-ref"><span class="secno">6.2</span> <span class="sec-title">Typed Values</span></a>.</dd>
+<dt><code>@language</code></dt>
+<dd>Used to specify the native language for a particular value or the default
+ language of a JSON-LD document. This keyword is described in the section titled
+ <a href="#string-internationalization" class="sec-ref"><span class="secno">5.6</span> <span class="sec-title">String Internationalization</span></a>.</dd>
+<dt><code>@type</code></dt>
+<dd>Used to set the data type of a <a class="tref internalDFN" title="node" href="#dfn-node">node</a> or
+ <a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">typed value</a>. This keyword is described in the section titled
+ <a href="#typed-values" class="sec-ref"><span class="secno">6.2</span> <span class="sec-title">Typed Values</span></a>.</dd>
+<dt><code>@container</code></dt>
+<dd>Used to set the container of a particular value.
+ This keyword is described in the section titled <a href="#sets-and-lists" class="sec-ref"><span class="secno">6.9</span> <span class="sec-title">Sets and Lists</span></a>.</dd>
+<dt><code>@list</code></dt>
+<dd>Used to express an ordered set of data.
+ This keyword is described in the section titled <a href="#sets-and-lists" class="sec-ref"><span class="secno">6.9</span> <span class="sec-title">Sets and Lists</span></a>.</dd>
+<dt><code>@set</code></dt>
+<dd>Used to express an unordered set of data and to ensure that values are always
+ represented as arrays. This keyword is described in the section titled
+ <a href="#sets-and-lists" class="sec-ref"><span class="secno">6.9</span> <span class="sec-title">Sets and Lists</span></a>.</dd>
+<dt><code>@annotation</code></dt>
+<dd>Used to specify that a container is used to index information and
+ that processing should continue deeper into a JSON data structure.
+ This keyword is described in the section titled
+ <a href="#data-annotations" class="sec-ref"><span class="secno">6.14</span> <span class="sec-title">Data Annotations</span></a>.</dd>
+<dt><code>@vocab</code></dt>
+<dd>Used to expand properties and values in <code>@type</code> with a common prefix
+ <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>. This keyword is described in section <a href="#iris" class="sec-ref"><span class="secno">5.3</span> <span class="sec-title">IRIs</span></a>.</dd>
+<dt><code>@graph</code></dt><dd>Used to explicitly label a <a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">JSON-LD graph</a>.
+ This keyword is described in <a href="#named-graphs" class="sec-ref"><span class="secno">6.11</span> <span class="sec-title">Named Graphs</span></a>.</dd>
+<dt><code>:</code></dt>
+<dd>The separator for JSON keys and values that use
+ <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact IRIs</a>.</dd>
+</dl>
+
+<p>For the avoidance of doubt, all keys, <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keywords</a>, and values in JSON-LD are
+case-sensitive.</p>
+</section>
+
+</section>
+
+<section class="normative" id="conformance">
+
+<!--OddPage-->
+<h2><span class="secno">4. </span>Conformance</h2>
+
+<p>The JSON-LD Syntax specification describes the conformance criteria for JSON-LD documents (relevant to authors and authoring tool implementors).</p>
+
+<p>A <a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">JSON-LD document</a> complies with this specification if it follows the normative statements for documents defined in sections <a href="#referencing-contexts-from-json-documents" class="sec-ref"><span class="secno">6.4</span> <span class="sec-title">Referencing Contexts from JSON Documents</span></a> and <a href="#json-ld-grammar" class="sec-ref"><span class="secno">B.</span> <span class="sec-title">JSON-LD Grammar</span></a>. For convenience, normative statements for documents are often phrased as statements on the properties of the document.</p>
+
+<p>The key words <em class="rfc2119" title="must">must</em>, <em class="rfc2119" title="must not">must not</em>, <em class="rfc2119" title="required">required</em>, <em class="rfc2119" title="shall">shall</em>, <em class="rfc2119" title="shall not">shall not</em>, <em class="rfc2119" title="should">should</em>, <em class="rfc2119" title="should not">should not</em>, <em class="rfc2119" title="recommended">recommended</em>, <em class="rfc2119" title="not recommended">not recommended</em>, <em class="rfc2119" title="may">may</em>, and <em class="rfc2119" title="optional">optional</em> in this Recommendation have the meaning defined in [<cite><a class="bibref" href="#bib-RFC2119">RFC2119</a></cite>].</p>
+
+</section>
+
+<section class="normative" id="basic-concepts">
+
+<!--OddPage-->
+<h2><span class="secno">5. </span>Basic Concepts</h2>
+
+<section id="the-context">
+<h3><span class="secno">5.1 </span>The Context</h3>
+
+<p>In JSON-LD, a <dfn title="context" id="dfn-context">context</dfn> is used to map <a class="tref internalDFN" title="term" href="#dfn-term">terms</a>, i.e., properties with associated
+ values in an JSON document, to <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a>.</p>
+<p>The Web uses <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a> for unambiguous identification. The
+ idea is that these <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> mean something that may be of use to other developers and that it is useful to
+ give them an unambiguous identifier. That is, it is useful for <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> to expand to IRIs so that
+ developers don't accidentally step on each other's <dfn title="vocabulary" id="dfn-vocabulary">vocabulary</dfn> terms and other resources. Furthermore, developers, and
+ machines, are able to use this <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> (by plugging it directly into a web browser, for instance) to go to
+ the term and get a definition of what the term means. This mechanism is analogous to the way we can use
+ <a href="http://wordnet.princeton.edu/">WordNet</a> today to see the definition of words in the English language.
+ Developers and machines need the same sort of definition of terms. <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a> provide a way to
+ ensure that these terms are unambiguous. For example, the term <code>name</code> may
+ map directly to the <abbr title="Internationalized Resource Identifier">IRI</abbr> <code>http://xmlns.com/foaf/0.1/name</code>. This allows JSON-LD documents to be constructed
+ using the common JSON practice of simple key-value pairs while ensuring that the data is useful outside of the
+ page, API or database in which it resides.</p>
+
+<p>Note that, to avoid forward-compatibility issues, terms starting with an <code>@</code> character are to be avoided as they might be used as keywords in future versions of JSON-LD. Furthermore, the use of empty <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> (<code>""</code>)
+ is discouraged as not all programming languages are able to handle empty
+ property names.
+</p>
+
+<p>In a JSON-LD document, the mapping between <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> and
+ <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a> is typically collected in a <a class="tref internalDFN" title="context_definition" href="#dfn-context_definition">context definition</a>
+ that would look something like this:</p>
+
+<div class="example"><div class="example-title"><span>Example 1</span>: Context definition</div><pre class="example">{
+ "@context":
+ {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "depiction":
+ {
+ "@id": "http://xmlns.com/foaf/0.1/depiction",
+ "@type": "@id"
+ },
+ "homepage":
+ {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ },
+ }
+}</pre></div>
+
+<p>
+Let's assume that a developer starts with the following JSON document:
+</p>
+
+<div class="example"><div class="example-title"><span>Example 2</span>: Sample JSON document</div><pre class="example">{
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ "depiction": "http://twitter.com/account/profile_image/manusporny"
+}</pre></div>
+
+<p>The developer can add a single line to the JSON document above
+to reference the context and transform it into a JSON-LD document:</p>
+
+<div class="example"><div class="example-title"><span>Example 3</span>: Referencing a JSON-LD context</div><pre class="example">{
+ <span class="diff">"@context": "http://json-ld.org/contexts/person.jsonld",</span>
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ "depiction": "http://twitter.com/account/profile_image/manusporny"
+}</pre></div>
+
+<p>The additions above transform the previous JSON document into a JSON document
+with added semantics because the <code>@context</code> specifies how the
+<strong>name</strong>, <strong>homepage</strong>, and <strong>depiction</strong>
+terms map to <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a>.
+Mapping those keys to IRIs gives the data global context. If two
+developers use the same <abbr title="Internationalized Resource Identifier">IRI</abbr> to describe a property, they are more than likely
+expressing the same concept. This allows both developers to re-use each others'
+data without having to agree to how their data will interoperate on a
+site-by-site basis. Contexts may also contain type, language or additional information
+for certain <a class="tref internalDFN" title="term" href="#dfn-term">terms</a>.</p>
+
+<p>External JSON-LD context documents may contain extra information
+located outside of the <code>@context</code> key, such as documentation about the
+<a class="tref internalDFN" title="term" href="#dfn-term">terms</a> declared in the document. Information contained
+outside of the <code>@context</code> value is simply discarded when the document
+is used as an external JSON-LD context document
+(see <a href="#referencing-contexts-from-json-documents" class="sec-ref"><span class="secno">6.4</span> <span class="sec-title">Referencing Contexts from JSON Documents</span></a>).</p>
+
+<p>Contexts may also be specified in-line. This ensures that
+ <a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">JSON-LD documents</a> can be understood
+ even in the absence of a connection to the Web.</p>
+
+<div class="example"><div class="example-title"><span>Example 4</span>: In-line context definition</div><pre class="example">{
+ <span class="diff">"@context":
+ {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "depiction":
+ {
+ "@id": "http://xmlns.com/foaf/0.1/depiction",
+ "@type": "@id"
+ },
+ "homepage":
+ {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ },
+ },</span>
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ "depiction": "http://twitter.com/account/profile_image/manusporny"
+}</pre></div>
+
+<p>Contexts may be used at any time a <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> is defined.
+ In particular, a <a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">JSON-LD document</a> may define more than one context,
+ as in the following example:</p>
+<div class="example"><div class="example-title"><span>Example 5</span>: Multiple separate contexts</div><pre class="example">[
+ {
+ <span class="diff">"@context": "http://example.org/contexts/person.jsonld",</span>
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ "depiction": "http://twitter.com/account/profile_image/manusporny"
+ },
+ {
+ <span class="diff">"@context": "http://example.org/contexts/place.jsonld",</span>
+ "name": "The Empire State Building",
+ "description": "The Empire State Building is a 102-story landmark in New York City.",
+ "geo": {
+ "latitude": "40.75",
+ "longitude": "73.98"
+ }
+ }
+]</pre></div>
+
+<p>This is useful when an author would like to use an existing context
+ and add application-specific terms to the existing context. Duplicate context
+ <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> are overridden using a last-defined-overrides
+ mechanism.</p>
+
+<div class="example"><div class="example-title"><span>Example 6</span>: Scoped contexts within node objects</div><pre class="example">{
+ <span class="diff">"@context":
+ {
+ "name": "http://example.com/person#name",
+ "details": "http://example.com/person#details"
+ },</span>
+ "<span class="diff">name</span>": "Markus Lanthaler",
+ ...
+ "details":
+ {
+ <span class="diff">"@context": {
+ "name": "http://example.com/organization#name"
+ },</span>
+ "<span class="diff">name</span>": "Graz University of Technology"
+ }
+}</pre></div>
+
+<p>In the example above, the <code>name</code> prefix is overridden in the
+ more deeply nested <code>details</code> structure. Note that this is
+ rarely a good authoring practice and is typically used when there exist
+ legacy applications that depend on the specific structure of the
+ <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>. If a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> is re-defined within a
+ context, all previous rules associated with the previous definition are
+ removed. If that <a class="tref internalDFN" title="term" href="#dfn-term">term</a> is re-defined to <code>null</code>,
+ the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> is effectively removed from the list of
+ <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> defined in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</p>
+
+<p>A <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> may specify multiple contexts, using an
+ <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, processed in order. The set of contexts defined within a specific <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> are
+ referred to as <dfn title="local_context" id="dfn-local_context">local contexts</dfn>. Setting the context to <code>null</code>
+ effectively resets the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to an empty context. The
+ <dfn title="active_context" id="dfn-active_context">active context</dfn> refers to the accumulation of <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local contexts</a>
+ that are in scope at a specific point within the document. The following example
+ specifies an external context and then layers a local context on top of the external
+ context:</p>
+
+<div class="example"><div class="example-title"><span>Example 7</span>: Combining external and local contexts</div><pre class="example">{
+ <span class="diff">"@context": [
+ "http://json-ld.org/contexts/person.jsonld",
+ {
+ "pic": "http://xmlns.com/foaf/0.1/depiction"
+ }
+ ],</span>
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ <span class="diff">"pic": "http://twitter.com/account/profile_image/manusporny"</span>
+}</pre></div>
+
+<div class="note"><div class="note-title"><span>Note</span></div><p class="">To ensure the best possible performance, it is a best practice to
+ put the <a class="tref internalDFN" title="context" href="#dfn-context">context</a> definition at the top of the JSON-LD document. If it isn't listed
+ first, processors have to save each key-value pair until the <a class="tref internalDFN" title="context" href="#dfn-context">context</a> is processed.
+ This creates a memory and complexity burden for certain types of
+ low-memory footprint JSON-LD processors.</p></div>
+
+</section>
+
+<section id="from-json-to-json-ld">
+ <h3><span class="secno">5.2 </span>From JSON to JSON-LD</h3>
+
+ <p>If a set of <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> such as, <strong>name</strong>,
+ <strong>homepage</strong>, and <strong>depiction</strong>,
+ are defined in a <a class="tref internalDFN" title="context" href="#dfn-context">context</a>, and that context is used to resolve the
+ names in <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON objects</a>, machines are able to automatically expand the terms to
+ something unambiguous like this:</p>
+
+ <div class="example"><div class="example-title"><span>Example 8</span>: Expanded terms</div><pre class="example">{
+ "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+ "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
+ "<span class="diff">http://xmlns.com/foaf/0.1/depiction</span>": "http://twitter.com/account/profile_image/manusporny"
+}</pre></div>
+
+ <p>Doing this allows JSON to be unambiguously machine-readable without
+ requiring developers to drastically change their workflow. A <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>
+ used to define property values of a <a class="tref internalDFN" title="node" href="#dfn-node">node</a> is called a <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a>.</p>
+
+ <div class="note"><div class="note-title"><span>Note</span></div><p class="">The example above does not use the <code>@id</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>
+ to identify the node being described above. This type of node is called a
+ <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a>. It is advised that all <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node objects</a>
+ in JSON-LD are identified by <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a> via the <code>@id</code>
+ keyword unless the data is not intended to be linked to from other data sets.</p></div>
+</section>
+
+<section id="iris">
+<h3><span class="secno">5.3 </span>IRIs</h3>
+
+<p><a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a> (Internationalized Resource Identifiers) are fundamental to <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a> as
+ that is how most <a class="tref internalDFN" title="node" href="#dfn-node">nodes</a> and <a class="tref internalDFN" title="property" href="#dfn-property">properties</a>
+ are identified. <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a> can be expressed in a variety of different ways in JSON-LD:</p>
+
+<ol>
+ <li>Except within a <a class="tref internalDFN" title="context" href="#dfn-context">context</a> definition, <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> in the
+ key position in a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> that have a mapping in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> expand to an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>. If there's a <code>@vocab</code>
+ mapping in the active context also <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> without an explicit mapping
+ in the active context are expanded to an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.</li>
+ <li>An <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> is generated for the <a class="tref internalDFN" title="string" href="#dfn-string">string</a> value specified using
+ <code>@id</code> or <code>@type</code>.</li>
+ <li>An <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> is generated for the <a class="tref internalDFN" title="string" href="#dfn-string">string</a> value of any key for which there
+ are <a class="tref internalDFN" title="coercion" href="#dfn-coercion">coercion</a> rules in effect that identify the value as an <code>@id</code>.</li>
+</ol>
+
+<p>IRIs may be represented as an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a> or a <a class="tref internalDFN" title="relative_iri" href="#dfn-relative_iri">relative <abbr title="Internationalized Resource Identifier">IRI</abbr></a>.</p>
+
+<p>An <dfn title="absolute_iri" id="dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></dfn> is defined in [<cite><a class="bibref" href="#bib-RFC3987">RFC3987</a></cite>] containing a <em>scheme</em> along with
+ <em>path</em> and optional <em>query</em> and <em>fragment</em> segments. A <dfn title="relative_iri" id="dfn-relative_iri">relative <abbr title="Internationalized Resource Identifier">IRI</abbr></dfn> is an <abbr title="Internationalized Resource Identifier">IRI</abbr>
+ that is relative to some other <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>. In JSON-LD all <a class="tref internalDFN" title="relative_iri" href="#dfn-relative_iri">relative IRIs</a> are resolved relative to the
+ <dfn title="base_iri" id="dfn-base_iri">base <abbr title="Internationalized Resource Identifier">IRI</abbr></dfn> associated with the document (typically, the directory that contains the document or the document itself).</p>
+
+<p>IRIs can be expressed directly in the key position like so:</p>
+
+<div class="example"><div class="example-title"><span>Example 9</span>: IRI as a key</div><pre class="example">{
+...
+ "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+...
+}</pre></div>
+
+<p>In the example above, the key <code>http://xmlns.com/foaf/0.1/name</code> is interpreted
+ as an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> because it contains a colon
+ (<code>:</code>) and the 'http' <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> does not exist in
+ the context.</p>
+
+<p>Term expansion occurs for IRIs if the value matches a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> defined within the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>:</p>
+
+<div class="example"><div class="example-title"><span>Example 10</span>: Term expansion from context definition</div><pre class="example">{
+ "<span class="diff">@context</span>":
+ {
+ "<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"
+...
+ },
+ "<span class="diff">name</span>": "Manu Sporny",
+ "status": "trollin'",
+...
+}</pre></div>
+
+<p><a class="tref internalDFN" title="term" href="#dfn-term">Terms</a> are case sensitive.</p>
+
+<p>JSON keys that do not expand to an absolute <abbr title="Internationalized Resource Identifier">IRI</abbr> are ignored, or removed
+in some cases, by the [<cite><a class="bibref" href="#bib-JSON-LD-API">JSON-LD-API</a></cite>]. However, JSON keys that do not include
+a mapping in the <a class="tref internalDFN" title="context" href="#dfn-context">context</a> are still considered valid expressions
+in JSON-LD documents - the keys just don't expand to unambiguous identifiers.</p>
+
+<p><a class="tref internalDFN" title="prefix" href="#dfn-prefix">Prefixes</a> are expanded when the form of the value is a
+ <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> represented as a <code>prefix:suffix</code>
+ combination, and the prefix matches a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> defined within the
+ <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>:</p>
+
+<div class="example"><div class="example-title"><span>Example 11</span>: Prefix expansion</div><pre class="example">{
+ "<span class="diff">@context</span>":
+ {
+ "<span class="diff">foaf</span>": "<span class="diff">http://xmlns.com/foaf/0.1/</span>"
+...
+ },
+ "<span class="diff">foaf:name</span>": "Manu Sporny",
+...
+}</pre></div>
+
+<p><code>foaf:name</code> above will automatically expand out to the <abbr title="Internationalized Resource Identifier">IRI</abbr>
+<code>http://xmlns.com/foaf/0.1/name</code>. See <a href="#compact-iris" class="sec-ref"><span class="secno">6.1</span> <span class="sec-title">Compact IRIs</span></a> for more details.</p>
+
+<p>It is often common that all types and properties come from the same vocabulary. JSON-LD's
+ <code>@vocab</code> keyword allows to set a common prefix to be used for all properties and types
+ that neither match a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> nor a <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> or an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>
+ (i.e., do not contain a colon).</p>
+
+<div class="example"><div class="example-title"><span>Example 12</span>: Using a common vocabulary prefix</div><pre class="example">{
+ <span class="diff">"@context": {
+ "@vocab": "http://xmlns.com/foaf/1.0/"
+ },</span>
+ "@type": <span class="diff">"Person"</span>,
+ <span class="diff">"name"</span>: "Manu Sporny",
+}</pre></div>
+
+<p>An <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> is generated when a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> is used in the
+ value position that contains an <code>@id</code> keyword:</p>
+
+<div class="example"><div class="example-title"><span>Example 13</span>: Expanded IRI definition</div><pre class="example">{
+...
+ "homepage": { "<span class="diff">@id</span>": "http://manu.sporny.org" }
+...
+}</pre></div>
+
+<p>Specifying a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> with an
+ <code>@id</code> key is used to identify that <a class="tref internalDFN" title="node" href="#dfn-node">node</a> using an
+ <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>. When the object has only the <code>@id</code>, it
+ is called a <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a>. This facility may also be used to link to another
+ <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> using a mechanism called
+ <a class="tref internalDFN" title="embedding" href="#dfn-embedding">embedding</a>, which is covered in the section titled
+ <a href="#embedding" class="sec-ref"><span class="secno">6.10</span> <span class="sec-title">Embedding</span></a>.</p>
+
+<p>If type <a class="tref internalDFN" title="coercion" href="#dfn-coercion">coercion</a> rules are specified in the <code>@context</code> for
+a particular <a class="tref internalDFN" title="term" href="#dfn-term">term</a> or property <abbr title="Internationalized Resource Identifier">IRI</abbr>, an <abbr title="Internationalized Resource Identifier">IRI</abbr> is generated:</p>
+
+<div class="example"><div class="example-title"><span>Example 14</span>: Type coercion</div><pre class="example">{<span class="diff">
+ "@context":
+ {
+ ...
+ "homepage":
+ {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ ...
+ }</span>
+...
+ "homepage": "http://manu.sporny.org/",
+...
+}</pre></div>
+
+<p>In the example above, even though the value
+<code>http://manu.sporny.org/</code> is expressed as a JSON
+<a class="tref internalDFN" title="string" href="#dfn-string">string</a>, the type <a class="tref internalDFN" title="coercion" href="#dfn-coercion">coercion</a> rules will transform
+the value into an <abbr title="Internationalized Resource Identifier">IRI</abbr> when generating the <a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">JSON-LD graph</a>.</p>
+
+</section>
+
+<section id="node-identifiers">
+<h3><span class="secno">5.4 </span>Node Identifiers</h3>
+
+<p>To be able to externally reference nodes in a graph, it is important that each <a class="tref internalDFN" title="node" href="#dfn-node">node</a> has
+ an unambiguous identifier. <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a> are a fundamental concept of
+ <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a>, and nodes should have a de-referencable
+ identifier used to name and locate them. For nodes to be truly linked,
+ de-referencing the identifier should result in a representation of that node
+ (for example, using a URL to retrieve a web page).
+ Associating an <abbr title="Internationalized Resource Identifier">IRI</abbr> with a node tells an application that the returned
+ document contains a description of the node requested.</p>
+
+<p>JSON-LD documents may also contain descriptions of other nodes, so it is necessary to be able to
+ uniquely identify each node which may be externally referenced.</p>
+
+<p>The node of a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> is identified using the <code>@id</code>
+ <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>:</p>
+
+<div class="example"><div class="example-title"><span>Example 15</span>: Identifying a node</div><pre class="example">{
+ "@context":
+ {
+ ...
+ "homepage":
+ {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ ...
+ },
+ "<span class="diff">@id</span>": "<span class="diff">http://example.org/people#joebob</span>",
+ "homepage": "http://manu.sporny.org/",
+...
+}</pre></div>
+
+<p>The example above contains a <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> identified by the <abbr title="Internationalized Resource Identifier">IRI</abbr>
+ <code>http://example.org/people#joebob</code>.</p>
+
+<p>Once defined, the <a class="tref internalDFN" title="node" href="#dfn-node">node</a>'s unique identifier can be used to refer to
+ it from other parts of the document or from external documents, using
+ a <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> that only contains an <code>@id</code> key:</p>
+
+<div class="example"><div class="example-title"><span>Example 16</span>: Referencing a node using its unique identifier</div><pre class="example">{
+ "@context": ...,
+ "@graph": [
+ {
+ "@id": "http://example.org/library",
+ "@type": "ex:Library",
+ <span class="diff">"ex:contains": {"@id": "http://example.org/library/the-republic"}</span>
+ }, {
+ "@id": "http://example.org/library/the-republic",
+ "@type": "ex:Book",
+ "dc:creator": "Plato",
+ "dc:title": "The Republic",
+ <span class="diff">"ex:contains": {"@id": "http://example.org/library/the-republic#introduction"}</span>
+ }, {
+ "@id": "http://example.org/library/the-republic#introduction",
+ "@type": "ex:Chapter",
+ "dc:description": "An introductory chapter on The Republic.",
+ "dc:title": "The Introduction"
+ }
+ ]
+}
+}</pre></div>
+
+</section>
+
+<section id="specifying-the-type">
+<h3><span class="secno">5.5 </span>Specifying the Type</h3>
+
+<p>The type of a particular node can be specified using the <code>@type</code>
+ <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>. In <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a>, types are uniquely
+ identified with an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.</p>
+
+<div class="example"><div class="example-title"><span>Example 17</span>: Specifying the type for a node</div><pre class="example">{
+...
+ "@id": "http://example.org/people#joebob",
+ "<span class="diff">@type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+...
+}</pre></div>
+
+<p>A node can be assigned more than one type by using the following markup
+pattern:</p>
+
+<div class="example"><div class="example-title"><span>Example 18</span>: Specifying multiple types for a node</div><pre class="example">{
+...
+ "@id": "http://example.org/places#BrewEats",
+ "<span class="diff">@type</span>": <span class="diff">["http://schema.org/Restaurant", "http://schema.org/Brewery"]</span>
+...
+}</pre></div>
+
+<p>The value of a <code>@type</code> key may also be a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> defined in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>:</p>
+<div class="example"><div class="example-title"><span>Example 19</span>: Using a term to specify the type</div><pre class="example">{
+ "@context": "http://json-ld.org/contexts/person.jsonld",
+ "@id": "http://manu.sporny.org/i/public",
+ <span class="diff">"@type": "Person"</span>,
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ "depiction": "http://twitter.com/account/profile_image/manusporny"
+}</pre></div>
+
+</section>
+
+<section id="string-internationalization">
+<h3><span class="secno">5.6 </span>String Internationalization</h3>
+
+<p>At times, it is important to annotate a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>
+ with its language. In JSON-LD this is possible in a variety of ways.
+ Firstly, it is possible to define a default language for a JSON-LD document
+ by setting the <code>@language</code> key in the <code>@context</code> or in a
+ <a class="tref internalDFN" title="term" href="#dfn-term">term</a> definition:</p>
+
+<div class="example"><div class="example-title"><span>Example 20</span>: Setting the default language of a JSON-LD document</div><pre class="example">{
+ <span class="diff">"@context":
+ {
+ ...
+ "@language": "ja"
+ },</span>
+ "name": <span class="diff">"花澄"</span>,
+ "occupation": <span class="diff">"科学者"</span>
+}</pre></div>
+
+<p>The example above would associate the <code>ja</code> language
+ code with the two <a class="tref internalDFN" title="string" href="#dfn-string">strings</a> <em>花澄</em> and <em>科学者</em>.
+ Languages codes are defined in [<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>].</p>
+
+<p>It is possible to override the default language by using an <a class="tref internalDFN" title="expanded_value" href="#dfn-expanded_value">expanded value</a>:</p>
+
+<div class="example"><div class="example-title"><span>Example 21</span>: Overriding default language using an expanded value</div><pre class="example">{
+ "@context": {
+ ...
+ "@language": "ja"
+ },
+ "name": "花澄",
+ "occupation": <span class="diff">{
+ "@value": "Scientist",
+ "@language": "en"
+ }</span>
+}</pre></div>
+
+<p>It is also possible to override the default language or specify a plain
+value by omitting the <code>@language</code> tag or setting it to
+<code>null</code> when expressing the <a class="tref internalDFN" title="expanded_value" href="#dfn-expanded_value">expanded value</a>:</p>
+
+<div class="example"><div class="example-title"><span>Example 22</span>: Removing language information using an expanded value</div><pre class="example">{
+ "@context": {
+ ...
+ "@language": "ja"
+ },
+ "name": <span class="diff">{
+ "@value": "Frank"
+ },</span>
+ "occupation": <span class="diff"> {
+ "@value": "Ninja",
+ "@language": "en"
+ }</span>,
+ "speciality": "手裏剣"
+}</pre></div>
+
+<p>Please note that language associations can only be applied to plain
+ literal <a class="tref internalDFN" title="string" href="#dfn-string">strings</a>. That is,
+ <a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">typed values</a> or values that are subject
+ to <a href="#type-coercion" class="sec-ref"><span class="secno">6.6</span> <span class="sec-title">Type Coercion</span></a> cannot be language tagged.</p>
+
+<p>To clear the default language for a subtree, <code>@language</code> can
+be set to <code>null</code> in a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> as follows:</p>
+
+<div class="example"><div class="example-title"><span>Example 23</span>: Clearing default language</div><pre class="example">{
+ "@context": {
+ ...
+ "@language": "ja"
+ },
+ "name": "花澄",
+ "details": {
+<span class="diff"> "@context": {
+ "@language": null
+ },</span>
+ "occupation": "Ninja"
+ }
+}</pre></div>
+
+<div class="note"><div class="note-title"><span>Note</span></div><p class="">JSON-LD allows one to associate language information with
+ <a class="tref internalDFN" title="term" href="#dfn-term">terms</a>. See <a href="#expanded-term-definition" class="sec-ref"><span class="secno">6.5</span> <span class="sec-title">Expanded Term Definition</span></a> for
+ more details.</p></div>
+
+</section>
+
+<section id="json-ld-syntax">
+ <h3><span class="secno">5.7 </span>JSON-LD Syntax</h3>
+
+ <p>A <a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">JSON-LD document</a> is first, and foremost, a JSON document
+ (as defined in [<cite><a class="bibref" href="#bib-RFC4627">RFC4627</a></cite>]). However, JSON-LD
+ describes a specific syntax to use for expressing Linked Data. This
+ includes the use of specific keywords, as identified in <a href="#syntax-tokens-and-keywords" class="sec-ref"><span class="secno">3.2</span> <span class="sec-title">Syntax Tokens and Keywords</span></a> for
+ expressing <a title="node object">node objects</a>, values,
+ and the <a href="#dfn-context" class="internalDFN">context</a>. See <a href="#json-ld-grammar" class="sec-ref"><span class="secno">B.</span> <span class="sec-title">JSON-LD Grammar</span></a> for authoring
+ guidelines.</p>
+
+</section>
+</section>
+
+<section id="advanced-concepts">
+
+<!--OddPage-->
+<h2><span class="secno">6. </span>Advanced Concepts</h2>
+
+<em>This section is normative.</em>
+
+<p>JSON-LD has a number of features that provide functionality above and beyond
+the core functionality described above. The following section describes this
+advanced functionality in more detail.
+</p>
+
+<section id="compact-iris">
+ <h3><span class="secno">6.1 </span>Compact IRIs</h3>
+ <p>
+ <a class="tref internalDFN" title="term" href="#dfn-term">Terms</a> in <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a> documents may draw from
+ a number of different <a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">vocabularies</a>.
+ At times, declaring every single <a class="tref internalDFN" title="term" href="#dfn-term">term</a> that a document uses can require the
+ developer to declare tens, if not hundreds of potential
+ <a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">vocabulary</a> <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> that are used across an
+ application. This is a concern for at least two reasons: the
+ first is the cognitive load on the developer of remembering all of the
+ <a class="tref internalDFN" title="term" href="#dfn-term">terms</a>, and the second is the serialized size of the
+ <a class="tref internalDFN" title="context" href="#dfn-context">context</a> if it is specified inline. In order to address these issues,
+ the concept of a <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> is introduced.</p>
+ <p>
+ A <dfn title="compact_iri" id="dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></dfn> is a way of expressing an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>
+ using a <em>prefix</em> and <em>suffix</em> separated by a colon (<code>:</code>) which is
+ similar to the <cite><a href="http://www.w3.org/TR/rdfa-core/#s_curies">CURIE Syntax</a></cite>
+ in [<cite><a class="bibref" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>]. The <dfn title="prefix" id="dfn-prefix">prefix</dfn> is a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> taken from the
+ <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> and is a short string identifying a
+ particular <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> in a JSON-LD document.
+ For example, the prefix <code>foaf</code> may be used as a short
+ hand for the Friend-of-a-Friend vocabulary, which is identified using
+ the <abbr title="Internationalized Resource Identifier">IRI</abbr> <code>http://xmlns.com/foaf/0.1/</code>. A developer may append
+ any of the FOAF <a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">vocabulary</a> terms to the end of the prefix
+ to specify a short-hand version of the <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a> for the
+ <a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">vocabulary</a> term. For example, <code>foaf:name</code> would
+ be expanded out to the <abbr title="Internationalized Resource Identifier">IRI</abbr> <code>http://xmlns.com/foaf/0.1/name</code>.
+ Instead of having to remember and type out the entire <abbr title="Internationalized Resource Identifier">IRI</abbr>, the developer
+ can instead use the prefix in their JSON-LD markup.
+ </p>
+ <p>Terms are interpreted as <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact IRIs</a> if they contain at least one
+ colon and the first colon is not followed by two slashes (<code>//</code>, as in
+ <code>http://example.com</code>). To generate the full <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>,
+ the value is first split into a <em>prefix</em> and <em>suffix</em> at the first
+ occurrence of a colon (<code>:</code>). If the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>
+ contains a term mapping for <em>prefix</em>, an <abbr title="Internationalized Resource Identifier">IRI</abbr> is generated by
+ prepending the mapped <em>prefix</em> to the (possibly empty) <em>suffix</em>
+ using textual concatenation. If no prefix mapping is defined, the value is interpreted
+ as an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>. If the prefix is an underscore
+ (<code>_</code>), the <abbr title="Internationalized Resource Identifier">IRI</abbr> remains unchanged.
+ </p>
+ <p>Consider the following example:</p>
+ <div class="example"><div class="example-title"><span>Example 24</span>: Compact IRIs</div><pre class="example">{
+ "@context":
+ {
+ <span class="diff">"dc": "http://purl.org/dc/elements/1.1/",</span>
+ <span class="diff">"ex": "http://example.org/vocab#"</span>
+ },
+ "@id": "http://example.org/library",
+ "@type": <span class="diff">"ex:Library"</span>,
+ <span class="diff">"ex:contains"</span>:
+ {
+ "@id": "http://example.org/library/the-republic",
+ "@type": <span class="diff">"ex:Book"</span>,
+ <span class="diff">"dc:creator"</span>: "Plato",
+ <span class="diff">"dc:title"</span>: "The Republic",
+ <span class="diff">"ex:contains"</span>:
+ {
+ "@id": "http://example.org/library/the-republic#introduction",
+ "@type": <span class="diff">"ex:Chapter"</span>,
+ <span class="diff">"dc:description"</span>: "An introductory chapter on The Republic.",
+ <span class="diff">"dc:title"</span>: "The Introduction"
+ }
+ }
+}</pre></div>
+ <p>
+ In this example, two different <a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">vocabularies</a>
+ are referred to using prefixes. Those prefixes are then used as type and
+ property values using the compact <abbr title="Internationalized Resource Identifier">IRI</abbr> <code>prefix:suffix</code> notation.
+ </p>
+ <p>It's also possible to use compact IRIs within the context as shown in the
+ following example:</p>
+ <div class="example"><div class="example-title"><span>Example 25</span>: Using vocabularies</div><pre class="example">{
+ "@context":
+ {
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "foaf": "http://xmlns.com/foaf/0.1/",
+ <span class="diff">"foaf:homepage"</span>: { "@type": "@id" },
+ "picture": { "@id": <span class="diff">"foaf:depiction"</span>, "@type": "@id" }
+ },
+ "@id": "http://me.markus-lanthaler.com/",
+ "@type": "foaf:Person",
+ "foaf:name": "Markus Lanthaler",
+ "foaf:homepage": "http://www.markus-lanthaler.com/",
+ "picture": "http://twitter.com/account/profile_image/markuslanthaler"
+}</pre></div>
+</section>
+
+<section id="typed-values">
+<h3><span class="secno">6.2 </span>Typed Values</h3>
+
+<p>
+ A value with an associated type, also known as a
+ <a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">typed value</a>, is indicated by associating a value with
+ an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> which indicates the value's type. Typed values may be
+ expressed in JSON-LD in three ways:
+</p>
+
+<ol>
+ <li>By utilizing the <code>@type</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> when defining
+ a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> within a <code>@context</code> section.</li>
+ <li>By utilizing an <a class="tref internalDFN" title="expanded_typed_value" href="#dfn-expanded_typed_value">expanded typed value</a>.</li>
+ <li>By using a native JSON type such as <a class="tref internalDFN" title="number" href="#dfn-number">number</a>, <a class="tref internalDFN" title="true" href="#dfn-true">true</a>, or <a class="tref internalDFN" title="false" href="#dfn-false">false</a>.</li>
+</ol>
+
+<p>The first example uses the <code>@type</code> keyword to associate a
+type with a particular <a class="tref internalDFN" title="term" href="#dfn-term">term</a> in the <code>@context</code>:</p>
+
+<div class="example"><div class="example-title"><span>Example 26</span>: Expanded term definition with type coercion</div><pre class="example">{
+ <span class="diff">"@context":
+ {
+ "modified":
+ {
+ "@id": "http://purl.org/dc/terms/modified",
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ },</span>
+...
+ "modified": "2010-05-29T14:17:39+02:00",
+...
+}</pre></div>
+
+<p>The <em>modified</em> key's value above is automatically type coerced to a
+datetime value because of the information specified in the
+<code>@context</code>.</p>
+
+<p>The second example uses the expanded form of setting the type information
+in the body of a JSON-LD document:</p>
+
+<div class="example"><div class="example-title"><span>Example 27</span>: Expanded value with type</div><pre class="example">{
+ "@context":
+ {
+ "modified":
+ {
+ "@id": "http://purl.org/dc/terms/modified"
+ }
+ },
+...
+ "modified":
+ <span class="diff">{
+ "@value": "2010-05-29T14:17:39+02:00",
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }</span>
+...
+}</pre></div>
+
+<p>Both examples above would generate the value
+ <code>2010-05-29T14:17:39+02:00</code> with the type
+ <code>http://www.w3.org/2001/XMLSchema#dateTime</code>. Note that it is
+ also possible to use a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> or a <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> to
+ express the value of a type.</p>
+
+<p>The <code>@type</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> is also used to associate a type
+ with a <a class="tref internalDFN" title="node" href="#dfn-node">node</a>. The concept of a <dfn title="node_type" id="dfn-node_type">node type</dfn> and
+ a <dfn title="value_type" id="dfn-value_type">value type</dfn> are different. This is similar to object-oriented
+ programming languages where both scalar and structured types use the same
+ class inheritance mechanism, even though scalar types and structured types are
+ inherently different.</p>
+
+<div class="example"><div class="example-title"><span>Example 28</span>: Example demonstrating the context-sensitivity for @type</div><pre class="example">{
+...
+ "@id": "http://example.org/posts#TripToWestVirginia",
+ <span class="diff">"@type": "http://schema.org/BlogPosting"</span>,
+ "modified":
+ {
+ "@value": "2010-05-29T14:17:39+02:00",
+ <span class="diff">"@type": "http://www.w3.org/2001/XMLSchema#dateTime"</span>
+ }
+...
+}</pre></div>
+
+<p>The first use of <code>@type</code> associates a <a class="tref internalDFN" title="node_type" href="#dfn-node_type">node type</a>
+ (<code>http://schema.org/BlogPosting</code>) with the <a class="tref internalDFN" title="node" href="#dfn-node">node</a>,
+ which is expressed using the <code>@id</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>.
+ The second use of <code>@type</code> associates a <a class="tref internalDFN" title="value_type" href="#dfn-value_type">value type</a>
+ (<code>http://www.w3.org/2001/XMLSchema#dateTime</code>) with the
+ value expressed using the <code>@value</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>. As a
+ general rule, when <code>@value</code> and <code>@type</code> are used in
+ the same <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>, the <code>@type</code>
+ <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> is expressing a <a class="tref internalDFN" title="value_type" href="#dfn-value_type">value type</a>.
+ Otherwise, the <code>@type</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> is expressing a
+ <a class="tref internalDFN" title="node_type" href="#dfn-node_type">node type</a>.</p>
+
+</section>
+
+<section id="language-tagged-strings">
+<h3><span class="secno">6.3 </span>Language-tagged Strings</h3>
+
+<p>
+ A string with an associated language, also known as a
+ <a class="tref internalDFN" title="language-tagged_string" href="#dfn-language-tagged_string">language-tagged string</a>, is indicated by associating a string with
+ a language code as defined in [<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>]. Language-tagged strings may be
+ expressed in JSON-LD in four ways:
+</p>
+
+<ol>
+ <li>By defining a global language using the <code>@language</code>
+ <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> within a <code>@context</code> section.</li>
+ <li>By utilizing the <code>@language</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> when defining
+ a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> within a <code>@context</code> section.</li>
+ <li>By utilizing an <a class="tref internalDFN" title="expanded_language-tagged_string" href="#dfn-expanded_language-tagged_string">expanded language-tagged string</a>.</li>
+ <li>By utilizing a <a class="tref internalDFN" title="language_map" href="#dfn-language_map">language map</a>, provided the underlying
+ <code>term</code> is defined with a <code>@container</code>
+ <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> whose value is <code>@language</code> within
+ a <code>@context</code> section.</li>
+</ol>
+
+<p>The first example uses the <code>@language</code> keyword to associate a
+type with a particular <a class="tref internalDFN" title="term" href="#dfn-term">term</a> in the <code>@context</code>:</p>
+
+<div class="example"><div class="example-title"><span>Example 29</span>: Expanded term definition with language coercion</div><pre class="example">{
+ <span class="diff">"@context":
+ {
+ "title":
+ {
+ "@id": "http://purl.org/dc/terms/title",
+ "@language": "en"
+ }
+ },</span>
+...
+ "title": "JSON-LD Syntax",
+...
+}</pre></div>
+
+<p>The <em>modified</em> key's value above is automatically
+ language coerced to a English value because of the information specified in
+ the <code>@context</code>.</p>
+
+<p>The second example uses the expanded form of setting the language information
+in the body of a JSON-LD document:</p>
+
+<div class="example"><div class="example-title"><span>Example 30</span>: Expanded value with language</div><pre class="example">{
+ "@context":
+ {
+ "title":
+ {
+ "@id": "http://purl.org/dc/terms/title"
+ }
+ },
+...
+ "title":
+ <span class="diff">{
+ "@value": "JSON-LD Syntax",
+ "@language": "en"
+ }</span>
+...
+}</pre></div>
+
+<p>Both examples above would generate the value <code>JSON-LD Syntax</code>
+ tagged with the language <code>en</code>; which is the [<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>] code
+ for the English language.</p>
+
+<p>Systems that support multiple languages often need to express data values in
+each language. Typically, such systems also try to ensure that developers have
+a programatically easy way to navigate the datastructures for the
+language-specific data. In this case, <a class="tref internalDFN" title="language_map" href="#dfn-language_map">language maps</a>
+may be utilized.</p>
+
+<div class="example"><div class="example-title"><span>Example 31</span>: Language map expressing a property in three languages</div><pre class="example">{
+ "@context":
+ {
+ "title":
+ {
+ "@id": "http://purl.org/dc/terms/title",
+ <span class="diff">"@container": "@language"</span>
+ }
+ },
+...
+ "title":
+ <span class="diff">{
+ "en": "JSON-LD Syntax",
+ "ru": "JSON-LD Синтаксис",
+ "ja": "JSON-LDの構文"
+ }</span>
+...
+}</pre></div>
+
+<p>In the example above, the title is expressed in three languages; English,
+ Russian, and Japanese. To access the data above in a programming language
+ supporting dot-notation accessors for object properties, a developer may
+ use the <code>property.language</code> pattern. For example, to access the
+ Japanese version of the title, a developer would use the following code
+ snippet: <code>obj.title.ja</code>.</p>
+</section>
+
+<section id="referencing-contexts-from-json-documents">
+<h3><span class="secno">6.4 </span>Referencing Contexts from JSON Documents</h3>
+
+<p>Ordinary JSON documents can be transformed into JSON-LD documents by referencing
+to an external JSON-LD <a class="tref internalDFN" title="context" href="#dfn-context">context</a> in an HTTP Link Header. Doing this
+allows JSON to be unambiguously machine-readable without requiring developers to
+drastically change their workflow and provides an upgrade path for existing
+infrastructure without breaking existing clients that rely on the <code>application/json</code>
+media type.
+</p>
+
+<p>
+In order to use an external context with an ordinary JSON document, an author
+<em class="rfc2119" title="must">must</em> specify an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> to a valid <a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">JSON-LD document</a> in an HTTP Link
+Header [<cite><a class="bibref" href="#bib-RFC5988">RFC5988</a></cite>] using the <code>http://www.w3.org/ns/json-ld#context</code> link relation.
+
+The referenced document <em class="rfc2119" title="must">must</em> have a top-level <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a>. The
+<code>@context</code> subtree within that object is added to the top-level
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> of the referencing document. If an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> is at the top-level of the
+referencing document and its items are <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node objects</a>, the <code>@context</code>
+subtree is added to all <a class="tref internalDFN" title="array" href="#dfn-array">array</a> items. All extra information located outside
+of the <code>@context</code> subtree in the referenced document <em class="rfc2119" title="must">must</em> be
+discarded.
+</p>
+
+<p>The following example demonstrates the use of an external context with an
+ordinary JSON document:</p>
+
+<div class="example"><div class="example-title"><span>Example 32</span>: Specifing context through HTTP header</div><pre class="example">GET /ordinary-json-document.json HTTP/1.1
+Host: example.com
+Accept: application/ld+json,application/json,*/*;q=0.1
+
+====================================
+
+HTTP/1.0 200 OK
+...
+Content-Type: <span class="diff">application/json</span>
+<span class="diff">Link: <http://json-ld.org/contexts/person.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"</span>
+
+{
+ "name": "Markus Lanthaler",
+ "homepage": "http://www.markus-lanthaler.com/",
+ "depiction": "http://twitter.com/account/profile_image/markuslanthaler"
+}</pre></div>
+
+<p>Please note that <a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">JSON-LD documents</a>
+ served with the <code>application/ld+json</code>
+ media type <em class="rfc2119" title="must">must</em> have all context information, including references to external
+ contexts, within the body of the document. Contexts linked via a
+ <code>http://www.w3.org/ns/json-ld#context</code> HTTP Link Header <em class="rfc2119" title="must">must</em> be
+ ignored for such documents.</p>
+
+</section>
+
+<section id="expanded-term-definition">
+<h3><span class="secno">6.5 </span>Expanded Term Definition</h3>
+
+<p>Within a <a class="tref internalDFN" title="context" href="#dfn-context">context</a> definition, <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> may be
+ defined using an <a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">expanded term definition</a> to allow for additional information
+ associated with the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> to be specified (see also
+ <a href="#type-coercion" class="sec-ref"><span class="secno">6.6</span> <span class="sec-title">Type Coercion</span></a> and
+ <a href="#sets-and-lists" class="sec-ref"><span class="secno">6.9</span> <span class="sec-title">Sets and Lists</span></a>).</p>
+
+<p>Instead of using a string representation of an <abbr title="Internationalized Resource Identifier">IRI</abbr>, the <abbr title="Internationalized Resource Identifier">IRI</abbr> may be
+specified using a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> having an <code>@id</code> key,
+and a <a class="tref internalDFN" title="term" href="#dfn-term">term</a>, a <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a>, or an
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a> as value.</p>
+
+<div class="example"><div class="example-title"><span>Example 33</span>: Expanded term definition</div><pre class="example">{
+ "@context":
+ {
+ "foaf": <span class="diff">{ "@id": "http://xmlns.com/foaf/0.1/" }</span>,
+ "name": <span class="diff">{ "@id": "http://xmlns.com/foaf/0.1/name" }</span>,
+ "homepage": <span class="diff">{ "@id": "foaf:homepage" }</span>,
+ "depiction": <span class="diff">{ "@id": "foaf:depiction" }</span>
+ },
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/",
+ "depiction": "http://twitter.com/account/profile_image/manusporny"
+}</pre></div>
+
+<p>This allows additional information to be associated with the term. This
+ may be used for <a href="#type-coercion" class="sec-ref"><span class="secno">6.6</span> <span class="sec-title">Type Coercion</span></a>,
+ <a href="#sets-and-lists" class="sec-ref"><span class="secno">6.9</span> <span class="sec-title">Sets and Lists</span></a>, or to associate language
+ information with a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> as shown in the following example:</p>
+
+<div class="example"><div class="example-title"><span>Example 34</span>: Expanded term definition with language</div><pre class="example">{
+ "@context": {
+ ...
+ "ex": "http://example.com/",
+ "@language": "ja",
+ "name": { "@id": "ex:name", <span class="diff">"@language": null</span> },
+ "occupation": { "@id": "ex:occupation" },
+ "occupation_en": { "@id": "ex:occupation", <span class="diff">"@language": "en"</span> },
+ "occupation_cs": { "@id": "ex:occupation", <span class="diff">"@language": "cs"</span> }
+ },
+ <span class="diff">"name": "Yagyū Muneyoshi",
+ "occupation": "忍者",
+ "occupation_en": "Ninja",
+ "occupation_cs": "Nindža",</span>
+ ...
+}</pre></div>
+
+<p>The example above would associate <em>忍者</em> with the specified default
+ language code <code>ja</code>, <em>Ninja</em> with the language code
+ <code>en</code>, and <em>Nindža</em> with the language code <code>cs</code>.
+ The value of <code>name</code>, <em>Yagyū Muneyoshi</em> wouldn't be
+ associated with any language code since <code>@language</code> was reset to
+ <a class="tref internalDFN" title="null" href="#dfn-null">null</a> in the <a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">expanded term definition</a>.</p>
+
+<p>Expanded terms may also be defined using <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact IRIs</a> or
+ <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute IRIs</a> as keys. If the definition does not include an
+ <code>@id</code> key, the expanded <abbr title="Internationalized Resource Identifier">IRI</abbr> is determined by performing expansion of the key
+ within the current <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. This mechanism is mainly used to associate type or language
+ information with a <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> or an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>.</p>
+
+<div class="note"><div class="note-title"><span>Note</span></div><p class="">While it is possible to define a
+ <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a>, or an absolute <abbr title="Internationalized Resource Identifier">IRI</abbr> to expand to some
+ other unrelated <abbr title="Internationalized Resource Identifier">IRI</abbr> (for example, <code>foaf:name</code> expanding to
+ <code>http://example.org/unrelated#species</code>),
+ such usage is strongly discouraged.</p></div>
+</section>
+
+<section id="type-coercion">
+<h3><span class="secno">6.6 </span>Type Coercion</h3>
+
+<p>JSON-LD supports the coercion of values to particular data types.
+Type <dfn title="coercion" id="dfn-coercion">coercion</dfn> allows someone deploying JSON-LD to coerce the incoming or
+outgoing values to the proper data type based on a mapping of data type <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a> to
+<a class="tref internalDFN" title="term" href="#dfn-term">terms</a>. Using type coercion, value representation is preserved without requiring
+the data type to be specified with each piece of data.</p>
+
+<p>Type coercion is specified within an <a href="#expanded-term-definition" class="sec-ref"><span class="secno">6.5</span> <span class="sec-title">Expanded Term Definition</span></a>
+ using the <code>@type</code> key. The value of this key expands to an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.
+ Alternatively, the <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> <code>@id</code> may be used as value to indicate
+ that within the body of a JSON-LD document, a string value of a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> coerced to
+ <code>@id</code> is to be interpreted as an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.</p>
+
+<p><a class="tref internalDFN" title="term" href="#dfn-term">Terms</a> or <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact IRIs</a> used as the value of a
+ <code>@type</code> key may be defined within the same context. This means that one may specify a
+ <a class="tref internalDFN" title="term" href="#dfn-term">term</a> like <code>xsd</code> and then use <code>xsd:integer</code> within the same
+ context definition.</p>
+
+<p>The example below demonstrates how a JSON-LD author can coerce values to
+<a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">typed values</a>, IRIs and lists.</p>
+
+<div class="example"><div class="example-title"><span>Example 35</span>: Expanded term definition with types</div><pre class="example">{
+ "@context":
+ {
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "age":
+ <span class="diff">{
+ "@id": "http://xmlns.com/foaf/0.1/age",
+ "@type": "xsd:integer"
+ }</span>,
+ "homepage":
+ <span class="diff">{
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id",
+ "@container": "@list"
+ }</span>
+ },
+ "@id": "http://example.com/people#john",
+ "name": "John Smith",
+ "age": <span class="diff">"41"</span>,
+ "homepage":
+ <span class="diff">[
+ "http://personal.example.org/",
+ "http://work.example.com/jsmith/"
+ ]</span>
+}</pre></div>
+
+<p>The markup shown above would generate the following data. The data has no inherent order
+ except for the values the <code>http://xmlns.com/foaf/0.1/homepage</code> property
+ which represent an ordered list.</p>
+
+<table class="example">
+<thead>
+ <tr><th>Subject</th>
+ <th>Property</th>
+ <th>Object</th>
+ <th>Datatype</th>
+</tr></thead>
+<tbody>
+<tr>
+ <td>http://example.com/people#john</td>
+ <td>http://xmlns.com/foaf/0.1/name</td>
+ <td>John Smith</td>
+ <td> </td>
+</tr>
+<tr>
+ <td>http://example.com/people#john</td>
+ <td>http://xmlns.com/foaf/0.1/age</td>
+ <td>41</td>
+ <td>http://www.w3.org/2001/XMLSchema#integer</td>
+</tr>
+<tr>
+ <td rowspan="2">http://example.com/people#john</td>
+ <td rowspan="2">http://xmlns.com/foaf/0.1/homepage</td>
+ <td>http://personal.example.org/</td>
+ <td> </td>
+</tr>
+<tr>
+ <td>http://work.example.com/jsmith/</td>
+ <td> </td>
+</tr>
+</tbody>
+</table>
+
+<p>Terms may also be defined using <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute IRIs</a> or <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact IRIs</a>.
+ This allows coercion rules to be applied to keys which are not represented as a simple <a class="tref internalDFN" title="term" href="#dfn-term">term</a>.
+ For example:</p>
+
+<div class="example"><div class="example-title"><span>Example 36</span>: Term definitions using compact and absolute IRIs</div><pre class="example">{
+ "@context":
+ {
+ "foaf": "http://xmlns.com/foaf/0.1/",
+ "<span class="diff">foaf:age</span>":
+ {
+ <span class="diff">"@id": "http://xmlns.com/foaf/0.1/age"</span>,
+ "@type": "xsd:integer"
+ },
+ "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>":
+ {
+ "@type": "@id"
+ }
+ },
+ "foaf:name": "John Smith",
+ "<span class="diff">foaf:age</span>": "41",
+ "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>":
+ [
+ "http://personal.example.org/",
+ "http://work.example.com/jsmith/"
+ ]
+}</pre></div>
+
+<p>In this case the <code>@id</code> definition in the term definition is optional, but if it does exist, the <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a>
+ or <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> is treated as a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> (not a <code>prefix:suffix</code> construct)
+ so that the actual definition of a <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> becomes unnecessary. Type coercion is performed using
+ the unexpanded value of the key, which has to match exactly an entry in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</p>
+
+<div class="note"><div class="note-title"><span>Note</span></div><p class="">Keys in the context are treated as <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> for the purpose of
+ expansion and value coercion. At times, this may result in multiple representations for the same expanded <abbr title="Internationalized Resource Identifier">IRI</abbr>.
+ For example, one could specify that <code>dog</code> and <code>cat</code> both expanded to <code>http://example.com/vocab#animal</code>.
+ Doing this could be useful for establishing different type coercion or language specification rules. It also allows a <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> (or even an
+ absolute <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>) to be defined as something else entirely. For example, one could specify that
+ the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> <code>http://example.org/zoo</code> should expand to
+ <code>http://example.org/river</code>, but this usage is discouraged because it would lead to a
+ great deal of confusion among developers attempting to understand the JSON-LD document.</p></div>
+
+
+</section>
+
+
+<section id="property-generators">
+<h3><span class="secno">6.7 </span>Property Generators</h3>
+
+<p>At times, an author may find that they need to express the same value for
+multiple properties. The simplest approach to accomplish this goal would be
+to do the following:</p>
+
+<div class="example"><div class="example-title"><span>Example 37</span>: Verbose expression of multiple properties with the same value</div><pre class="example">{
+ "@context":
+ {
+ <span class="diff">"title1": "http://purl.org/dc/terms/title"</span>,
+ <span class="diff">"title2": "http://schema.org/name"</span>,
+ <span class="diff">"title3": "http://www.w3.org/2000/01/rdf-schema#label"</span>
+ },
+ "@id": "http://example.com/book",
+ <span class="diff">"title1": "The Count of Monte Cristo"</span>,
+ <span class="diff">"title2": "The Count of Monte Cristo"</span>,
+ <span class="diff">"title3": "The Count of Monte Cristo"</span>
+}</pre></div>
+
+<p>Unfortunately, the approach above produces redundant data and would become a
+publishing burden for large data sets.
+In these situations, the author may use
+a <dfn title="property_generator" id="dfn-property_generator">property generator</dfn> to express a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> that maps to
+multiple <a class="tref internalDFN" title="property" href="#dfn-property">properties</a> in the <a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">JSON-LD graph</a>.
+This method can be accomplished by using the following markup pattern:</p>
+
+<div class="example"><div class="example-title"><span>Example 38</span>: Generating multiple properties using a single term</div><pre class="example">{
+ "@context":
+ {
+ <span class="diff">"title": { "@id": [ "http://purl.org/dc/terms/title",
+ "http://schema.org/name",
+ "http://www.w3.org/2000/01/rdf-schema#label" ] }</span>
+ },
+ "@id": "http://example.com/book",
+ <span class="diff">"title": "The Count of Monte Cristo"</span>
+}</pre></div>
+
+<p>While the term above is only used once outside of the <code>@context</code>,
+the document above is equivalent to the following:</p>
+
+<table class="example">
+<thead>
+ <tr><th>Subject</th>
+ <th>Property</th>
+ <th>Object</th>
+</tr></thead>
+<tbody>
+<tr>
+ <td>http://example.com/book</td>
+ <td>http://purl.org/dc/terms/title</td>
+ <td>The Count of Monte Cristo</td>
+</tr>
+<tr>
+ <td>http://example.com/book</td>
+ <td>http://schema.org/name</td>
+ <td>The Count of Monte Cristo</td>
+</tr>
+<tr>
+ <td>http://example.com/book</td>
+ <td>http://www.w3.org/2000/01/rdf-schema#label</td>
+ <td>The Count of Monte Cristo</td>
+</tr>
+</tbody>
+</table>
+
+</section>
+
+<section id="iri-expansion-within-a-context">
+ <h3><span class="secno">6.8 </span><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion Within a Context</h3>
+ <p>In general, normal <abbr title="Internationalized Resource Identifier">IRI</abbr> expansion rules apply
+ anywhere an <abbr title="Internationalized Resource Identifier">IRI</abbr> is expected (see <a href="#iris" class="sec-ref"><span class="secno">5.3</span> <span class="sec-title">IRIs</span></a>). Within
+ a <a class="tref internalDFN" title="context" href="#dfn-context">context</a> definition, this can mean that terms defined
+ within the context may also be used within that context as long as
+ there are no circular dependencies. For example, it is common to use
+ the <code>xsd</code> namespace when defining <a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">typed value</a>s:</p>
+<div class="example"><div class="example-title"><span>Example 39</span>: IRI expansion within a context</div><pre class="example">{
+ "@context":
+ {
+ <span class="diff">"xsd": "http://www.w3.org/2001/XMLSchema#"</span>,
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "age":
+ {
+ "@id": "http://xmlns.com/foaf/0.1/age",
+ "@type": <span class="diff">"xsd:integer"</span>
+ },
+ "homepage":
+ {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ },
+ ...
+}</pre></div>
+<p>In this example, the <code>xsd</code> <a class="tref internalDFN" title="term" href="#dfn-term">term</a> is defined
+ and used as a <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> for the <code>@type</code> coercion
+ of the <code>age</code> property.</p>
+
+<p><a class="tref internalDFN" title="term" href="#dfn-term">Terms</a> may also be used when defining the <abbr title="Internationalized Resource Identifier">IRI</abbr> of another
+<a class="tref internalDFN" title="term" href="#dfn-term">term</a>:</p>
+
+<div class="example"><div class="example-title"><span>Example 40</span>: Using a term to define the IRI of another term within a context</div><pre class="example">{
+ "@context":
+ {
+ <span class="diff">"foaf": "http://xmlns.com/foaf/0.1/"</span>,
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "name": <span class="diff">"foaf:name"</span>,
+ "age":
+ {
+ "@id": <span class="diff">"foaf:age"</span>,
+ "@type": "xsd:integer"
+ },
+ "homepage":
+ {
+ "@id": <span class="diff">"foaf:homepage"</span>,
+ "@type": "@id"
+ }
+ },
+ ...
+}</pre></div>
+
+<p><a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">Compact IRIs</a>
+ and <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a> may be used on the left-hand side of a
+ <a class="tref internalDFN" title="term" href="#dfn-term">term</a> definition.</p>
+
+<div class="example"><div class="example-title"><span>Example 41</span>: Using a compact IRI as a term</div><pre class="example">{
+ "@context":
+ {
+ <span class="diff">"foaf": "http://xmlns.com/foaf/0.1/"</span>,
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "name": "foaf:name",
+ "<span class="diff">foaf:age</span>":
+ {
+ "@type": "xsd:integer"
+ },
+ "<span class="diff">foaf:homepage</span>":
+ <span class="diff">{
+ "@type": "@id"
+ }</span>
+ },
+ ...
+}</pre></div>
+
+<p>
+In this example, the <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> form is used in two different
+ways.
+In the first approach, <code>foaf:age</code> declares both the
+<a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> for the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> (using short-form) as well as the
+<code>@type</code> associated with the <a class="tref internalDFN" title="term" href="#dfn-term">term</a>. In the second
+approach, only the <code>@type</code> associated with the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> is
+specified. The full <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> for
+<code>foaf:homepage</code> is determined by looking up the <code>foaf</code>
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> in the
+<a class="tref internalDFN" title="context" href="#dfn-context">context</a>.
+</p>
+
+<p>
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">Absolute IRIs</a> may also be used in the key position in a <a class="tref internalDFN" title="context" href="#dfn-context">context</a>:
+</p>
+
+<div class="example"><div class="example-title"><span>Example 42</span>: Associating context definitions with absolute IRIs</div><pre class="example">{
+ "@context":
+ {
+ "foaf": "http://xmlns.com/foaf/0.1/",
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "name": "foaf:name",
+ "foaf:age":
+ {
+ "@id": "foaf:age",
+ "@type": "xsd:integer"
+ },
+ "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>":
+ {
+ "@type": "@id"
+ }
+ },
+ ...
+}</pre></div>
+
+<p>
+In order for the <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a> to match above, the <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a> needs to be used in the <a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">JSON-LD document</a>. Also note that <code>foaf:homepage</code>
+will not use the <code>{ "@type": "@id" }</code> declaration because
+<code>foaf:homepage</code> is not the same as
+<code>http://xmlns.com/foaf/0.1/homepage</code>. That is, <a class="tref internalDFN" title="term" href="#dfn-term">terms</a>
+are looked up in a <a class="tref internalDFN" title="context" href="#dfn-context">context</a> using direct string comparison before the
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> lookup mechanism is applied.
+</p>
+
+<p>The only exception for using terms in the <a class="tref internalDFN" title="context" href="#dfn-context">context</a> is that
+ circular definitions are not allowed. That is,
+ a definition of <em>term-1</em> cannot depend on the
+ definition of <em>term-2</em> if <em>term-2</em> also depends on
+ <em>term-1</em>. For example, the following <a class="tref internalDFN" title="context" href="#dfn-context">context</a> definition
+ is illegal:</p>
+<div class="example"><div class="example-title"><span>Example 43</span>: Illegal circular definition of terms within a context</div><pre class="example">{
+ "@context":
+ {
+ <span class="diff">"term1": "term2:foo",
+ "term2": "term1:bar"</span>
+ },
+ ...
+}</pre></div>
+</section>
+
+<section id="sets-and-lists">
+<h3><span class="secno">6.9 </span>Sets and Lists</h3>
+
+<p>A JSON-LD author can express multiple values in a compact way by using
+ <a class="tref internalDFN" title="array" href="#dfn-array">arrays</a>. Since graphs do not describe ordering for links
+ between nodes, arrays in JSON-LD do not provide an ordering of the
+ contained elements by default. This is exactly the opposite from regular JSON
+ arrays, which are ordered by default. For example, consider the following
+ simple document:</p>
+
+<div class="example"><div class="example-title"><span>Example 44</span>: Multiple values with no inherent order</div><pre class="example">{
+...
+ "@id": "http://example.org/people#joebob",
+ "nick": <span class="diff">[ "joe", "bob", "jaybee" ]</span>,
+...
+}</pre></div>
+
+<p>The markup shown above would result in the following data being generated,
+ each relating the node to an individual value, with no inherent order:</p>
+
+<table class="example">
+<thead>
+ <tr><th>Subject</th>
+ <th>Property</th>
+ <th>Object</th>
+</tr></thead>
+<tbody>
+<tr>
+ <td>http://example.org/people#joebob</td>
+ <td>http://xmlns.com/foaf/0.1/nick</td>
+ <td>joe</td>
+</tr>
+<tr>
+ <td>http://example.org/people#joebob</td>
+ <td>http://xmlns.com/foaf/0.1/nick</td>
+ <td>bob</td>
+</tr>
+<tr>
+ <td>http://example.org/people#joebob</td>
+ <td>http://xmlns.com/foaf/0.1/nick</td>
+ <td>jaybee</td>
+</tr>
+</tbody>
+</table>
+
+<p>Multiple values may also be expressed using the expanded form:</p>
+
+<div class="example"><div class="example-title"><span>Example 45</span>: Using an expanded form to set multiple values</div><pre class="example">{
+ "@id": "http://example.org/articles/8",
+ "dc:title": <span class="diff">
+ [
+ {
+ "@value": "Das Kapital",
+ "@language": "de"
+ },
+ {
+ "@value": "Capital",
+ "@language": "en"
+ }
+ ]</span>
+}</pre></div>
+
+<p>The markup shown above would generate the following data, again with
+ no inherent order:</p>
+
+<table class="example">
+<thead>
+ <tr><th>Subject</th>
+ <th>Property</th>
+ <th>Object</th>
+ <th>Language</th>
+</tr></thead>
+<tbody>
+<tr>
+ <td>http://example.org/articles/8</td>
+ <td>http://purl.org/dc/terms/title</td>
+ <td>Das Kapital</td>
+ <td>de</td>
+</tr>
+<tr>
+ <td>http://example.org/articles/8</td>
+ <td>http://purl.org/dc/terms/title</td>
+ <td>Capital</td>
+ <td>en</td>
+</tr>
+</tbody>
+</table>
+
+<p>As the notion of ordered collections is rather important in data
+ modeling, it is useful to have specific language support. In JSON-LD,
+ a list may be represented using the <code>@list</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> as follows:</p>
+<div class="example"><div class="example-title"><span>Example 46</span>: An ordered collection of values in JSON-LD</div><pre class="example">{
+...
+ "@id": "http://example.org/people#joebob",
+ "foaf:nick":
+ <span class="diff">{
+ "@list": [ "joe", "bob", "jaybee" ]
+ }</span>,
+...
+}</pre></div>
+
+<p>This describes the use of this <a class="tref internalDFN" title="array" href="#dfn-array">array</a> as being ordered,
+ and order is maintained when processing a document. If every use of a given multi-valued
+ property is a list, this may be abbreviated by setting <code>@container</code>
+ to <code>@list</code> in the <a class="tref internalDFN" title="context" href="#dfn-context">context</a>:</p>
+<div class="example"><div class="example-title"><span>Example 47</span>: Specifying that a collection is ordered in the context</div><pre class="example">{
+ <span class="diff">"@context":
+ {
+ ...
+ "nick":
+ {
+ "@id": "http://xmlns.com/foaf/0.1/nick",
+ "@container": "@list"
+ }
+ }</span>,
+...
+ "@id": "http://example.org/people#joebob",
+ "nick": <span class="diff">[ "joe", "bob", "jaybee" ]</span>,
+...
+}</pre></div>
+
+<div class="note"><div class="note-title"><span>Note</span></div><p class="">List of lists are not allowed in this version of JSON-LD.
+ This decision was made due to the extreme amount of added complexity when
+ processing lists of lists.</p></div>
+
+<p>Similarly to <code>@list</code>, there exists the <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> <code>@set</code> to
+ describe unordered sets. While its use in the body of a JSON-LD document
+ represents just syntactic sugar optimized away when processing
+ the document, it is very helpful when used within the context of a document.
+ Values of terms associated with a <code>@set</code> or <code>@list</code> container
+ are always represented in the form of an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> - even if there is just a
+ single value that would otherwise be optimized to a non-array form in a
+ <a href="#compact-document-form" class="sec-ref"><span class="secno">6.17</span> <span class="sec-title">Compact Document Form</span></a>. This makes post-processing of
+ the data easier as the data is always in array form, even if the array only
+ contains a single value.</p>
+
+<div class="note"><div class="note-title"><span>Note</span></div><p class="">The use of <code>@container</code> in the body of a JSON-LD
+ document has no meaning and is not allowed by the JSON-LD grammar (see <a href="#json-ld-grammar" class="sec-ref"><span class="secno">B.</span> <span class="sec-title">JSON-LD Grammar</span></a>).</p></div>
+
+</section>
+
+<section id="embedding">
+ <h3><span class="secno">6.10 </span>Embedding</h3>
+
+ <p><dfn title="embedding" id="dfn-embedding">Embedding</dfn> is a JSON-LD feature that allows an author to
+ use <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node objects</a> as
+ <a class="tref internalDFN" title="property" href="#dfn-property">property</a> values. This is a commonly used mechanism for
+ creating a parent-child relationship between two <a class="tref internalDFN" title="node" href="#dfn-node">nodes</a>.</p>
+
+ <p>The example shows two nodes related by a property from the first node:</p>
+
+ <div class="example"><div class="example-title"><span>Example 48</span>: Embedding a node object as property value of another node object</div><pre class="example">{
+...
+ "name": "Manu Sporny",
+ "<span class="diff">knows</span>":
+ {
+ "<span class="diff">@type</span>": "<span class="diff">Person</span>",
+ "<span class="diff">name</span>": "<span class="diff">Gregg Kellogg</span>",
+ }
+...
+}</pre></div>
+
+ <p>
+ A <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a>, like the one used above, may be used in
+ any value position in the body of a JSON-LD document.</p>
+</section>
+
+<section id="named-graphs">
+ <h3><span class="secno">6.11 </span>Named Graphs</h3>
+
+ <p>At times, it is necessary to make statements about a <a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">JSON-LD graph</a>
+ itself, rather than just a single <a class="tref internalDFN" title="node" href="#dfn-node">node</a>. This can be done by
+ grouping a set of <a class="tref internalDFN" title="node" href="#dfn-node">nodes</a> using the <code>@graph</code>
+ <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>. A developer may also name data expressed using the
+ <code>@graph</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> by pairing it with an
+ <code>@id</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> as shown in the following example:</p>
+
+ <div class="example"><div class="example-title"><span>Example 49</span>: Identifying and making statements about a graph</div><pre class="example">{
+ "@context": {
+ "generatedAt": "http://www.w3.org/ns/prov#generatedAtTime",
+ "Person": "http://xmlns.com/foaf/0.1/Person",
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "knows": "http://xmlns.com/foaf/0.1/knows",
+ "xsd": "http://www.w3.org/2001/XMLSchema#"
+ },
+ <span class="diff">"@id": "http://example.org/graphs/73",
+ "generatedAt": { "@value": "2012-04-09", "@type": "xsd:date" },
+ "@graph":</span>
+ [
+ {
+ "@id": "http://manu.sporny.org/i/public",
+ "@type": "Person",
+ "name": "Manu Sporny",
+ "knows": "http://greggkellogg.net/foaf#me"
+ },
+ {
+ "@id": "http://greggkellogg.net/foaf#me",
+ "@type": "Person",
+ "name": "Gregg Kellogg",
+ "knows": "http://manu.sporny.org/i/public"
+ }
+ ]
+}</pre></div>
+
+ <p>The example above expresses a <em>named</em> <a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">JSON-LD graph</a>
+ that is identified by the <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>
+ <code>http://example.org/graphs/73</code>. That graph is composed of the
+ statements about Manu and Gregg. Metadata about the graph itself is also
+ expressed via the <code>generatedAt</code> property, which specifies when
+ the graph was generated. An alternative view of the
+ information above is represented in table form below:</p>
+
+ <table class="example">
+ <thead>
+ <tr><th>Graph</th>
+ <th>Subject</th>
+ <th>Property</th>
+ <th>Object</th>
+ <th>Datatype</th>
+ </tr></thead>
+ <tbody>
+ <tr>
+ <td>http://example.org/graphs/73</td>
+ <td>http://example.org/graphs/73</td>
+ <td>http://www.w3.org/ns/prov#generatedAtTime</td>
+ <td>2012-04-09</td>
+ <td>http://www.w3.org/2001/XMLSchema#date</td>
+ </tr>
+ <tr>
+ <td>http://example.org/graphs/73</td>
+ <td>http://manu.sporny.org/i/public</td>
+ <td>http://www.w3.org/2001/XMLSchema#type</td>
+ <td>http://xmlns.com/foaf/0.1/Person</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>http://example.org/graphs/73</td>
+ <td>http://manu.sporny.org/i/public</td>
+ <td>http://xmlns.com/foaf/0.1/name</td>
+ <td>Manu Sporny</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>http://example.org/graphs/73</td>
+ <td>http://manu.sporny.org/i/public</td>
+ <td>http://xmlns.com/foaf/0.1/knows</td>
+ <td>http://greggkellogg.net/foaf#me</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>http://example.org/graphs/73</td>
+ <td>http://greggkellogg.net/foaf#me</td>
+ <td>http://www.w3.org/2001/XMLSchema#type</td>
+ <td>http://xmlns.com/foaf/0.1/Person</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>http://example.org/graphs/73</td>
+ <td>http://greggkellogg.net/foaf#me</td>
+ <td>http://xmlns.com/foaf/0.1/name</td>
+ <td>Gregg Kellogg</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>http://example.org/graphs/73</td>
+ <td>http://greggkellogg.net/foaf#me</td>
+ <td>http://xmlns.com/foaf/0.1/knows</td>
+ <td>http://manu.sporny.org/i/public</td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>When <code>@graph</code> is used in a document's top-level object which
+ has no other <a class="tref internalDFN" title="property" href="#dfn-property">properties</a> that are mapped
+ to an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> or a <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> it is considered to
+ express the otherwise implicit default graph. This mechanism can be useful
+ when a number of <a class="tref internalDFN" title="node" href="#dfn-node">nodes</a> thay may not directly
+ relate to one another through a property or where <a class="tref internalDFN" title="embedding" href="#dfn-embedding">embedding</a>
+ is not desirable to the application. For example:</p>
+
+ <div class="example"><div class="example-title"><span>Example 50</span>: Using @graph to explicitly express the default graph</div><pre class="example">{
+ "@context": ...,
+ "<span class="diff">@graph</span>":
+ [
+ {
+ "@id": "http://manu.sporny.org/i/public",
+ "@type": "foaf:Person",
+ "name": "Manu Sporny",
+ "knows": "http://greggkellogg.net/foaf#me"
+ },
+ {
+ "@id": "http://greggkellogg.net/foaf#me",
+ "@type": "foaf:Person",
+ "name": "Gregg Kellogg",
+ "knows": "http://manu.sporny.org/i/public"
+ }
+ ]
+}</pre></div>
+
+ <p>In this case, embedding doesn't work as each <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a>
+ references the other. Using the <code>@graph</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>
+ allows multiple <a class="tref internalDFN" title="node" href="#dfn-node">nodes</a> to be defined within an
+ <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, and allows the use of a shared <a class="tref internalDFN" title="context" href="#dfn-context">context</a>.
+ This is equivalent to using multiple
+ <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node objects</a> in array and defining
+ the <code>@context</code> within each <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a>:</p>
+
+ <div class="example"><div class="example-title"><span>Example 51</span>: Context needs to be duplicated if @graph is not used</div><pre class="example">[
+ {
+ <span class="diff">"@context": ...,</span>
+ "@id": "http://manu.sporny.org/i/public",
+ "@type": "foaf:Person",
+ "name": "Manu Sporny",
+ "knows": "http://greggkellogg.net/foaf#me"
+ },
+ {
+ <span class="diff">"@context": ...,</span>
+ "@id": "http://greggkellogg.net/foaf#me",
+ "@type": "foaf:Person",
+ "name": "Gregg Kellogg",
+ "knows": "http://manu.sporny.org/i/public"
+ }
+]</pre></div>
+
+</section>
+
+<section id="identifying-blank-nodes">
+ <h3><span class="secno">6.12 </span>Identifying Blank Nodes</h3>
+
+ <p>At times, it becomes necessary to be able to express information without
+ being able to specify the node. This type of node is called a <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a>
+ (see <cite><a href="http://www.w3.org/TR/rdf11-concepts/#section-blank-nodes">Section 3.4: Blank Nodes</a></cite>
+ of [<cite><a class="bibref" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>]). In JSON-LD, <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifiers</a> are
+ automatically created if a node is not specified using the <code>@id</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>.
+ However, authors may provide identifiers for <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank nodes</a>
+ by using the special <code>_</code> (underscore) <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>. This allows one
+ to reference the node locally within the document, but makes it impossible to reference
+ the node from an external document. The <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifier</a> is scoped
+ to the document in which it is used.</p>
+
+ <div class="example"><div class="example-title"><span>Example 52</span>: Specifying a local blank node identifier</div><pre class="example">{
+...
+ "@id": "<span class="diff">_:foo</span>",
+...
+}</pre></div>
+
+ <p>The example above would set the node to <code>_:foo</code>, which can
+ then be used elsewhere in the JSON-LD document to refer back to the
+ <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a>. If a developer finds that they refer to the <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a>
+ more than once, they should consider naming the node using a dereferenceable
+ <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> so that it can also be referenced from other documents.</p>
+</section>
+
+<section id="aliasing-keywords">
+<h3><span class="secno">6.13 </span>Aliasing Keywords</h3>
+
+<p>Each of the JSON-LD <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keywords</a>,
+except for <code>@context</code>, may be aliased to application-specific
+keywords. This feature allows legacy JSON content to be utilized
+by JSON-LD by re-using JSON keys that already exist in legacy documents.
+This feature also allows developers to design domain-specific implementations
+using only the JSON-LD <a class="tref internalDFN" title="context" href="#dfn-context">context</a>.</p>
+
+<div class="example"><div class="example-title"><span>Example 53</span>: Aliasing keywords</div><pre class="example">{
+ "@context":
+ {
+ <span class="diff">"url": "@id"</span>,
+ <span class="diff">"a": "@type"</span>,
+ "name": "http://schema.org/name"
+ },
+ "<span class="diff">url</span>": "http://example.com/about#gregg",
+ "<span class="diff">a</span>": "http://schema.org/Person",
+ "name": "Gregg Kellogg"
+}</pre></div>
+
+<p>In the example above, the <code>@id</code> and <code>@type</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">keywords</a> have been given the aliases <strong>url</strong> and
+<strong>a</strong>, respectively.
+</p>
+
+</section>
+
+<section id="data-annotations">
+<h3><span class="secno">6.14 </span>Data Annotations</h3>
+
+<p>It is common for developers using JSON to organize their data in ways
+that makes working with the data more efficient. It is often that these methods
+of organizing data are not meant to express Linked Data, but should survive
+transformation by JSON-LD. For example, if a developer
+organizes employees in a JSON-LD document by a company-issued ID number,
+JSON-LD should not destroy that 'database index' when transforming the data.
+Data annotations allow content that would otherwise be removed from
+a JSON-LD graph to be
+preserved by instructing the JSON-LD processor to syntactically preserve
+the annotation information and continue processing deeper into the JSON
+data structure.</p>
+
+<div class="example"><div class="example-title"><span>Example 54</span>: Data annotations</div><pre class="example">{
+ "@context":
+ {
+ "schema": "http://schema.org/",
+ "Article": "schema:Blog",
+ "name": "schema:name",
+ "articleBody": "schema:articleBody",
+ "wordCount": "schema:wordCount",
+ "commentCount": "http://example.com/schema/wordCount",
+ "blogPost": {
+ "@id": "schema:blogPost",
+ <span class="diff">"@container": "@annotation"</span>
+ },
+ "@id": "http://example.com/",
+ "@type": "Blog",
+ "name": "World Financial News",
+ <span class="diff">"blogPost": {
+ "en": {
+ "@id": "http://example.com/posts/1/en",
+ "articleBody": "World commodities were up today with heavy trading of crude oil...",
+ "wordCount": 1539,
+ "commentCount": 64
+ },
+ "de": {
+ "@id": "http://example.com/posts/1/de",
+ "articleBody": "Welt Rohstoffe waren bis heute mit schweren Handel mit Rohöl...",
+ "wordCount": 1204,
+ "commentCount": 23
+ }</span>
+ }
+}</pre></div>
+
+<p>In the example above, the <strong>blogPost</strong> <a class="tref internalDFN" title="term" href="#dfn-term">term</a> has
+been marked as a <em>data annotation container</em>. The <strong>en</strong>,
+<strong>de</strong>, and <strong>ja</strong> keys will effectively be ignored
+semantically, but preserved syntactically, by the JSON-LD Processor as
+<em>annotations</em>. The interpretation of the data above is expressed in
+the table below. Note how the annotations do not appear in the Linked Data
+below, but would continue to exist if the document were compacted or expanded
+using a JSON-LD processor:
+</p>
+
+ <table class="example">
+ <thead>
+ <tr><th>Subject</th>
+ <th>Property</th>
+ <th>Object</th>
+ <th>Datatype</th>
+ </tr></thead>
+ <tbody>
+ <tr>
+ <td>http://example.com/</td>
+ <td>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</td>
+ <td>http://schema.org/Blog</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>http://example.com/</td>
+ <td>http://schema.org/name</td>
+ <td>World Financial News</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>http://example.com/</td>
+ <td>http://schema.org/blogPost</td>
+ <td>http://example.com/posts/1/en</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>http://example.com/</td>
+ <td>http://schema.org/blogPost</td>
+ <td>http://example.com/posts/1/de</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>http://example.com/posts/1/en</td>
+ <td>http://schema.org/articleBody</td>
+ <td>World commodities were up today with heavy trading of crude oil...</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>http://example.com/posts/1/en</td>
+ <td>http://schema.org/wordCount</td>
+ <td>1539</td>
+ <td>http://www.w3.org/2001/XMLSchema#integer</td>
+ </tr>
+ <tr>
+ <td>http://example.com/posts/1/en</td>
+ <td>http://example.com/schema/commentCount</td>
+ <td>64</td>
+ <td>http://www.w3.org/2001/XMLSchema#integer</td>
+ </tr>
+ <tr>
+ <td>http://example.com/posts/1/de</td>
+ <td>http://schema.org/articleBody</td>
+ <td>Welt Rohstoffe waren bis heute mit schweren Handel mit Rohöl...</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>http://example.com/posts/1/de</td>
+ <td>http://schema.org/wordCount</td>
+ <td>1204</td>
+ <td>http://www.w3.org/2001/XMLSchema#integer</td>
+ </tr>
+ <tr>
+ <td>http://example.com/posts/1/de</td>
+ <td>http://example.com/schema/commentCount</td>
+ <td>23</td>
+ <td>http://www.w3.org/2001/XMLSchema#integer</td>
+ </tr>
+ </tbody>
+ </table>
+
+</section>
+
+<section id="explicitly-ignoring-data">
+<h3><span class="secno">6.15 </span>Explicitly Ignoring Data</h3>
+
+<p>At times, it becomes necessary to explicitly ignore data expressed in JSON
+documents because it has no semantic meaning. For example, when the
+<code>@vocab</code> keyword is used, every key in a JSON-LD object is
+appended to the vocabulary <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>. The author may not want that
+behavior to apply to every key, and it may be easier to specify just the keys
+that they want the JSON-LD processor to ignore. For this purpose, an author
+may associate the <a class="tref internalDFN" title="null" href="#dfn-null">null</a> keyword with a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> in the
+JSON-LD Context.</p>
+
+<div class="example"><div class="example-title"><span>Example 55</span>: Using the null keyword to ignore data</div><pre class="example">{
+ "@context":
+ {
+ "@vocab": "http://schema.org/",
+ <span class="diff">"databaseId": null</span>
+ },
+ "name": "Manu Sporny",
+ "description": "That guy",
+ "gender": "Male",
+ <span class="diff">"databaseId": "23987520"</span>
+}</pre></div>
+
+<p>In the example above, the author has used <code>@vocab</code> as the base
+<abbr title="Internationalized Resource Identifier">IRI</abbr> for all terms in the document, but has expressed that the
+<code>databaseId</code> value should not be processed by the JSON-LD processor
+by associating it with the <a class="tref internalDFN" title="null" href="#dfn-null">null</a> keyword in the JSON-LD Context.
+</p>
+
+</section>
+
+<section id="expanded-document-form">
+<h3><span class="secno">6.16 </span>Expanded Document Form</h3>
+<p>The JSON-LD API [<cite><a class="bibref" href="#bib-JSON-LD-API">JSON-LD-API</a></cite>] defines an method for <em>expanding</em> a
+ JSON-LD document.
+ Expansion is the process of taking a JSON-LD document and applying a
+ <code>@context</code> such that all IRIs, types, and values
+ are expanded so that the <code>@context</code> is no longer necessary.</p>
+
+<p>For example, assume the following JSON-LD input document:</p>
+
+<div class="example"><div class="example-title"><span>Example 56</span>: Sample JSON-LD document</div><pre class="example">{
+ "@context":
+ {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ },
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/"
+}</pre></div>
+
+<p>Running the JSON-LD Expansion algorithm against the JSON-LD input document
+ provided above would result in the following output:</p>
+
+<div class="example"><div class="example-title"><span>Example 57</span>: Expanded form for the previous example</div><pre class="example">[
+ {
+ "http://xmlns.com/foaf/0.1/name": [
+ { "@value": "Manu Sporny" }
+ ],
+ "http://xmlns.com/foaf/0.1/homepage": [
+ { "@id": "http://manu.sporny.org/" }
+ ]
+ }
+]</pre></div>
+
+<p>Expanded document form is useful when an application has to process input
+data in a deterministic form. It has been optimized to ensure that the code
+that developers have to write is minimized compared to the code that would
+have to be written to operate on
+<a href="#compact-document-form" class="sec-ref"><span class="secno">6.17</span> <span class="sec-title">Compact Document Form</span></a>.</p>
+
+</section>
+
+<section id="compact-document-form">
+<h3><span class="secno">6.17 </span>Compact Document Form</h3>
+<p>The JSON-LD API [<cite><a class="bibref" href="#bib-JSON-LD-API">JSON-LD-API</a></cite>] defines a method for <em>compacting</em> a JSON-LD document.
+ Compaction is the process of taking a JSON-LD document and applying a
+ context such that the most compact form of the document is generated. JSON
+ is typically expressed in a very compact, key-value format. That is, full
+ IRIs are rarely used as keys. At times, a JSON-LD document may be received
+ that is not in its most compact form. JSON-LD, via the API, provides a way
+ to compact a JSON-LD document.</p>
+
+<p>For example, assume the following JSON-LD input document:</p>
+
+<div class="example"><div class="example-title"><span>Example 58</span>: Sample expanded JSON-LD document</div><pre class="example">[
+ {
+ "http://xmlns.com/foaf/0.1/name": [ "Manu Sporny" ],
+ "http://xmlns.com/foaf/0.1/homepage": [
+ {
+ "@id": "http://manu.sporny.org/"
+ }
+ ]
+ }
+]</pre></div>
+
+<p>Additionally, assume the following developer-supplied JSON-LD context:</p>
+
+<div class="example"><div class="example-title"><span>Example 59</span>: Sample context</div><pre class="example">{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ }
+}</pre></div>
+
+<p>Running the JSON-LD Compaction algorithm given the context supplied above
+ against the JSON-LD input document provided above would result in the following
+ output:</p>
+
+<div class="example"><div class="example-title"><span>Example 60</span>: Compact form of the sample document once sample context has been applied</div><pre class="example">{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ }
+ },
+ "name": "Manu Sporny",
+ "homepage": "http://manu.sporny.org/"
+}</pre></div>
+
+<p>The compaction algorithm enables a developer to map any document into an
+ application-specific compacted form by first <a href="#expanded-document-form" class="sec-ref"><span class="secno">6.16</span> <span class="sec-title">Expanded Document Form</span></a>.
+ While the context provided above mapped <code>http://xmlns.com/foaf/0.1/name</code>
+ to <strong>name</strong>, it could have also mapped it to any arbitrary string
+ provided by the developer. This powerful mechanism allows the developer to
+ re-shape the incoming JSON data into a format that is optimized for
+ their application.</p>
+</section>
+
+</section>
+
+<section class="appendix normative" id="data-model">
+
+<!--OddPage-->
+<h2><span class="secno">A. </span>Data Model</h2>
+
+ <p>JSON-LD is a serialization format for <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a> based on JSON.
+ It is therefore important to distinguish between the syntax, which is defined
+ by JSON in [<cite><a class="bibref" href="#bib-RFC4627">RFC4627</a></cite>], and <dfn title="json-ld_data_model" id="dfn-json-ld_data_model">JSON-LD's data model</dfn>
+ which is defined as follows:</p>
+
+ <ul>
+ <li>A <dfn title="json-ld_document" id="dfn-json-ld_document">JSON-LD document</dfn> serializes a collection of
+ <a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">JSON-LD graphs</a> and comprises exactly one
+ <dfn title="default_graph" id="dfn-default_graph">default graph</dfn> and zero or more <dfn title="named_graph" id="dfn-named_graph">named graphs</dfn>.</li>
+ <li>The default graph does not have a name and <em class="rfc2119" title="may">may</em> be empty.</li>
+ <li>Each named graph is a pair consisting of an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> or <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a>
+ (the <dfn title="graph_name" id="dfn-graph_name">graph name</dfn>) and a <a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">JSON-LD graph</a>. Whenever possible, the
+ <a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">graph name</a> <em class="rfc2119" title="should">should</em> be an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.</li>
+ <li>A <dfn title="json-ld_graph" id="dfn-json-ld_graph">JSON-LD graph</dfn> is a labeled directed graph, i.e., a set of
+ <a class="tref internalDFN" title="node" href="#dfn-node">nodes</a> connected by <a class="tref internalDFN" title="edge" href="#dfn-edge">edges</a>.</li>
+ <li>Every <dfn title="edge" id="dfn-edge">edge</dfn> has a direction associated with it and is labeled with
+ an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> or a <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifier</a>. Within the JSON-LD syntax
+ these edge labels are called <dfn title="property" id="dfn-property">properties</dfn>. Whenever possible, an
+ <a class="tref internalDFN" title="edge" href="#dfn-edge">edge</a> <em class="rfc2119" title="should">should</em> be labeled with an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.</li>
+ <li>Every <dfn title="node" id="dfn-node">node</dfn> is an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>, a <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a>,
+ a <a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value">JSON-LD value</a>, or a <a class="tref internalDFN" title="list" href="#dfn-list">list</a>.</li>
+ <li>A node having an outgoing edge <em class="rfc2119" title="must">must</em> be an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> or a
+ <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a>.</li>
+ <li>A <a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">JSON-LD graph</a> <em class="rfc2119" title="should not">should not</em> contain unconnected <a class="tref internalDFN" title="node" href="#dfn-node">nodes</a>,
+ i.e., nodes which are not connected by an <a class="tref internalDFN" title="edge" href="#dfn-edge">edge</a> to any other <a class="tref internalDFN" title="node" href="#dfn-node">node</a>.</li>
+ <li>An <dfn title="iri" id="dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></dfn>
+ (Internationalized Resource Identifier) is a string that conforms to the syntax
+ defined in [<cite><a class="bibref" href="#bib-RFC3987">RFC3987</a></cite>]. <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a> used within a
+ <a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">JSON-LD graph</a> <em class="rfc2119" title="should">should</em> return a <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a> document describing
+ the resource denoted by that <abbr title="Internationalized Resource Identifier">IRI</abbr> when being dereferenced.</li>
+ <li>A <dfn title="blank_node" id="dfn-blank_node">blank node</dfn> is a <a class="tref internalDFN" title="node" href="#dfn-node">node</a> which is neither an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>,
+ nor a <a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value">JSON-LD value</a>, or a <a class="tref internalDFN" title="list" href="#dfn-list">list</a>. A blank node <em class="rfc2119" title="may">may</em> be identified
+ by a <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifier</a>.</li>
+ <li>A <dfn title="blank_node_identifier" id="dfn-blank_node_identifier">blank node identifier</dfn> is a string that can be used as an identifier
+ for a <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a> within the scope of a <a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">JSON-LD document</a>.
+ Blank node identifiers begin with <code>_:</code>.</li>
+ <li>A <dfn title="json-ld_value" id="dfn-json-ld_value">JSON-LD value</dfn> is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, a <a class="tref internalDFN" title="number" href="#dfn-number">number</a>,
+ <a class="tref internalDFN" title="true" href="#dfn-true">true</a> or <a class="tref internalDFN" title="false" href="#dfn-false">false</a>, a <a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">typed value</a>, or a
+ <a class="tref internalDFN" title="language-tagged_string" href="#dfn-language-tagged_string">language-tagged string</a>.</li>
+ <li>A <dfn title="typed_value" id="dfn-typed_value">typed value</dfn> consists of a value, which is a string, and a type, which is an <abbr title="Internationalized Resource Identifier">IRI</abbr>.</li>
+ <li>A <dfn title="language-tagged_string" id="dfn-language-tagged_string">language-tagged string</dfn> consists of a string and a non-empty language
+ tag as defined by [<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>]. The language tag must be well-formed according to section
+ <a href="http://tools.ietf.org/html/bcp47#section-2.2.9">2.2.9</a> of [<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>], and <em class="rfc2119" title="must">must</em>
+ be normalized to lowercase.</li>
+ <li>A <dfn title="list" id="dfn-list">list</dfn> is an ordered sequence of <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a>,
+ <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank nodes</a>, and
+ <a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value">JSON-LD values</a>.</li>
+ </ul>
+
+ <div class="issue"><div class="issue-title"><span>Issue</span></div><p class="">In contrast to the RDF data model as defined in [<cite><a class="bibref" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>], JSON-LD allows
+ blank nodes as property labels and graph names. This feature is
+ controversial in the RDF WG and may be removed in the future.</p></div>
+
+ <p><a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">JSON-LD documents</a> <em class="rfc2119" title="may">may</em> contain data that cannot be
+ represented by the <a class="tref internalDFN" title="json-ld_data_model" href="#dfn-json-ld_data_model">data model</a> defined above.
+ Unless otherwise specified, such data is ignored when a <a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">JSON-LD document</a>
+ is being processed. This means, e.g., that properties which are not mapped to an
+ <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> or <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a> will be ignored.</p>
+
+ <p style="text-align: center"><img src="linked-data-graph.png" title="An illustration of JSON-LD's data model" /></p>
+ <p style="text-align: center">Figure 1: An illustration of JSON-LD's data model.</p>
+</section>
+
+<section class="appendix normative" id="json-ld-grammar">
+
+<!--OddPage-->
+<h2><span class="secno">B. </span>JSON-LD Grammar</h2>
+<em>This section is normative</em>
+
+<div class="issue"><div class="issue-title"><a href="https://github.com/json-ld/json-ld.org/issues/114"><span>Issue 114</span></a></div><p class="">This section is an attempt to formalize
+a normative grammar for JSON-LD.</p></div>
+
+<p>This appendix restates the syntactic conventions described in the
+ previous sections more formally.</p>
+
+<div class="note"><div class="note-title"><span>Note</span></div><p class="">The JSON-LD context allows <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keywords</a>
+ <a href="#aliasing-keywords" class="sec-ref"><span class="secno">6.13</span> <span class="sec-title">Aliasing Keywords</span></a>). Whenever a <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> is
+ discussed in this grammar, the statements also apply to an alias for
+ that <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>. For example, if the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>
+ defines the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> <code>id</code> as an alias for <code>@id</code>,
+ that alias may be legitimately used as a substitution for <code>@id</code>.
+ Note that <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> aliases are not expanded during context
+ processing.</p></div>
+
+<p>A <a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">JSON-LD document</a> <em class="rfc2119" title="must">must</em> be a valid JSON document as described
+ in [<cite><a class="bibref" href="#bib-RFC4627">RFC4627</a></cite>].</p>
+
+<p>A <a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">JSON-LD document</a> <em class="rfc2119" title="must">must</em> be a single <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a>
+ or a JSON <a class="tref internalDFN" title="array" href="#dfn-array">array</a> containing a set of one or more
+ <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node objects</a>.</p>
+
+<section id="grammar-node-object" typeof="bibo:Chapter" resource="#grammar-node-object" rel="bibo:chapter">
+<h3><span class="secno">B.1 </span>Node Object</h3>
+
+<p>A <dfn title="node_object" id="dfn-node_object">node object</dfn> represents zero or more properties of a
+ <a class="tref internalDFN" title="node" href="#dfn-node">node</a> in the <a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">JSON-LD graph</a> serialized by the
+ <a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">JSON-LD document</a>.
+
+ A <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON Object</a> is a <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> if
+ it exists outside of the JSON-LD Context and:</p>
+
+ <ul>
+ <li>it does not contain the <code>@value</code>, <code>@list</code>,
+ <code>@annotation</code>, or <code>@set</code> keywords, or</li>
+ <li>it does not contain the <code>@graph</code> keyword and is
+ the top-most <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON Object</a> in the JSON-LD document.
+ </li></ul>
+
+ The properties of a <a class="tref internalDFN" title="node" href="#dfn-node">node</a> in the <a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">JSON-LD graph</a>
+ may be spread among different <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node objects</a>
+ within a document. When that happens,
+ the keys of the different <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node objects</a>
+ are merged to create the properties of the resulting <a class="tref internalDFN" title="node" href="#dfn-node">node</a>.<p></p>
+
+<p>A <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> <em class="rfc2119" title="must">must</em> be a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> that contains
+ one or more key-value pairs. Keys <em class="rfc2119" title="must">must</em> either be
+ <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a>,
+ <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact IRIs</a>,
+ <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> valid in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, or
+ one of the following <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keywords</a>:</p>
+<ul>
+ <li><code>@context</code>,</li>
+ <li><code>@graph</code>,</li>
+ <li><code>@id</code>, or</li>
+ <li><code>@type</code></li>
+</ul>
+<p>If the <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> contains the <code>@context</code>
+ key, its value <em class="rfc2119" title="must">must</em> be one of the following:</p>
+<ul>
+ <li>an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>,</li>
+ <li>a <a class="tref internalDFN" title="context_definition" href="#dfn-context_definition">context definition</a>, or</li>
+ <li>an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> composed of any number of the previous two expressions.</li>
+</ul>
+
+<p>If the <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> contains the <code>@id</code> key,
+ its value <em class="rfc2119" title="must">must</em> be
+ an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>,
+ a <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> (including <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifiers</a>), or
+ a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> defined in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> expanding
+ into an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> or a <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifier</a>.
+ See <a href="#node-identifiers" class="sec-ref"><span class="secno">5.4</span> <span class="sec-title">Node Identifiers</span></a>, <a href="#compact-iris" class="sec-ref"><span class="secno">6.1</span> <span class="sec-title">Compact IRIs</span></a>,
+ and <a href="#identifying-blank-nodes" class="sec-ref"><span class="secno">6.12</span> <span class="sec-title">Identifying Blank Nodes</span></a> for further discussion on
+ <code>@id</code> values.</p>
+
+<p>If the <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> contains the <code>@type</code>
+ key, its value <em class="rfc2119" title="must">must</em> be either
+ an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>,
+ a <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> (excluding <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifier</a>),
+ a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> defined in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> expanding into an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>, or
+ an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> of any of these.
+ See <a href="#specifying-the-type" class="sec-ref"><span class="secno">5.5</span> <span class="sec-title">Specifying the Type</span></a> for further discussion on
+ <code>@type</code> values.</p>
+
+<p>If the <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> contains the <code>@graph</code>
+ key, its value <em class="rfc2119" title="must">must</em> be
+ a <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> or
+ an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> of zero or more <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node objects</a>.
+ If the <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> contains an <code>@id</code> keyword,
+ its value is used as the label of a named graph.
+ See <a href="#named-graphs" class="sec-ref"><span class="secno">6.11</span> <span class="sec-title">Named Graphs</span></a> for further discussion on
+ <code>@graph</code> values.</p>
+
+<div class="note"><div class="note-title"><span>Note</span></div><p class="">As a special case, if a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> contains no
+ keys other than <code>@graph</code> and <code>@context</code>, and the
+ <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> is the root of the JSON-LD document, the
+ <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> is not treated as a <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a>; this
+ is used as a way of defining <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node
+ definitions</a> that may not form a connected graph. This allows a
+ <a class="tref internalDFN" title="context" href="#dfn-context">context</a> to be defined which is shared by all of the constituent
+ <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node objects</a>.</p></div>
+
+<p>A <a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">JSON-LD document</a> <em class="rfc2119" title="must not">must not</em> contain any <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>
+ that expands to another keyword.</p>
+
+<!--
+ tidoust: clarify?
+ msporny: This restriction prevents confusing JSON-LD Contexts where,
+ for example, @id is an alias for @type, thus preventing the use of
+ @id altogether. The previous text said "or alias", which I believe was an
+ error, so I removed it.
+-->
+
+
+<p>Keys in a <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> that are not
+ <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keywords</a> <em class="rfc2119" title="must">must</em> expand to an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>
+ using the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. The values associated with these keys
+ <em class="rfc2119" title="must">must</em> be one of the following:</p>
+
+<ul>
+ <li><a class="tref internalDFN" title="string" href="#dfn-string">string</a>,</li>
+ <li><a class="tref internalDFN" title="number" href="#dfn-number">number</a>,</li>
+ <li><a class="tref internalDFN" title="true" href="#dfn-true">true</a>,</li>
+ <li><a class="tref internalDFN" title="false" href="#dfn-false">false</a>,</li>
+ <li><a class="tref internalDFN" title="null" href="#dfn-null">null</a>,</li>
+ <li><a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a>,</li>
+ <li><a class="tref internalDFN" title="expanded_typed_value" href="#dfn-expanded_typed_value">expanded typed value</a>,</li>
+ <li><a class="tref internalDFN" title="expanded_language-tagged_string" href="#dfn-expanded_language-tagged_string">expanded language-tagged string</a>,</li>
+ <li><a class="tref internalDFN" title="list" href="#dfn-list">list</a> or <a class="tref internalDFN" title="set" href="#dfn-set">set</a>,</li>
+ <li>an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> of zero or more of the possibilities above,</li>
+ <li>a <a class="tref internalDFN" title="language_map" href="#dfn-language_map">language map</a>, or </li>
+ <li>an <a class="tref internalDFN" title="annotation_map" href="#dfn-annotation_map">annotation map</a></li>
+</ul>
+
+</section>
+
+<section id="grammar-term-reference" typeof="bibo:Chapter" resource="#grammar-term-reference" rel="bibo:chapter">
+ <h3><span class="secno">B.2 </span>Term</h3>
+ <p>A <dfn title="term" id="dfn-term">term</dfn> is a short-hand <a class="tref internalDFN" title="string" href="#dfn-string">string</a> that expands
+ to an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> or a <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier">blank node identifier</a>.</p>
+
+ <p>A <a class="tref internalDFN" title="term" href="#dfn-term">term</a> <em class="rfc2119" title="must not">must not</em> equal any of the JSON-LD
+ <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keywords</a>.</p>
+
+ <p>To avoid forward-compatibility issues, a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> <em class="rfc2119" title="should not">should not</em> start
+ with an <code>@</code> character as future versions of JSON-LD may introduce
+ additional <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keywords</a>. Furthermore, the use of
+ empty terms (<code>""</code>) is discouraged as not all programming languages
+ are able to handle empty property names.</p>
+
+ <p>See <a href="#the-context" class="sec-ref"><span class="secno">5.1</span> <span class="sec-title">The Context</span></a> and <a href="#iris" class="sec-ref"><span class="secno">5.3</span> <span class="sec-title">IRIs</span></a> for further discussion
+ on mapping <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> to <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a>.</p>
+</section>
+
+<section id="grammar-language-map" typeof="bibo:Chapter" resource="#grammar-language-map" rel="bibo:chapter">
+<h3><span class="secno">B.3 </span>Language Map</h3>
+<p>A <dfn title="language_map" id="dfn-language_map">language map</dfn> is used to associate a language with a value in a
+ way that allows easy programmatic access. A <a class="tref internalDFN" title="language_map" href="#dfn-language_map">language map</a> may be
+ used as a term value within a <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> if the term is defined
+ with <code>@container</code> set to <code>@language</code>. The keys of a
+ <a class="tref internalDFN" title="language_map" href="#dfn-language_map">language map</a> <em class="rfc2119" title="must">must</em> be lowercase [<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>]
+ <a class="tref internalDFN" title="string" href="#dfn-string">strings</a> with an associated value that is any
+ of the following types:</p>
+<ul>
+ <li><a class="tref internalDFN" title="string" href="#dfn-string">string</a>, or</li>
+ <li>an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> of zero or more strings</li>
+</ul>
+<p>See <a href="#language-tagged-strings" class="sec-ref"><span class="secno">6.3</span> <span class="sec-title">Language-tagged Strings</span></a> for further discussion on language maps.</p>
+</section>
+
+<section id="grammar-annotation-map" typeof="bibo:Chapter" resource="#grammar-annotation-map" rel="bibo:chapter">
+<h3><span class="secno">B.4 </span>Annotation Map</h3>
+<p>An <dfn title="annotation_map" id="dfn-annotation_map">annotation map</dfn> allows keys that have no semantic meaning,
+ but should be preserved regardless, to be used in JSON-LD documents.
+ An <a class="tref internalDFN" title="annotation_map" href="#dfn-annotation_map">annotation map</a> may
+ be used as a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> value within a <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a> if the
+ term is defined with <code>@container</code> set to <code>@annotation</code>.
+ The keys of a <a class="tref internalDFN" title="annotation_map" href="#dfn-annotation_map">annotation map</a> <em class="rfc2119" title="must">must</em> be
+ <a class="tref internalDFN" title="string" href="#dfn-string">strings</a> with an associated value that is any
+ of the following types:</p>
+<ul>
+ <li><a class="tref internalDFN" title="string" href="#dfn-string">string</a>,</li>
+ <li><a class="tref internalDFN" title="number" href="#dfn-number">number</a>,</li>
+ <li><a class="tref internalDFN" title="true" href="#dfn-true">true</a>,</li>
+ <li><a class="tref internalDFN" title="false" href="#dfn-false">false</a>,</li>
+ <li><a class="tref internalDFN" title="null" href="#dfn-null">null</a>,</li>
+ <li><a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a>,</li>
+ <li><a class="tref internalDFN" title="expanded_value" href="#dfn-expanded_value">expanded value</a>,</li>
+ <li>an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> of zero or more of the above possibilities</li>
+</ul>
+<p>See <a href="#data-annotations" class="sec-ref"><span class="secno">6.14</span> <span class="sec-title">Data Annotations</span></a> for further information on this
+topic.</p>
+</section>
+
+<section id="grammar-expanded-values" typeof="bibo:Chapter" resource="#grammar-expanded-values" rel="bibo:chapter">
+<h3><span class="secno">B.5 </span>Expanded Values</h3>
+
+<p>An <dfn title="expanded_value" id="dfn-expanded_value">expanded value</dfn> is used to explicitly associate a type or a
+ language with a value to create a <a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">typed value</a> or a <a class="tref internalDFN" title="language-tagged_string" href="#dfn-language-tagged_string">language-tagged
+ string</a>.</p>
+
+<p>An <a class="tref internalDFN" title="expanded_value" href="#dfn-expanded_value">expanded value</a> <em class="rfc2119" title="must">must</em> be a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> containing the
+ <code>@value</code> key. It <em class="rfc2119" title="may">may</em> also contain a <code>@type</code> or
+ a <code>@language</code> key but <em class="rfc2119" title="must not">must not</em> contain both a <code>@type</code>
+ and a <code>@language</code> key. An <a class="tref internalDFN" title="expanded_value" href="#dfn-expanded_value">expanded value</a> <em class="rfc2119" title="must not">must not</em>
+ contain keys other than <code>@value</code>, <code>@language</code>, and
+ <code>@type</code>. An <a class="tref internalDFN" title="expanded_value" href="#dfn-expanded_value">expanded value</a> that contains a
+ <code>@type</code> key is called an <dfn title="expanded_typed_value" id="dfn-expanded_typed_value">expanded typed value</dfn>.
+ An <a class="tref internalDFN" title="expanded_value" href="#dfn-expanded_value">expanded value</a> that contains a <code>@language</code> key
+ is called an <dfn title="expanded_language-tagged_string" id="dfn-expanded_language-tagged_string">expanded language-tagged string</dfn>.</p>
+
+<p>The value associated with the <code>@value</code> key <em class="rfc2119" title="must">must</em> be either a
+ <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, <a class="tref internalDFN" title="number" href="#dfn-number">number</a>, <a class="tref internalDFN" title="true" href="#dfn-true">true</a>,
+ <a class="tref internalDFN" title="false" href="#dfn-false">false</a> or <a class="tref internalDFN" title="null" href="#dfn-null">null</a>.</p>
+
+<p>The value associated with the <code>@language</code> key <em class="rfc2119" title="must">must</em> have the
+ lexical form described in [<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>], or be <a class="tref internalDFN" title="null" href="#dfn-null">null</a>.</p>
+
+<p>The value associated with the <code>@annotation</code> key <em class="rfc2119" title="must">must</em> be a
+ <a class="tref internalDFN" title="string" href="#dfn-string">string</a>.</p>
+
+<p>The value associated with the <code>@type</code> key <em class="rfc2119" title="must">must</em> be a
+ <a class="tref internalDFN" title="term" href="#dfn-term">term</a>, a <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a>,
+ an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>, or <code>null</code>.</p>
+
+<p>See <a href="#typed-values" class="sec-ref"><span class="secno">6.2</span> <span class="sec-title">Typed Values</span></a> and <a href="#language-tagged-strings" class="sec-ref"><span class="secno">6.3</span> <span class="sec-title">Language-tagged Strings</span></a>
+ for more information on
+ <a class="tref internalDFN" title="expanded_value" href="#dfn-expanded_value">expanded values</a>.</p>
+</section>
+
+<section id="grammar-set-list" typeof="bibo:Chapter" resource="#grammar-set-list" rel="bibo:chapter">
+<h3><span class="secno">B.6 </span>List and Set Values</h3>
+
+<p>A <a class="tref internalDFN" title="list" href="#dfn-list">list</a> represents an <em>ordered</em> set of values.
+ A <dfn title="set" id="dfn-set">set</dfn> represents an <em>unordered</em> set of values.
+ Unless otherwise specified (typically through the use of a <a class="tref internalDFN" title="list" href="#dfn-list">list</a>),
+ <a class="tref internalDFN" title="array" href="#dfn-array">arrays</a> are unordered in JSON-LD. As such, the
+ <code>@set</code> keyword, when used in the body of a JSON-LD document,
+ represents just syntactic sugar which is optimized away when processing the document.
+ However, it is very helpful when used within the context of a document. Values
+ of terms associated with a <code>@set</code> or <code>@list</code> container
+ will always be represented in the form of an array when a document is processed -
+ even if there is just a single value that would otherwise be optimized to
+ a non-array form in <a href="#compact-document-form">compact document form</a>.
+ This simplifies post-processing of the data as the data is always in array form.</p>
+
+<p>A <a class="tref internalDFN" title="list" href="#dfn-list">list</a> <em class="rfc2119" title="must">must</em> be a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> that contains a single key-value pair where the key is <code>@list</code>.</p>
+
+<p>A <a class="tref internalDFN" title="set" href="#dfn-set">set</a> <em class="rfc2119" title="must">must</em> be a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> that contains a single key-value pair where the key is <code>@set</code>.</p>
+
+<p>In both cases, the value associated with the key <em class="rfc2119" title="must">must</em> be an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> of any of the following:</p>
+<ul>
+ <li><a class="tref internalDFN" title="string" href="#dfn-string">string</a>,</li>
+ <li><a class="tref internalDFN" title="number" href="#dfn-number">number</a>,</li>
+ <li><a class="tref internalDFN" title="true" href="#dfn-true">true</a>,</li>
+ <li><a class="tref internalDFN" title="false" href="#dfn-false">false</a>,</li>
+ <li><a class="tref internalDFN" title="null" href="#dfn-null">null</a>,</li>
+ <li><a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a>,</li>
+ <li><a class="tref internalDFN" title="expanded_typed_value" href="#dfn-expanded_typed_value">expanded typed value</a>, or</li>
+ <li><a class="tref internalDFN" title="expanded_language-tagged_string" href="#dfn-expanded_language-tagged_string">expanded language-tagged string</a></li>
+</ul>
+
+<p>See <a href="#sets-and-lists" class="sec-ref"><span class="secno">6.9</span> <span class="sec-title">Sets and Lists</span></a> for further discussion on List and Set Values.</p>
+</section>
+
+<section id="grammar-context" typeof="bibo:Chapter" resource="#grammar-context" rel="bibo:chapter">
+<h3><span class="secno">B.7 </span>Context Definition</h3>
+<p>A <dfn title="context_definition" id="dfn-context_definition">context definition</dfn> defines a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> in a <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a>.</p>
+
+<p>A <a class="tref internalDFN" title="context_definition" href="#dfn-context_definition">context definition</a> <em class="rfc2119" title="must">must</em> be a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>
+ containing one or more key-value pairs. Keys <em class="rfc2119" title="must">must</em> either be
+ <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> or <code>@language</code> or <code>@vocab</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keywords</a>.
+
+</p><p>If the <a class="tref internalDFN" title="context_definition" href="#dfn-context_definition">context definition</a> has a <code>@language</code> key,
+ its value <em class="rfc2119" title="must">must</em> have the lexical form described in [<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>] or be <a class="tref internalDFN" title="null" href="#dfn-null">null</a>.</p>
+<p>If the <a class="tref internalDFN" title="context_definition" href="#dfn-context_definition">context definition</a> has a <code>@vocab</code> key,
+ its value <em class="rfc2119" title="must">must</em> have the lexical form of <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a> or be <a class="tref internalDFN" title="null" href="#dfn-null">null</a>.</p>
+
+<p><a class="tref internalDFN" title="term" href="#dfn-term">Term</a> values <em class="rfc2119" title="must">must</em> be either a
+ <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, <code>null</code>, or an <a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">expanded term definition</a>.</p>
+
+<p>An <dfn title="expanded_term_definition" id="dfn-expanded_term_definition">expanded term definition</dfn> is used to describe the mapping
+ between a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> and its expanded identifier, as well as other
+ properties of the value associated with the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> when it is
+ used as key in a <a class="tref internalDFN" title="node_object" href="#dfn-node_object">node object</a>.</p>
+
+<p>An <a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">expanded term definition</a> <em class="rfc2119" title="should">should</em> be a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>
+ composed of zero or more keys from <code>@id</code>,
+ <code>@type</code>, <code>@language</code> or <code>@container</code>. An
+ <a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">expanded term definition</a> <em class="rfc2119" title="should not">should not</em> contain any other keys.
+</p><p>If the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> definition is not <code>null</code>, a <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a>, or an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>,
+ the <a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">expanded term
+ definition</a> <em class="rfc2119" title="must">must</em> include the <code>@id</code> key.</p>
+
+<p>If the <a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">expanded term definition</a> contains the <code>@id</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>,
+ its value <em class="rfc2119" title="must">must</em> be <code>null</code>, an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>, a <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a>, a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> defined in the defining <a class="tref internalDFN" title="context_definition" href="#dfn-context_definition">context definition</a> or the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, or an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> composed of any of the previous allowed values.</p>
+<p>If the <a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">expanded term definition</a> contains the <code>@type</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>,
+ its value <em class="rfc2119" title="must">must</em> be an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>, a <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a>, a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> defined in the defining <a class="tref internalDFN" title="context_definition" href="#dfn-context_definition">context definition</a> or the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, or the <code>@id</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>.</p>
+<p>If the <a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">expanded term definition</a> contains the <code>@language</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>,
+ its value <em class="rfc2119" title="must">must</em> have the lexical form described in [<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>] or be <a class="tref internalDFN" title="null" href="#dfn-null">null</a>.</p>
+<p>If the <a class="tref internalDFN" title="expanded_term_definition" href="#dfn-expanded_term_definition">expanded term definition</a> contains the <code>@container</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>,
+ its value <em class="rfc2119" title="must">must</em> be either <code>@list</code>, <code>@set</code>, <code>@language</code>, <code>@annotation</code>, or be <a class="tref internalDFN" title="null" href="#dfn-null">null</a>.
+ If the value is <code>@language</code>, when the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> is used outside of the <code>@context</code>, the
+ associated value <em class="rfc2119" title="must">must</em> be a <a class="tref internalDFN" title="language_map" href="#dfn-language_map">language map</a>. If the value is
+ <code>@annotation</code>, when the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> is used outside of
+ the <code>@context</code>, the associated value <em class="rfc2119" title="must">must</em> be an
+ <a class="tref internalDFN" title="annotation_map" href="#dfn-annotation_map">annotation map</a>.</p>
+
+<p><a class="tref internalDFN" title="term" href="#dfn-term">Terms</a> <em class="rfc2119" title="must not">must not</em> be used in a circular manner. That is, the definition of a term cannot depend on the definition of another term if that other term also depends on the first term.</p>
+
+<p>See <a href="#the-context" class="sec-ref"><span class="secno">5.1</span> <span class="sec-title">The Context</span></a> and <a href="#expanded-term-definition" class="sec-ref"><span class="secno">6.5</span> <span class="sec-title">Expanded Term Definition</span></a>
+ for further discussion on contexts.</p>
+</section>
+
+</section>
+
+<section class="appendix normative" id="relationship-to-rdf">
+
+<!--OddPage-->
+<h2><span class="secno">C. </span>Relationship to RDF</h2>
+
+ <p>The RDF data model, as outlined in [<cite><a class="bibref" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>], is an abstract syntax for
+ representing a directed graph of information. It is a subset of
+ <a class="tref internalDFN" title="json-ld_data_model" href="#dfn-json-ld_data_model">JSON-LD's data model</a> with a few
+ additional constraints. The differences between the two data models are:</p>
+
+ <ul>
+ <li>In JSON-LD <a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">graph names</a> can be
+ <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a> or <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank nodes</a>
+ whereas in RDF graph names have to be <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a>.</li>
+ <li>In JSON-LD <a class="tref internalDFN" title="property" href="#dfn-property">properties</a> can be
+ <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a> or <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank nodes</a>
+ whereas in RDF properties (predicates) have to be
+ <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a>.</li>
+ <li>In contrast to RDF graphs <a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">JSON-LD graphs</a>
+ support unconnected <a class="tref internalDFN" title="node" href="#dfn-node">nodes</a>, i.e., nodes which are not
+ connected to any other node.</li>
+ <li>In JSON-LD lists are part of the data model whereas in RDF they are part of
+ a vocabulary, namely [<cite><a class="bibref" href="#bib-RDF-SCHEMA">RDF-SCHEMA</a></cite>].</li>
+ <li>RDF values are either typed <em>literals</em>
+ (<a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">typed values</a>) or <em>language-tagged strings</em>
+ (<a class="tref internalDFN" title="language-tagged_string" href="#dfn-language-tagged_string">language-tagged strings</a>) whereas
+ JSON-LD also supports JSON's native data types, i.e., <a class="tref internalDFN" title="number" href="#dfn-number">number</a>,
+ <a class="tref internalDFN" title="string" href="#dfn-string">strings</a>, and the boolean values <a class="tref internalDFN" title="true" href="#dfn-true">true</a>
+ and <a class="tref internalDFN" title="false" href="#dfn-false">false</a>. The JSON-LD API [<cite><a class="bibref" href="#bib-JSON-LD-API">JSON-LD-API</a></cite>] specification defines
+ the conversion rules between JSON's native data types and RDF's counterparts to
+ allow full round-tripping.</li>
+
+ </ul>
+
+ <p>Summarized these differences mean that JSON-LD is capable of serializing any RDF
+ graph or dataset and most, but not all, JSON-LD documents can be transformed to RDF.
+ A complete description of the algorithms to convert from RDF to JSON-LD and from
+ JSON-LD to RDF is included in the JSON-LD API [<cite><a class="bibref" href="#bib-JSON-LD-API">JSON-LD-API</a></cite>] specification.</p>
+
+ <p>Even though JSON-LD serializes RDF datasets, it can also be used as a RDF graph source.
+ In that case, a consumer <em class="rfc2119" title="must">must</em> only use the default graph and ignore all named graphs.
+ This allows servers to expose data in, e.g., both Turtle and JSON-LD using content
+ negotiation.</p>
+
+ <div class="note"><div class="note-title"><span>Note</span></div><p class="">Publishers supporting both dataset and graph syntaxes have to ensure that
+ the primary data is stored in the default graph to enable consumers that do not support
+ datasets to process the information.</p></div>
+</section>
+
+<section class="appendix informative" id="relationship-to-other-linked-data-formats">
+
+<!--OddPage-->
+<h2><span class="secno">D. </span>Relationship to Other Linked Data Formats</h2><p><em>This section is non-normative.</em></p>
+
+<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
+ express semantic data marked up in other linked data formats such as Turtle,
+ RDFa, Microformats, and Microdata. These sections are merely provided as
+ evidence that JSON-LD is very flexible in what it can express across different
+ <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a> approaches.</p>
+
+<section id="turtle">
+ <h3><span class="secno">D.1 </span>Turtle</h3><p><em>This section is non-normative.</em></p>
+
+ <p>The following are examples of converting RDF expressed in [<cite><a class="bibref" href="#bib-TURTLE-TR">TURTLE-TR</a></cite>]
+ into JSON-LD.</p>
+
+<section id="prefix-definitions">
+<h4><span class="secno">D.1.1 </span>Prefix definitions</h4><p><em>This section is non-normative.</em></p>
+<p>The JSON-LD context has direct equivalents for the Turtle
+ <code>@prefix</code> declaration:</p>
+
+<div class="example"><div class="example-title"><span>Example 61</span>: A set of statements serialized in Turtle</div><pre class="example">@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+
+<http://manu.sporny.org/i/public> a foaf:Person;
+ foaf:name "Manu Sporny";
+ foaf:homepage <http://manu.sporny.org/> .</pre></div>
+
+<div class="example"><div class="example-title"><span>Example 62</span>: The same set of statements serialized in JSON-LD</div><pre class="example">{
+ "@context":
+ {
+ "foaf": "http://xmlns.com/foaf/0.1/"
+ },
+ "@id": "http://manu.sporny.org/i/public",
+ "@type": "foaf:Person",
+ "foaf:name": "Manu Sporny",
+ "foaf:homepage": { "@id": "http://manu.sporny.org/" }
+}</pre></div>
+
+<div class="note"><div class="note-title"><span>Note</span></div><p class="">JSON-LD has no equivalent for the Turtle <code>@base</code> declaration.</p></div>
+
+</section>
+
+<section id="embedding-1">
+<h4><span class="secno">D.1.2 </span>Embedding</h4>
+<p>Both Turtle and JSON-LD allow embedding, although Turtle only allows embedding of
+ <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank nodes</a>.</p>
+</section>
+
+<div class="example"><div class="example-title"><span>Example 63</span>: Embedding in Turtle</div><pre class="example">@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+
+<http://manu.sporny.org/i/public>
+ a foaf:Person;
+ foaf:name "Manu Sporny";
+ foaf:knows [ a foaf:Person; foaf:name "Gregg Kellogg" ] .</pre></div>
+
+<div class="example"><div class="example-title"><span>Example 64</span>: Same embedding example in JSON-LD</div><pre class="example">{
+ "@context":
+ {
+ "foaf": "http://xmlns.com/foaf/0.1/"
+ },
+ "@id": "http://manu.sporny.org/i/public",
+ "@type": "foaf:Person",
+ "foaf:name": "Manu Sporny",
+ "foaf:knows":
+ {
+ "@type": "foaf:Person",
+ "foaf:name": "Gregg Kellogg"
+ }
+}</pre></div>
+<section id="lists">
+<h4><span class="secno">D.1.3 </span>Lists</h4>
+<p>Both JSON-LD and Turtle can represent sequential lists of values.</p>
+
+<div class="example"><div class="example-title"><span>Example 65</span>: A list of values in Turtle</div><pre class="example">@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+
+<http://example.org/people#joebob> a foaf:Person;
+ foaf:name "Joe Bob";
+ foaf:nick ( "joe" "bob" "jaybee" ) .</pre></div>
+
+<div class="example"><div class="example-title"><span>Example 66</span>: Same example with a list of values in JSON-LD</div><pre class="example">{
+ "@context":
+ {
+ "foaf": "http://xmlns.com/foaf/0.1/"
+ },
+ "@id": "http://example.org/people#joebob",
+ "@type": "foaf:Person",
+ "foaf:name": "Joe Bob",
+ "foaf:nick":
+ {
+ "@list": [ "joe", "bob", "jaybee" ]
+ }
+}</pre></div>
+</section>
+
+</section>
+
+<section id="rdfa">
+<h3><span class="secno">D.2 </span>RDFa</h3>
+
+<p>The following example describes three people with their respective names and
+homepages.</p>
+
+<div class="example"><div class="example-title"><span>Example 67</span>: RDFa fragment that describes three people</div><pre class="example"><div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>>
+ <ul>
+ <li <span class="diff">typeof="foaf:Person"</span>>
+ <a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>>Bob</a>
+ </li>
+ <li <span class="diff">typeof="foaf:Person"</span>>
+ <a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>>Eve</a>
+ </li>
+ <li <span class="diff">typeof="foaf:Person"</span>>
+ <a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>>Manu</a>
+ </li>
+ </ul>
+</div></pre></div>
+
+<p>An example JSON-LD implementation using a single <a class="tref internalDFN" title="context" href="#dfn-context">context</a> is
+described below.</p>
+
+<div class="example"><div class="example-title"><span>Example 68</span>: Same description in JSON-LD (context shared among node objects)</div><pre class="example">{
+ "@context":
+ {
+ "foaf": "http://xmlns.com/foaf/0.1/"
+ },
+ "@graph":
+ [
+ {
+ "@type": "foaf:Person",
+ "foaf:homepage": "http://example.com/bob/",
+ "foaf:name": "Bob"
+ },
+ {
+ "@type": "foaf:Person",
+ "foaf:homepage": "http://example.com/eve/",
+ "foaf:name": "Eve"
+ },
+ {
+ "@type": "foaf:Person",
+ "foaf:homepage": "http://example.com/manu/",
+ "foaf:name": "Manu"
+ }
+ ]
+}</pre></div>
+
+</section>
+
+<section id="microformats">
+<h3><span class="secno">D.3 </span>Microformats</h3>
+
+<p>The following example uses a simple Microformats hCard example to express
+how the Microformat is represented in JSON-LD.</p>
+
+<div class="example"><div class="example-title"><span>Example 69</span>: HTML fragment with a simple Microformats hCard</div><pre class="example"><div class="vcard">
+ <a class="url fn" href="http://tantek.com/">Tantek Çelik</a>
+</div></pre></div>
+
+<p>The representation of the hCard expresses the Microformat terms in the
+<a class="tref internalDFN" title="context" href="#dfn-context">context</a> and uses them directly for the <code>url</code> and <code>fn</code>
+properties. Also note that the Microformat to JSON-LD processor has
+generated the proper URL type for <code>http://tantek.com/</code>.</p>
+
+<div class="example"><div class="example-title"><span>Example 70</span>: Same hCard representation in JSON-LD</div><pre class="example">{
+ "@context":
+ {
+ "vcard": "http://microformats.org/profile/hcard#vcard",
+ "url":
+ {
+ "@id": "http://microformats.org/profile/hcard#url",
+ "@type": "@id"
+ },
+ "fn": "http://microformats.org/profile/hcard#fn"
+ },
+ "@type": "vcard",
+ "url": "http://tantek.com/",
+ "fn": "Tantek Çelik"
+}</pre></div>
+
+</section>
+
+<section id="microdata">
+<h3><span class="secno">D.4 </span>Microdata</h3>
+
+<p>The microdata example below expresses book information as a microdata Work
+item.
+</p>
+
+<div class="example"><div class="example-title"><span>Example 71</span>: HTML fragments that describes a book using microdata</div><pre class="example"><dl itemscope
+ itemtype="http://purl.org/vocab/frbr/core#Work"
+ itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N">
+ <dt>Title</dt>
+ <dd><cite itemprop="http://purl.org/dc/terms/title">Just a Geek</cite></dd>
+ <dt>By</dt>
+ <dd><span itemprop="http://purl.org/dc/terms/creator">Wil Wheaton</span></dd>
+ <dt>Format</dt>
+ <dd itemprop="http://purl.org/vocab/frbr/core#realization"
+ itemscope
+ itemtype="http://purl.org/vocab/frbr/core#Expression"
+ itemid="http://purl.oreilly.com/products/9780596007683.BOOK">
+ <link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK">
+ Print
+ </dd>
+ <dd itemprop="http://purl.org/vocab/frbr/core#realization"
+ itemscope
+ itemtype="http://purl.org/vocab/frbr/core#Expression"
+ itemid="http://purl.oreilly.com/products/9780596802189.EBOOK">
+ <link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK">
+ Ebook
+ </dd>
+</dl></pre></div>
+
+<p>Note that the JSON-LD representation of the Microdata information stays
+true to the desires of the Microdata community to avoid contexts and
+instead refer to items by their full <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.</p>
+
+<div class="example"><div class="example-title"><span>Example 72</span>: Same book description in JSON-LD (avoiding contexts)</div><pre class="example">[
+ {
+ "@id": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
+ "@type": "http://purl.org/vocab/frbr/core#Work",
+ "http://purl.org/dc/terms/title": "Just a Geek",
+ "http://purl.org/dc/terms/creator": "Whil Wheaton",
+ "http://purl.org/vocab/frbr/core#realization":
+ [
+ "http://purl.oreilly.com/products/9780596007683.BOOK",
+ "http://purl.oreilly.com/products/9780596802189.EBOOK"
+ ]
+ },
+ {
+ "@id": "http://purl.oreilly.com/products/9780596007683.BOOK",
+ "@type": "http://purl.org/vocab/frbr/core#Expression",
+ "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
+ },
+ {
+ "@id": "http://purl.oreilly.com/products/9780596802189.EBOOK",
+ "@type": "http://purl.org/vocab/frbr/core#Expression",
+ "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
+ }
+]</pre></div>
+</section>
+</section>
+
+<section class="appendix informative" id="iana-considerations">
+
+<!--OddPage-->
+<h2><span class="secno">E. </span>IANA Considerations</h2><p><em>This section is non-normative.</em></p>
+
+<p>This section is included merely for standards community review and will be
+submitted to the Internet Engineering Steering Group if this specification
+becomes a <abbr title="World Wide Web Consortium">W3C</abbr> Recommendation.</p>
+
+<h2 id="application-ld-json">application/ld+json</h2>
+<dl>
+ <dt>Type name:</dt>
+ <dd>application</dd>
+ <dt>Subtype name:</dt>
+ <dd>ld+json</dd>
+ <dt>Required parameters:</dt>
+ <dd>None</dd>
+ <dt>Optional parameters:</dt>
+ <dd>
+ <dl>
+ <dt><code>form</code></dt>
+ <dd>Determines the serialization form for the JSON-LD document. The only
+ valid value at the moment is <code>expanded</code>. If no form is
+ specified in an HTTP request header to an HTTP server, the server <em class="rfc2119" title="may">may</em>
+ choose any form. If no form is specified in an HTTP response, the form
+ <em class="rfc2119" title="must not">must not</em> be assumed to take any particular form.</dd>
+ </dl>
+ <dl>
+ <dt><code>profile</code></dt>
+ <dd>A whitespace-separated list of IRIs identifying specific constraints
+ or conventions that apply to a JSON-LD document. A profile <em class="rfc2119" title="must not">must not</em> change
+ the semantics of the resource representation when processed without profile
+ knowledge, so that clients both with and without knowledge of a profiled
+ resource can safely use the same representation. The <code>profile</code>
+ parameter <em class="rfc2119" title="may">may</em> also be used by clients to express their preferences in the
+ content negotiation process. It is <em class="rfc2119" title="recommended">recommended</em> that profile IRIs are
+ dereferenceable and provide useful documentation at that <abbr title="Internationalized Resource Identifier">IRI</abbr>. This
+ specification, however, does not define any formats for such profile
+ descriptions.
+ </dd>
+ </dl>
+ </dd>
+ <dt>Encoding considerations:</dt>
+ <dd>The same as the <code>application/json</code> MIME media type.</dd>
+ <dt>Security considerations:</dt>
+ <dd>Since JSON-LD is intended to be a pure data exchange format for
+ directed graphs, the serialization <em class="rfc2119" title="should not">should not</em> be passed through a
+ code execution mechanism such as JavaScript's <code>eval()</code>
+ function. It is <em class="rfc2119" title="recommended">recommended</em> that a conforming parser does not attempt to
+ directly evaluate the JSON-LD serialization and instead purely parse the
+ input into a language-native data structure. </dd>
+ <dt>Interoperability considerations:</dt>
+ <dd>Not Applicable</dd>
+ <dt>Published specification:</dt>
+ <dd>The <a href="http://json-ld.org/spec/latest/">JSON-LD</a> specification.</dd>
+ <dt>Applications that use this media type:</dt>
+ <dd>Any programming environment that requires the exchange of
+ directed graphs. Implementations of JSON-LD have been created for
+ JavaScript, Python, Ruby, PHP and C++.
+ </dd>
+ <dt>Additional information:</dt>
+ <dd>
+ <dl>
+ <dt>Magic number(s):</dt>
+ <dd>Not Applicable</dd>
+ <dt>File extension(s):</dt>
+ <dd>.jsonld</dd>
+ <dt>Macintosh file type code(s):</dt>
+ <dd>TEXT</dd>
+ </dl>
+ </dd>
+ <dt>Person & email address to contact for further information:</dt>
+ <dd>Manu Sporny <msporny@digitalbazaar.com></dd>
+ <dt>Intended usage:</dt>
+ <dd>Common</dd>
+ <dt>Restrictions on usage:</dt>
+ <dd>None</dd>
+ <dt>Author(s):</dt>
+ <dd>Manu Sporny, Gregg Kellogg, Markus Lanthaler, Dave Longley</dd>
+ <dt>Change controller:</dt>
+ <dd><abbr title="World Wide Web Consortium">W3C</abbr></dd>
+</dl>
+
+<p>Fragment identifiers used with <a href="#application-ld-json">application/ld+json</a>
+ resources <em class="rfc2119" title="may">may</em> identify a node in a <a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">JSON-LD graph</a> expressed in
+ the resource. This idiom, which is also used in RDF [<cite><a class="bibref" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>], gives a
+ simple way to "mint" new, document-local IRIs to label nodes and therefore contributes
+ considerably to the expressive power of JSON-LD.</p>
+
+</section>
+
+<section class="appendix informative" id="acknowledgements">
+
+<!--OddPage-->
+<h2><span class="secno">F. </span>Acknowledgements</h2><p><em>This section is non-normative.</em></p>
+
+<p>A large amount of thanks goes out to the JSON-LD Community Group
+participants who worked through many of the technical issues on the mailing
+list and the weekly telecons - of special mention are Niklas Lindström,
+François Daoust, Lin Clark, and Zdenko 'Denny' Vrandečić.
+The editors would like to thank Mark Birbeck, who provided a great deal of
+the initial push behind the JSON-LD work via his work on RDFj.
+The work of Dave Lehn and Mike Johnson are appreciated for reviewing,
+and performing several implementations of the specification. Ian Davis is
+thanked for this work on RDF/JSON. Thanks also to Nathan Rixham,
+Bradley P. Allen,
+Kingsley Idehen, Glenn McDonald, Alexandre Passant, Danny Ayers, Ted
+Thibodeau Jr., Olivier Grisel, Josh Mandel, Eric Prud'hommeaux,
+David Wood, Guus Schreiber, Pat Hayes, Sandro Hawke, and Richard
+Cyganiak for their input on the specification.
+</p>
+</section>
+
+
+
+<section id="references" class="appendix" typeof="bibo:Chapter" resource="#references" rel="bibo:chapter">
+<!--OddPage-->
+<h2><span class="secno">G. </span>References</h2><section id="normative-references" typeof="bibo:Chapter" resource="#normative-references" rel="bibo:chapter"><h3><span class="secno">G.1 </span>Normative references</h3><dl class="bibliography" about=""><dt id="bib-BCP47">[BCP47]</dt><dd rel="dcterms:requires">A. Phillips; M. Davis. <a href="http://tools.ietf.org/html/bcp47"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/html/bcp47">http://tools.ietf.org/html/bcp47</a>
+</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd rel="dcterms:requires"><cite><a href="http://www.w3.org/TR/2011/WD-rdf11-concepts-20110830/">RDF 1.1 Concepts and Abstract Syntax</a></cite> Richard Cyganiak, David Wood, Editors. World Wide Web Consortium (work in progress). 30 May 2012. Editor's Draft. This edition of the JSON-LD Syntax specification is http://www.w3.org/TR/2011/WD-rdf11-concepts-20110830/. The <a href="http://www.w3.org/TR/rdf11-concepts/">latest edition of the JSON-LD Syntax</a> is available at http://www.w3.org/TR/rdf11-concepts/
+</dd><dt id="bib-RFC2119">[RFC2119]</dt><dd rel="dcterms:requires">S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key words for use in RFCs to Indicate Requirement Levels.</cite></a> March 1997. Internet RFC 2119. URL: <a href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
+</dd><dt id="bib-RFC3987">[RFC3987]</dt><dd rel="dcterms:requires">M. Dürst; M. Suignard. <a href="http://www.ietf.org/rfc/rfc3987.txt"><cite>Internationalized Resource Identifiers (IRIs).</cite></a> January 2005. Internet RFC 3987. URL: <a href="http://www.ietf.org/rfc/rfc3987.txt">http://www.ietf.org/rfc/rfc3987.txt</a>
+</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd rel="dcterms:requires">D. Crockford. <a href="http://www.ietf.org/rfc/rfc4627.txt"><cite>The application/json Media Type for JavaScript Object Notation (JSON)</cite></a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
+</dd><dt id="bib-RFC5988">[RFC5988]</dt><dd rel="dcterms:requires"><cite><a href="http://tools.ietf.org/rfc/rfc5988">Web Linking</a></cite> M. Nottingham. Editor. October 2010. IETF Standard. URL: <a href="http://tools.ietf.org/rfc/rfc5988.txt">http://tools.ietf.org/rfc/rfc5988.txt</a>
+</dd></dl></section><section id="informative-references" typeof="bibo:Chapter" resource="#informative-references" rel="bibo:chapter"><h3><span class="secno">G.2 </span>Informative references</h3><dl class="bibliography" about=""><dt id="bib-JSON-LD-API">[JSON-LD-API]</dt><dd rel="dcterms:references"><cite><a href="http://json-ld.org/spec/ED/json-ld-api/20120524/">The JSON-LD API 1.0</a></cite> Manu Sporny, Gregg Kellogg, Dave Longley, Markus Lanthaler, Editors. World Wide Web Consortium (work in progress). 24 May 2012. Editor's Draft. This edition of the JSON-LD Syntax specification is http://json-ld.org/spec/ED/json-ld-api/20120524/. The <a href="http://json-ld.org/spec/latest/json-ld-api/">latest edition of the JSON-LD Syntax</a> is available at http://json-ld.org/spec/latest/json-ld-api/
+</dd><dt id="bib-RDF-SCHEMA">[RDF-SCHEMA]</dt><dd rel="dcterms:references">Dan Brickley; Ramanathan V. Guha. <a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210"><cite>RDF Vocabulary Description Language 1.0: RDF Schema.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">http://www.w3.org/TR/2004/REC-rdf-schema-20040210</a>
+</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd rel="dcterms:references">Shane McCarron; et al. <a href="http://www.w3.org/TR/2012/REC-rdfa-core-20120607/"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a> 7 June 2012. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2012/REC-rdfa-core-20120607/">http://www.w3.org/TR/2012/REC-rdfa-core-20120607/</a>
+</dd><dt id="bib-TURTLE-TR">[TURTLE-TR]</dt><dd rel="dcterms:references">Eric Prud'hommeaux, Gavin Carothers. <cite><a href="http://www.w3.org/TR/2011/WD-turtle-20110809/">Turtle: Terse RDF Triple Language.</a></cite> 09 August 2011. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2011/WD-turtle-20110809/">http://www.w3.org/TR/2011/WD-turtle-20110809/</a>
+</dd></dl></section></section></body></html>
--- a/spec/latest/json-ld-api/index.html Sat Dec 22 17:31:52 2012 -0500
+++ b/spec/latest/json-ld-api/index.html Sun Dec 23 13:52:00 2012 -0500
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
-<title>JSON-LD API 1.0</title>
+<title>JSON-LD Algorithms 1.0</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<!--
=== NOTA BENE ===
@@ -20,18 +20,18 @@
// specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED.
specStatus: "ED",
// if you wish the publication date to be other than today, set this
- //publishDate: "2012-08-30",
+ publishDate: "2012-12-25",
copyrightStart: "2010",
// the specification's short name, as in http://www.w3.org/TR/short-name/
shortName: "json-ld-api",
- subtitle: "An Application Programming Interface for the JSON-LD Syntax",
+ subtitle: "Algorithms for Processing JSON-LD Documents",
// if there is a previously published draft, uncomment this and set its YYYY-MM-DD date
// and its maturity status
- previousPublishDate: "2012-07-12",
- previousMaturity: "FPWD",
- previousDiffURI: "http://www.w3.org/TR/2012/WD-json-ld-api-20120712/",
+ previousPublishDate: "2012-09-30",
+ previousMaturity: "ED",
+ previousDiffURI: "http://dvcs.w3.org/hg/json-ld/raw-file/66d980964784/spec/ED/json-ld-api/20120930/index.html",
diffTool: "http://www.aptest.com/standards/htmldiff/htmldiff.pl",
// if there a publicly available Editor's Draft, this is the link
@@ -88,8 +88,8 @@
// Team Contact.
wgPatentURI: "http://www.w3.org/2004/01/pp-impl/46168/status",
maxTocLevel: 3,
- preProcess: [ preProc ]
- //alternateFormats: [ {uri: "diff-20120712.html", label: "diff to previous version"} ],
+ preProcess: [ preProc ],
+ alternateFormats: [ {uri: "diff-20120930.html", label: "diff to previous version"} ],
};
//]]>
</script>
@@ -2469,7 +2469,7 @@
<p>A large amount of thanks goes out to the JSON-LD Community Group
participants who worked through many of the technical issues on the mailing
list and the weekly telecons - of special mention are Niklas Lindström,
- François Daoust, and Zdenko 'Denny' Vrandečić.
+ François Daoust, Lin Clark, and Zdenko 'Denny' Vrandečić.
The editors would like to thank Mark Birbeck, who provided a great deal of
the initial push behind the JSON-LD work via his work on RDFj.
The work of Dave Lehn and Mike Johnson are appreciated for reviewing,
--- a/spec/latest/json-ld-syntax/index.html Sat Dec 22 17:31:52 2012 -0500
+++ b/spec/latest/json-ld-syntax/index.html Sun Dec 23 13:52:00 2012 -0500
@@ -20,18 +20,18 @@
// specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED.
specStatus: "ED",
// if you wish the publication date to be other than today, set this
- //publishDate: "2012-08-30",
+ publishDate: "2012-12-25",
copyrightStart: "2010",
// the specification's short name, as in http://www.w3.org/TR/short-name/
shortName: "json-ld-syntax",
- subtitle: "A Context-based JSON Serialization for Linking Data",
+ subtitle: "A JSON Serialization for Linking Data",
// if there is a previously published draft, uncomment this and set its YYYY-MM-DD date
// and its maturity status
- previousPublishDate: "2012-08-30",
- previousMaturity: "FPWD",
- previousDiffURI: "http://www.w3.org/TR/2012/WD-json-ld-syntax-20120830/",
+ previousPublishDate: "2012-09-30",
+ previousMaturity: "ED",
+ previousDiffURI: "http://dvcs.w3.org/hg/json-ld/raw-file/66d980964784/spec/ED/json-ld-syntax/20120930/index.html",
diffTool: "http://www.aptest.com/standards/htmldiff/htmldiff.pl",
// if there a publicly available Editor's Draft, this is the link
@@ -89,8 +89,8 @@
// Team Contact.
wgPatentURI: "http://www.w3.org/2004/01/pp-impl/46168/status",
maxTocLevel: 4,
- preProcess: [ preProc ]
- //alternateFormats: [ {uri: "diff-20120712.html", label: "diff to previous version"} ]
+ preProcess: [ preProc ],
+ alternateFormats: [ {uri: "diff-20120930.html", label: "diff to previous version"} ]
};
//]]>
</script>
@@ -2719,8 +2719,8 @@
</ul>
<p class="issue">In contrast to the RDF data model as defined in [[RDF-CONCEPTS]], JSON-LD allows
- blank nodes as property labels and graph names to enable a number of use cases. This feature is
- discussed controversially in the RDF WG and may be removed in the future.</p>
+ blank nodes as property labels and graph names. This feature is
+ controversial in the RDF WG and may be removed in the future.</p>
<p><tref title="JSON-LD document">JSON-LD documents</tref> MAY contain data that cannot be
represented by the <tref title="JSON-LD data model">data model</tref> defined above.
@@ -3229,7 +3229,7 @@
homepages.</p>
<pre class="example" data-transform="updateExample"
- title="RDFa fragment that describes three persons">
+ title="RDFa fragment that describes three people">
<!--
<div ****prefix="foaf: http://xmlns.com/foaf/0.1/"****>
<ul>
@@ -3491,7 +3491,7 @@
<p>A large amount of thanks goes out to the JSON-LD Community Group
participants who worked through many of the technical issues on the mailing
list and the weekly telecons - of special mention are Niklas Lindström,
-François Daoust, and Zdenko 'Denny' Vrandečić.
+François Daoust, Lin Clark, and Zdenko 'Denny' Vrandečić.
The editors would like to thank Mark Birbeck, who provided a great deal of
the initial push behind the JSON-LD work via his work on RDFj.
The work of Dave Lehn and Mike Johnson are appreciated for reviewing,