Create time-stamped Editors Draft for JSON-LD syntax and API specification
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Thu, 26 Apr 2012 13:04:54 +0200
changeset 573 93d29fc1767e
parent 572 8a424c6fc8f0
child 574 b7ba2fac5b4e
Create time-stamped Editors Draft for JSON-LD syntax and API specification

Need this for the final version of my JSON-LD paper which is available at http://www.markus-lanthaler.com/research/on-using-json-ld-to-create-evolvable-restful-services.pdf
spec/ED/json-ld-api/20120426/diff-20120112.html
spec/ED/json-ld-api/20120426/index.html
spec/ED/json-ld-syntax/20120426/diff-20120318.html
spec/ED/json-ld-syntax/20120426/index.html
spec/latest/json-ld-api/index.html
spec/latest/json-ld-syntax/index.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-api/20120426/diff-20120112.html	Thu Apr 26 13:04:54 2012 +0200
@@ -0,0 +1,23616 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>The JSON-LD API 1.0</title>
+<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
+
+<!--
+  === 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>
+.diff { font-weight:bold; color:#0a3; }
+ol.algorithm.update { margin-left: 2em; }
+ol.algorithm.update>li { list-style-type: none; }
+ol.algorithm.update>li>span.list-number {
+  display:block;
+  float: left;
+  margin-left: -3.5em;
+}
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- 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;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- 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 {
+    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 {
+    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%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- 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;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+    }
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">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, ".") ") "; }
+
+<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>
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
+
+<body style="display: inherit;"><div class="head"><p></p><h1 id="title" class="title">The JSON-LD API 1.0</h1><h2 id="subtitle">An Application Programming Interface for the JSON-LD Syntax</h2><h2 id="unofficial-draft-26-april-2012">Unofficial Draft 26 April 2012</h2><dl><dt>Editors:</dt><dd><a href="http://manu.sporny.org/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dd>
+<a href="http://greggkellogg.net/">
+Gregg
+Kellogg
+</a>,
+<a href="http://kellogg-assoc.com/">
+Kellogg
+Associates
+</a>
+</dd>
+<dd>
+<a href="http://digitalbazaar.com/">
+Dave
+Longley
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</dd>
+<dd>
+<a href="http://www.markus-lanthaler.com/">
+<ins class="diff-new">Markus
+Lanthaler
+</ins></a>,<a href="http://www.tugraz.at/"><ins class="diff-new">
+Graz
+University
+of
+Technology
+</ins></a></dd>
+<dt>
+Authors:
+</dt>
+<dd>
+<a href="http://digitalbazaar.com/">
+Dave
+Longley
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</dd>
+<dd>
+<a href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</dd>
+<dd>
+<a href="http://greggkellogg.net/">
+Gregg
+Kellogg
+</a>,
+<a href="http://kellogg-assoc.com/">
+Kellogg
+Associates
+</a>
+</dd>
+<dd>
+<a href="http://www.markus-lanthaler.com/">
+<ins class="diff-new">Markus
+Lanthaler
+</ins></a>,<a href="http://www.tugraz.at/"><ins class="diff-new">
+Graz
+University
+of
+Technology
+</ins></a></dd>
+</dl>
+<p>
+This
+document
+is
+also
+available
+in
+this
+non-normative
+format:
+<a href="diff-20120112.html">
+diff
+to
+previous
+version
+</a>.
+</p>
+<p class="copyright">
+This
+document
+is
+licensed
+under
+a
+<a rel="license" href="http://creativecommons.org/licenses/by/3.0/" class="subfoot">
+Creative
+Commons
+Attribution
+3.0
+License
+</a>.
+</p>
+<hr />
+</div>
+<div id="abstract" class="introductory section">
+<h2>
+Abstract
+</h2>
+<p>
+JSON
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+]
+has
+proven
+to
+be
+a
+highly
+useful
+object
+serialization
+and
+messaging
+format.
+JSON-LD
+[
+<cite>
+<a class="bibref" rel="biblioentry" 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.
+</p>
+</div>
+<div class="introductory section" id="sotd">
+<h2>
+Status
+of
+This
+Document
+</h2>
+<p>
+This
+document
+is
+merely
+a
+public
+working
+draft
+of
+a
+potential
+specification.
+It
+has
+no
+official
+standing
+of
+any
+kind
+and
+does
+not
+represent
+the
+support
+or
+consensus
+of
+any
+standards
+organisation.
+</p>
+<p>
+This
+document
+is
+an
+experimental
+work
+in
+progress.
+</p>
+</div>
+<div id="toc" class="section">
+<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>
+<li class="tocline">
+<a href="#linked-data" class="tocxref">
+<span class="secno">
+1.2
+</span>
+Linked
+Data
+</a>
+</li>
+<li class="tocline">
+<a href="#contributing" class="tocxref">
+<span class="secno">
+1.3
+</span>
+Contributing
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#the-application-programming-interface" class="tocxref">
+<span class="secno">
+2.
+</span>
+The
+Application
+Programming
+Interface
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#jsonldprocessor" class="tocxref">
+<span class="secno">
+2.1
+</span>
+JsonLdProcessor
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#methods" class="tocxref">
+<span class="secno">
+2.1.1
+</span>
+Methods
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#callbacks" class="tocxref">
+<span class="secno">
+2.2
+</span>
+<del class="diff-old">JsonLdTripleCallback
+</del>
+<ins class="diff-chg">Callbacks
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#jsonldcallback" class="tocxref">
+<span class="secno">
+2.2.1
+</span>
+<ins class="diff-new">JsonLdCallback
+</ins></a><ul class="toc"><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno"><ins class="diff-new">
+2.2.1.1
+</ins></span><ins class="diff-new">
+Methods
+</ins></a></li></ul></li><li class="tocline"><a href="#statementcallback" class="tocxref"><span class="secno"><ins class="diff-new">
+2.2.2
+</ins></span><ins class="diff-new">
+StatementCallback
+</ins></a><ul class="toc"><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno"><ins class="diff-new">
+2.2.2.1
+</ins></span>
+Methods
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#data-structures" class="tocxref">
+<span class="secno">
+<ins class="diff-new">2.3
+</ins></span><ins class="diff-new">
+Data
+Structures
+</ins></a><ul class="toc"><li class="tocline"><a href="#url" class="tocxref"><span class="secno"><ins class="diff-new">
+2.3.1
+</ins></span><ins class="diff-new">
+URL
+</ins></a></li><li class="tocline"><a href="#jsonldoptions" class="tocxref"><span class="secno"><ins class="diff-new">
+2.3.2
+</ins></span><ins class="diff-new">
+JsonLdOptions
+</ins></a></li><li class="tocline"><a href="#statement" class="tocxref"><span class="secno"><ins class="diff-new">
+2.3.3
+</ins></span><ins class="diff-new">
+Statement
+</ins></a><ul class="toc"><li class="tocline"><a href="#attributes" class="tocxref"><span class="secno"><ins class="diff-new">
+2.3.3.1
+</ins></span><ins class="diff-new">
+Attributes
+</ins></a></li></ul></li><li class="tocline"><a href="#node" class="tocxref"><span class="secno"><ins class="diff-new">
+2.3.4
+</ins></span><ins class="diff-new">
+Node
+</ins></a><ul class="toc"><li class="tocline"><a href="#attributes-1" class="tocxref"><span class="secno"><ins class="diff-new">
+2.3.4.1
+</ins></span><ins class="diff-new">
+Attributes
+</ins></a></li></ul></li><li class="tocline"><a href="#namednode" class="tocxref"><span class="secno"><ins class="diff-new">
+2.3.5
+</ins></span><ins class="diff-new">
+NamedNode
+</ins></a><ul class="toc"><li class="tocline"><a href="#attributes-2" class="tocxref"><span class="secno"><ins class="diff-new">
+2.3.5.1
+</ins></span><ins class="diff-new">
+Attributes
+</ins></a></li></ul></li><li class="tocline"><a href="#blank-node" class="tocxref"><span class="secno"><ins class="diff-new">
+2.3.6
+</ins></span><ins class="diff-new">
+Blank
+Node
+</ins></a><ul class="toc"><li class="tocline"><a href="#attributes-3" class="tocxref"><span class="secno"><ins class="diff-new">
+2.3.6.1
+</ins></span><ins class="diff-new">
+Attributes
+</ins></a></li></ul></li><li class="tocline"><a href="#literalnode" class="tocxref"><span class="secno"><ins class="diff-new">
+2.3.7
+</ins></span><ins class="diff-new">
+LiteralNode
+</ins></a><ul class="toc"><li class="tocline"><a href="#attributes-4" class="tocxref"><span class="secno"><ins class="diff-new">
+2.3.7.1
+</ins></span><ins class="diff-new">
+Attributes
+</ins></a></li></ul></li></ul></li></ul></li><li class="tocline">
+<a href="#algorithms" class="tocxref">
+<span class="secno">
+3.
+</span>
+Algorithms
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#syntax-tokens-and-keywords" class="tocxref">
+<span class="secno">
+3.1
+</span>
+Syntax
+Tokens
+and
+Keywords
+</a>
+</li>
+<li class="tocline">
+<a href="#algorithm-terms" class="tocxref">
+<span class="secno">
+3.2
+</span>
+Algorithm
+Terms
+</a>
+</li>
+<li class="tocline">
+<a href="#context-processing" class="tocxref">
+<span class="secno">
+3.3
+</span>
+Context
+<ins class="diff-new">Processing
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#iri-expansion" class="tocxref">
+<span class="secno">
+3.4
+</span>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+</a>
+</li>
+<li class="tocline">
+<a href="#iri-compaction" class="tocxref">
+<span class="secno">
+3.5
+</span>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Compaction
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#iri-compaction-algorithm" class="tocxref">
+<span class="secno">
+<ins class="diff-new">3.5.1
+</ins></span><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+Compaction
+Algorithm
+</ins></a></li><li class="tocline"><a href="#term-rank-algorithm" class="tocxref"><span class="secno"><ins class="diff-new">
+3.5.2
+</ins></span><ins class="diff-new">
+Term
+Rank
+Algorithm
+</ins></a></li></ul>
+</li>
+<li class="tocline">
+<a href="#value-expansion" class="tocxref">
+<span class="secno">
+3.6
+</span>
+Value
+Expansion
+</a>
+</li>
+<li class="tocline">
+<a href="#value-compaction" class="tocxref">
+<span class="secno">
+3.7
+</span>
+Value
+Compaction
+</a>
+</li>
+<li class="tocline">
+<a href="#generate-blank-node-identifier" class="tocxref">
+<span class="secno">
+3.8
+</span>
+<ins class="diff-new">Generate
+Blank
+Node
+Identifier
+</ins></a></li><li class="tocline"><a href="#expansion" class="tocxref"><span class="secno"><ins class="diff-new">
+3.9
+</ins></span>
+Expansion
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#expansion-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.8.1
+</del>
+<ins class="diff-chg">3.9.1
+</ins>
+</span>
+Expansion
+Algorithm
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#compaction" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.9
+</del>
+<ins class="diff-chg">3.10
+</ins>
+</span>
+Compaction
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#compaction-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.9.1
+</del>
+<ins class="diff-chg">3.10.1
+</ins>
+</span>
+Compaction
+Algorithm
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#framing" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.10
+</del>
+<ins class="diff-chg">3.11
+</ins>
+</span>
+Framing
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#framing-algorithm-terms" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.10.1
+</del>
+<ins class="diff-chg">3.11.1
+</ins>
+</span>
+Framing
+Algorithm
+Terms
+</a>
+</li>
+<li class="tocline">
+<a href="#framing-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.10.2
+</del>
+<ins class="diff-chg">3.11.2
+</ins>
+</span>
+Framing
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#subject-flattening" class="tocxref">
+<span class="secno">
+<ins class="diff-chg">3.11.3
+</ins></span><ins class="diff-chg">
+Subject
+Flattening
+</ins></a>
+</li>
+<li class="tocline">
+<a href="#remove-embed" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.11
+</del>
+<ins class="diff-chg">3.11.4
+</ins>
+</span>
+<del class="diff-old">Normalization
+</del>
+<ins class="diff-chg">Remove
+Embedded
+Definition
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#embed-values" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.11.1
+</del>
+<ins class="diff-chg">3.11.5
+</ins>
+</span>
+<del class="diff-old">Normalization
+Algorithm
+</del>
+<ins class="diff-chg">Embed
+Values
+</ins>
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#data-round-tripping" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.12
+</del>
+<ins class="diff-chg">4.
+</ins>
+</span>
+Data
+Round
+Tripping
+</a>
+</li>
+<li class="tocline">
+<a href="#rdf-conversion" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.13
+</del>
+<ins class="diff-chg">5.
+</ins>
+</span>
+RDF
+Conversion
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#overview" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.13.1
+</del>
+<ins class="diff-chg">5.1
+</ins>
+</span>
+Overview
+</a>
+</li>
+<li class="tocline">
+<a href="#rdf-conversion-algorithm-terms" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.13.2
+</del>
+<ins class="diff-chg">5.2
+</ins>
+</span>
+RDF
+Conversion
+Algorithm
+Terms
+</a>
+</li>
+<li class="tocline">
+<a href="#convert-to-rdf-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.13.3
+</del>
+<ins class="diff-chg">5.3
+</ins>
+</span>
+<ins class="diff-new">Convert
+to
+</ins>
+RDF
+<del class="diff-old">Conversion
+</del>
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#list-conversion" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.13.4
+</del>
+<ins class="diff-chg">5.4
+</ins>
+</span>
+List
+Conversion
+</a>
+</li>
+<li class="tocline">
+<a href="#convert-from-rdf-algorithm" class="tocxref">
+<span class="secno">
+<ins class="diff-chg">5.5
+</ins></span><ins class="diff-chg">
+Convert
+from
+RDF
+Algorithm
+</ins></a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#iana-considerations" class="tocxref">
+<span class="secno">
+A.
+</span>
+<del class="diff-old">Acknowledgements
+</del>
+<ins class="diff-chg">IANA
+Considerations
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#appendix-b" class="tocxref">
+<span class="secno">
+B.
+</span>
+Initial
+Context
+</a>
+</li>
+<li class="tocline">
+<a href="#acknowledgements" class="tocxref">
+<span class="secno">
+C.
+</span>
+<ins class="diff-new">Acknowledgements
+</ins></a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno"><ins class="diff-new">
+D.
+</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">D.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">D.2
+</ins>
+</span>
+Informative
+references
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<div id="introduction" class="section">
+<h2>
+<span class="secno">
+1.
+</span>
+Introduction
+</h2>
+<p>
+JSON,
+as
+specified
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+],
+is
+a
+simple
+language
+for
+representing
+data
+on
+the
+Web.
+Linked
+Data
+is
+a
+technique
+for
+creating
+a
+graph
+of
+interlinked
+data
+across
+different
+documents
+or
+Web
+sites.
+Data
+entities
+are
+described
+using
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+s,
+which
+are
+typically
+dereferencable
+and
+thus
+may
+be
+used
+to
+find
+more
+information
+about
+an
+entity,
+creating
+a
+&quot;Web
+of
+Knowledge&quot;.
+JSON-LD
+is
+intended
+to
+be
+a
+simple
+publishing
+method
+for
+expressing
+not
+only
+Linked
+Data
+in
+JSON,
+but
+also
+for
+adding
+semantics
+to
+existing
+JSON.
+</p>
+<p>
+JSON-LD
+is
+designed
+as
+a
+light-weight
+syntax
+that
+can
+be
+used
+to
+express
+Linked
+Data.
+It
+is
+primarily
+intended
+to
+be
+a
+way
+to
+use
+Linked
+Data
+in
+Javascript
+and
+other
+Web-based
+programming
+environments.
+It
+is
+also
+useful
+when
+building
+interoperable
+Web
+services
+and
+when
+storing
+Linked
+Data
+in
+JSON-based
+document
+storage
+engines.
+It
+is
+practical
+and
+designed
+to
+be
+as
+simple
+as
+possible,
+utilizing
+the
+large
+number
+of
+JSON
+parsers
+and
+libraries
+available
+today.
+It
+is
+designed
+to
+be
+able
+to
+express
+key-value
+pairs,
+RDF
+data,
+RDFa
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
+RDFA-CORE
+</a>
+</cite>
+]
+data,
+Microformats
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">
+MICROFORMATS
+</a>
+</cite>
+]
+data,
+and
+Microdata
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">
+MICRODATA
+</a>
+</cite>
+].
+That
+is,
+it
+supports
+every
+major
+Web-based
+structured
+data
+model
+in
+use
+today.
+</p>
+<p>
+The
+syntax
+does
+not
+necessarily
+require
+applications
+to
+change
+their
+JSON,
+but
+allows
+to
+easily
+add
+meaning
+by
+adding
+context
+in
+a
+way
+that
+is
+either
+in-band
+or
+out-of-band.
+The
+syntax
+is
+designed
+to
+not
+disturb
+already
+deployed
+systems
+running
+on
+JSON,
+but
+provide
+a
+smooth
+upgrade
+path
+from
+JSON
+to
+JSON
+with
+added
+semantics.
+Finally,
+the
+format
+is
+intended
+to
+be
+easy
+to
+parse,
+efficient
+to
+generate,
+convertible
+to
+RDF
+in
+one
+pass,
+and
+require
+a
+very
+small
+memory
+footprint
+in
+order
+to
+operate.
+</p>
+<div id="how-to-read-this-document" class="section">
+<h3>
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</h3>
+<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>
+Authors
+that
+want
+a
+very
+detailed
+view
+of
+how
+JSON-LD
+processors
+operate.
+</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" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+].
+You
+must
+also
+understand
+the
+JSON-LD
+Syntax
+[
+<cite>
+<a class="bibref" rel="biblioentry" 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" rel="biblioentry" href="#bib-ECMA-262">
+ECMA-262
+</a>
+</cite>
+]
+and
+WebIDL
+[
+<cite>
+<a class="bibref" rel="biblioentry" 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" rel="biblioentry" href="#bib-RDF-CONCEPTS">
+RDF-CONCEPTS
+</a>
+</cite>
+].
+</p>
+<p>
+Examples
+may
+contain
+references
+to
+existing
+vocabularies
+and
+use
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>
+es
+to
+refer
+to
+<del class="diff-old">Web
+Vocabularies.
+</del>
+<ins class="diff-chg">vocabularies.
+</ins>
+The
+following
+is
+a
+list
+of
+all
+vocabularies
+and
+their
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>
+abbreviations,
+as
+used
+in
+this
+document:
+</p>
+<ul>
+<li>
+The
+<a href="http://purl.org/dc/terms/">
+Dublin
+Core
+</a>
+vocabulary
+(abbreviation:
+<code>
+dc
+</code>,
+e.g.,
+<code>
+dc:title
+</code>
+)
+</li>
+<li>
+The
+<a href="http://xmlns.com/foaf/0.1/">
+Friend
+of
+a
+Friend
+</a>
+vocabulary
+(abbreviation:
+<code>
+foaf
+</code>,
+e.g.,
+<code>
+foaf:knows
+</code>
+)
+</li>
+<li>
+The
+<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+RDF
+</a>
+vocabulary
+(abbreviation:
+<code>
+rdf
+</code>,
+e.g.,
+<code>
+rdf:type
+</code>
+)
+</li>
+<li>
+The
+<a href="http://www.w3.org/2001/XMLSchema#">
+XSD
+</a>
+vocabulary
+(abbreviation:
+<code>
+xsd
+</code>,
+e.g.,
+<code>
+xsd:integer
+</code>
+)
+</li>
+</ul>
+<p>
+JSON
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+]
+defines
+several
+terms
+which
+are
+used
+throughout
+this
+document:
+</p>
+<dl>
+<dt>
+<dfn title="json_object" id="dfn-json_object">
+JSON
+<del class="diff-old">Object
+</del>
+<ins class="diff-chg">object
+</ins>
+</dfn>
+</dt>
+<dd>
+An
+object
+structure
+is
+represented
+as
+a
+pair
+of
+curly
+brackets
+surrounding
+zero
+or
+more
+name/value
+pairs
+(or
+members).
+A
+name
+is
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>.
+A
+single
+colon
+comes
+after
+each
+name,
+separating
+the
+name
+from
+the
+value.
+A
+single
+comma
+separates
+a
+value
+from
+a
+following
+name.
+The
+names
+within
+an
+object
+<em class="rfc2119" title="should">
+should
+</em>
+be
+unique.
+</dd>
+<dt>
+<dfn title="array" id="dfn-array">
+array
+</dfn>
+</dt>
+<dd>
+An
+array
+is
+an
+ordered
+collection
+of
+values.
+An
+array
+structure
+is
+represented
+as
+square
+brackets
+surrounding
+zero
+or
+more
+values
+(or
+elements).
+Elements
+are
+separated
+by
+commas.
+Within
+JSON-LD,
+array
+order
+is
+not
+preserved
+by
+default,
+unless
+specific
+markup
+is
+<del class="diff-old">provided
+(see
+Lists
+).
+</del>
+<ins class="diff-chg">provided.
+</ins>
+This
+is
+because
+the
+basic
+data
+model
+of
+JSON-LD
+is
+a
+<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
+linked
+data
+graph
+</a>,
+which
+is
+inherently
+unordered.
+</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.
+A
+character
+is
+represented
+as
+a
+single
+character
+string.
+</dd>
+<dt>
+<dfn title="number" id="dfn-number">
+number
+</dfn>
+</dt>
+<dd>
+A
+number
+is
+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>
+Boolean
+values.
+</dd>
+<dt>
+<dfn title="null" id="dfn-null">
+null
+</dfn>
+</dt>
+<dd>
+The
+use
+of
+the
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>
+value
+<del class="diff-old">is
+undefined
+</del>
+within
+<del class="diff-old">JSON-LD.
+Supporting
+null
+in
+</del>
+JSON-LD
+<del class="diff-old">might
+have
+</del>
+<ins class="diff-chg">is
+used
+to
+ignore
+or
+reset
+values.
+</ins></dd><dt><dfn title="subject_definition" id="dfn-subject_definition"><ins class="diff-chg">
+subject
+definition
+</ins></dfn></dt><dd><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">
+used
+to
+represent
+</ins>
+a
+<del class="diff-old">number
+of
+advantages
+</del>
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+<ins class="diff-chg">subject
+</ins></a>
+and
+<del class="diff-old">should
+be
+evaluated.
+This
+</del>
+<ins class="diff-chg">one
+or
+more
+properties
+of
+that
+subject.
+A
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>
+is
+<del class="diff-old">currently
+an
+open
+issue
+.
+</del>
+<ins class="diff-chg">a
+subject
+definition
+if
+it
+does
+not
+contain
+they
+keys
+</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">
+and
+it
+has
+one
+or
+more
+keys
+other
+than
+</ins><code><ins class="diff-chg">
+@id
+</ins></code>.</dd><dt><dfn title="subject_reference" id="dfn-subject_reference"><ins class="diff-chg">
+subject
+reference
+</ins></dfn></dt><dd><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">
+used
+to
+reference
+a
+subject
+having
+only
+the
+</ins><code><ins class="diff-chg">
+@id
+</ins></code><ins class="diff-chg">
+key.
+</ins>
+</dd>
+</dl>
+<p>
+</p>
+</div>
+<div id="linked-data" class="section">
+<h3>
+<span class="secno">
+1.2
+</span>
+Linked
+Data
+</h3>
+<p>
+The
+following
+definition
+for
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>
+is
+the
+one
+that
+will
+be
+used
+for
+this
+specification.
+</p>
+<ol>
+<li>
+<dfn title="linked_data" id="dfn-linked_data">
+Linked
+Data
+</dfn>
+is
+a
+set
+of
+documents,
+each
+containing
+a
+representation
+of
+a
+linked
+data
+graph.
+</li>
+<li>
+A
+<dfn title="linked_data_graph" id="dfn-linked_data_graph">
+linked
+data
+graph
+</dfn>
+is
+an
+unordered
+labeled
+directed
+graph,
+where
+nodes
+are
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>
+s
+or
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+s,
+and
+edges
+are
+properties.
+</li>
+<li>
+A
+<dfn title="subject" id="dfn-subject">
+subject
+</dfn>
+is
+any
+node
+in
+a
+<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
+linked
+data
+graph
+</a>
+with
+at
+least
+one
+outgoing
+edge.
+</li>
+<li>
+A
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</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>
+(an
+Internationalized
+Resource
+Identifier
+as
+described
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC3987">
+RFC3987
+</a>
+</cite>
+]).
+</li>
+<li>
+An
+<dfn title="object" id="dfn-object">
+object
+</dfn>
+is
+a
+node
+in
+a
+<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
+linked
+data
+graph
+</a>
+with
+at
+least
+one
+incoming
+edge.
+</li>
+<li>
+An
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+<em class="rfc2119" title="may">
+may
+</em>
+be
+labeled
+with
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+</li>
+<li>
+An
+object
+<em class="rfc2119" title="may">
+may
+</em>
+be
+a
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>
+and
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+at
+the
+same
+time.
+</li>
+<li>
+A
+<dfn title="property" id="dfn-property">
+property
+</dfn>
+is
+an
+edge
+of
+the
+<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
+linked
+data
+graph
+</a>.
+</li>
+<li>
+A
+<a class="tref internalDFN" title="property" href="#dfn-property">
+property
+</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>
+An
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+that
+is
+a
+label
+in
+a
+<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
+linked
+data
+graph
+</a>
+<em class="rfc2119" title="should">
+should
+</em>
+be
+dereferencable
+to
+a
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>
+document
+describing
+the
+labeled
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>,
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+or
+<a class="tref internalDFN" title="property" href="#dfn-property">
+property
+</a>.
+</li>
+<li>
+A
+<dfn title="literal" id="dfn-literal">
+literal
+</dfn>
+is
+an
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+with
+a
+label
+that
+is
+not
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+</li>
+</ol>
+<p>
+Note
+that
+the
+definition
+for
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>
+above
+is
+silent
+on
+the
+topic
+of
+unlabeled
+nodes.
+Unlabeled
+nodes
+are
+not
+considered
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>.
+However,
+this
+specification
+allows
+for
+the
+expression
+of
+unlabled
+nodes,
+as
+most
+graph-based
+data
+sets
+on
+the
+Web
+contain
+a
+number
+of
+associated
+nodes
+that
+are
+not
+named
+and
+thus
+are
+not
+directly
+de-referenceable.
+</p>
+</div>
+<div id="contributing" class="section">
+<h3>
+<span class="secno">
+1.3
+</span>
+Contributing
+</h3>
+<p>
+There
+are
+a
+number
+of
+ways
+that
+one
+may
+participate
+in
+the
+development
+of
+this
+specification:
+</p>
+<ul>
+<li>
+Technical
+discussion
+typically
+occurs
+on
+the
+public
+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
+teleconferences
+</a>
+are
+held
+on
+Tuesdays
+at
+1500UTC
+on
+the
+second
+and
+fourth
+week
+of
+each
+month.
+</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>.
+</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>
+</div>
+</div>
+<div id="the-application-programming-interface" class="section">
+<h2>
+<span class="secno">
+2.
+</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>
+<div id="jsonldprocessor" class="section">
+<h3>
+<span class="secno">
+2.1
+</span>
+JsonLdProcessor
+</h3>
+<del class="diff-old">    ]
+</del>
+    <pre class="idl"><span id="idl-def-JsonLdProcessor" class="idlInterface">[<span class="extAttr">NoInterfaceObject</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-or-object---or-URL-input-JsonLdCallback-callback-JsonLdOptions-options">expand</a></span> (<span class="idlParam"><span class="idlParamType"><a>object or object[] or URL</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-or-object---or-URL-input-object-or-URL-context-JsonLdCallback-callback-JsonLdOptions-options">compact</a></span> (<span class="idlParam"><span class="idlParamType"><a>object or object[] or URL</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType"><a>object or URL</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-frame-void-object-or-object---or-URL-input-object-or-URL-frame-JsonLdCallback-callback-JsonLdOptions-options">frame</a></span> (<span class="idlParam"><span class="idlParamType"><a>object or object[] or URL</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType"><a>object or URL</a></span> <span class="idlParamName">frame</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-fromRDF-void-StatementArray-input-JsonLdCallback-callback-JsonLdOptions-options">fromRDF</a></span> (<span class="idlParam"><span class="idlParamType"><a href="#idl-def-Statement" class="idlType"><code>Statement</code></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-toRDF-void-object-or-object---or-URL-input-ObjectOrURL-context-StatementCallback-callback-JsonLdOptions-options">toRDF</a></span> (<span class="idlParam"><span class="idlParamType"><a>object or object[] or URL</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType"><a>ObjectOrURL</a>?</span> <span class="idlParamName">context</span></span>, <span class="idlParam"><span class="idlParamType"><a href="#idl-def-StatementCallback" class="idlType"><code>StatementCallback</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>
+<div id="methods" class="section">
+<h4>
+<span class="secno">
+2.1.1
+</span>
+Methods
+</h4>
+<dl class="methods">
+<dt id="widl-JsonLdProcessor-compact-void-object-or-object---or-URL-input-object-or-URL-context-JsonLdCallback-callback-JsonLdOptions-options">
+<code>
+compact
+</code>
+</dt>
+<dd>
+<a href="#compaction">
+Compacts
+</a>
+the
+given
+<code>
+input
+</code>
+<ins class="diff-new">using
+the
+</ins><code><ins class="diff-new">
+context
+</ins></code>
+according
+to
+the
+steps
+in
+the
+<a href="#compaction-algorithm">
+Compaction
+Algorithm
+</a>.
+The
+<code>
+input
+</code>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+copied,
+compacted
+and
+returned
+if
+there
+are
+no
+errors.
+If
+the
+compaction
+fails,
+an
+appropirate
+exception
+<em class="rfc2119" title="must">
+must
+</em>
+be
+thrown.
+<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
+<ins class="diff-new">or
+object[]
+or
+URL
+</ins>
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+JSON-LD
+object
+<ins class="diff-new">or
+array
+of
+JSON-LD
+objects
+</ins>
+to
+perform
+<ins class="diff-new">the
+</ins>
+compaction
+<del class="diff-old">on.
+</del>
+<ins class="diff-chg">upon
+or
+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">
+referencing
+the
+JSON-LD
+document
+to
+compact.
+</ins>
+</td>
+</tr>
+<tr>
+<td class="prmName">
+context
+</td>
+<td class="prmType">
+<code>
+<a>
+object
+<ins class="diff-new">or
+URL
+</ins>
+</a>
+</code>
+</td>
+<del class="diff-old">✔
+</del>
+<td class="prmNullFalse">
+<ins class="diff-chg">✘
+</ins>
+</td>
+<del class="diff-old">✔
+</del>
+<td class="prmOptFalse">
+<ins class="diff-chg">✘
+</ins>
+</td>
+<td class="prmDesc">
+The
+<del class="diff-old">base
+</del>
+context
+to
+use
+when
+compacting
+the
+<code>
+input
+<del class="diff-old">.
+</del>
+</code>
+<ins class="diff-chg">;
+either
+in
+the
+form
+of
+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">
+or
+as
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri">
+<del class="diff-old">Exception
+</del>
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr>
+<del class="diff-old">Description
+</del>
+</a>.
+</td>
+</tr>
+<tr>
+<del class="diff-old">InvalidContext
+</del>
+<td class="prmName">
+<ins class="diff-chg">callback
+</ins>
+</td>
+<td class="prmType">
+<code>
+<del class="diff-old">INVALID_SYNTAX
+</del>
+<a href="#idl-def-JsonLdCallback" class="idlType">
+<del class="diff-old">A
+general
+syntax
+error
+was
+detected
+in
+the
+@context
+.
+For
+example,
+if
+a
+</del>
+<code>
+<del class="diff-old">@type
+key
+maps
+to
+anything
+other
+than
+@id
+</del>
+<ins class="diff-chg">JsonLdCallback
+</ins>
+</code>
+<del class="diff-old">or
+an
+absolute
+IRI
+,
+this
+exception
+would
+be
+raised.
+</del>
+</a>
+<del class="diff-old">LOAD_ERROR
+</del>
+</code>
+</td>
+<del class="diff-old">There
+was
+a
+problem
+encountered
+loading
+a
+remote
+context.
+</del>
+<td class="prmNullFalse">
+<ins class="diff-chg">✘
+</ins>
+</td>
+<td class="prmOptFalse">
+<ins class="diff-chg">✘
+</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>
+<del class="diff-old">ProcessingError
+</del>
+<td class="prmName">
+<ins class="diff-chg">options
+</ins>
+</td>
+<td class="prmType">
+<code>
+<del class="diff-old">LOSSY_COMPACTION
+</del>
+<a href="#idl-def-JsonLdOptions" class="idlType">
+<del class="diff-old">The
+compaction
+would
+lead
+to
+a
+loss
+of
+information,
+such
+as
+a
+</del>
+<code>
+<del class="diff-old">@language
+</del>
+<ins class="diff-chg">JsonLdOptions
+</ins>
+</code>
+<del class="diff-old">value.
+</del>
+</a>
+</code>
+</td>
+<del class="diff-old">CONFLICTING_DATATYPES
+</del>
+<td class="prmNullFalse">
+<ins class="diff-chg">✘
+</ins></td>
+<td class="prmOptTrue">
+<ins class="diff-new">✔
+</ins>
+</td>
+<del class="diff-old">The
+target
+datatype
+specified
+in
+the
+coercion
+rule
+and
+</del>
+<td class="prmDesc">
+<ins class="diff-chg">A
+set
+of
+options
+that
+</ins><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em><ins class="diff-chg">
+affect
+</ins>
+the
+<del class="diff-old">datatype
+for
+</del>
+<ins class="diff-chg">expansion
+algorithm
+such
+as,
+e.g.,
+</ins>
+the
+<del class="diff-old">typed
+literal
+do
+not
+match.
+</del>
+<ins class="diff-chg">input
+document's
+base
+</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-new">This
+also
+includes
+</ins><code><ins class="diff-new">
+optimize
+</ins></code>,<ins class="diff-new">
+which
+if
+set
+will
+cause
+processor-specific
+optimization.
+</ins>
+</td>
+</tr>
+</table>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+<del class="diff-old">object
+</del>
+<ins class="diff-chg">void
+</ins>
+</a>
+</code>
+</div>
+</dd>
+<dt id="widl-JsonLdProcessor-expand-void-object-or-object---or-URL-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>.
+The
+<code>
+input
+</code>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+copied,
+expanded
+and
+returned
+if
+there
+are
+no
+errors.
+If
+the
+expansion
+fails,
+an
+appropriate
+exception
+<em class="rfc2119" title="must">
+must
+</em>
+be
+thrown.
+<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
+<ins class="diff-new">or
+object[]
+or
+URL
+</ins>
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+JSON-LD
+object
+<ins class="diff-new">or
+array
+of
+JSON-LD
+objects
+</ins>
+to
+<del class="diff-old">copy
+and
+</del>
+perform
+the
+expansion
+<del class="diff-old">upon.
+</del>
+<ins class="diff-chg">upon
+or
+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">
+referencing
+the
+JSON-LD
+document
+to
+expand.
+</ins>
+</td>
+</tr>
+<tr>
+<td class="prmName">
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">callback
+</ins>
+</td>
+<td class="prmType">
+<code>
+<del class="diff-old">object
+</del>
+<a href="#idl-def-JsonLdCallback" class="idlType">
+<code>
+<ins class="diff-chg">JsonLdCallback
+</ins></code>
+</a>
+</code>
+</td>
+<del class="diff-old">✔
+</del>
+<td class="prmNullFalse">
+<ins class="diff-chg">✘
+</ins>
+</td>
+<del class="diff-old">✔
+</del>
+<td class="prmOptFalse">
+<ins class="diff-chg">✘
+</ins>
+</td>
+<td class="prmDesc">
+<del class="diff-old">An
+external
+context
+to
+use
+additionally
+to
+the
+context
+embedded
+in
+input
+</del>
+<ins class="diff-chg">A
+callback
+that
+is
+called
+</ins>
+when
+<del class="diff-old">expanding
+</del>
+<ins class="diff-chg">processing
+is
+complete
+on
+</ins>
+the
+<ins class="diff-new">given
+</ins>
+<code>
+input
+</code>.
+</td>
+</tr>
+<tr>
+<del class="diff-old">Exception
+Description
+InvalidContext
+</del>
+<td class="prmName">
+<ins class="diff-chg">options
+</ins>
+</td>
+<td class="prmType">
+<code>
+<del class="diff-old">INVALID_SYNTAX
+</del>
+<a href="#idl-def-JsonLdOptions" class="idlType">
+<del class="diff-old">A
+general
+syntax
+error
+was
+detected
+in
+the
+</del>
+<code>
+<del class="diff-old">@context
+.
+For
+example,
+if
+a
+@type
+key
+maps
+to
+anything
+other
+than
+@id
+</del>
+<ins class="diff-chg">JsonLdOptions
+</ins>
+</code>
+<del class="diff-old">or
+an
+absolute
+IRI
+,
+this
+exception
+would
+be
+raised.
+</del>
+</a>
+<del class="diff-old">LOAD_ERROR
+</del>
+</code>
+</td>
+<del class="diff-old">There
+was
+a
+problem
+encountered
+loading
+a
+remote
+context.
+</del>
+<td class="prmNullFalse">
+<ins class="diff-chg">✘
+</ins>
+</td>
+<td class="prmOptTrue">
+<ins class="diff-chg">✔
+</ins></td>
+<td class="prmDesc">
+<ins class="diff-chg">A
+set
+of
+options
+that
+</ins><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em><ins class="diff-chg">
+affect
+the
+expansion
+algorithm
+such
+as,
+e.g.,
+the
+input
+document's
+base
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>
+</a>.
+</td>
+</tr>
+</table>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+<del class="diff-old">object
+</del>
+<ins class="diff-chg">void
+</ins>
+</a>
+</code>
+</div>
+</dd>
+<dt id="widl-JsonLdProcessor-frame-void-object-or-object---or-URL-input-object-or-URL-frame-JsonLdCallback-callback-JsonLdOptions-options">
+<code>
+frame
+</code>
+</dt>
+<dd>
+<a href="#framing">
+Frames
+</a>
+the
+given
+<code>
+input
+</code>
+using
+the
+<code>
+frame
+</code>
+according
+to
+the
+steps
+in
+the
+<a href="#framing-algorithm">
+Framing
+Algorithm
+</a>.
+The
+<code>
+input
+</code>
+is
+used
+to
+build
+the
+framed
+output
+and
+is
+returned
+if
+there
+are
+no
+errors.
+If
+there
+are
+no
+matches
+for
+the
+frame,
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+returned.
+Exceptions
+<em class="rfc2119" title="must">
+must
+</em>
+be
+thrown
+if
+there
+are
+errors.
+<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
+<ins class="diff-new">or
+object[]
+or
+URL
+</ins>
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+JSON-LD
+object
+<ins class="diff-new">or
+array
+of
+JSON-LD
+objects
+</ins>
+to
+perform
+<ins class="diff-new">the
+</ins>
+framing
+<del class="diff-old">on.
+</del>
+<ins class="diff-chg">upon
+or
+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">
+referencing
+the
+JSON-LD
+document
+to
+frame.
+</ins>
+</td>
+</tr>
+<tr>
+<td class="prmName">
+frame
+</td>
+<td class="prmType">
+<code>
+<a>
+object
+<ins class="diff-new">or
+URL
+</ins>
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+frame
+to
+use
+when
+re-arranging
+the
+<del class="diff-old">data.
+</del>
+<ins class="diff-chg">data
+of
+</ins><code><ins class="diff-chg">
+input
+</ins></code><ins class="diff-chg">
+;
+either
+in
+the
+form
+of
+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">
+or
+as
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a>.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+<del class="diff-old">options
+</del>
+<ins class="diff-chg">callback
+</ins>
+</td>
+<td class="prmType">
+<code>
+<del class="diff-old">object
+</del>
+<a href="#idl-def-JsonLdCallback" class="idlType">
+<code>
+<ins class="diff-chg">JsonLdCallback
+</ins></code>
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+A
+<del class="diff-old">set
+of
+options
+</del>
+<ins class="diff-chg">callback
+</ins>
+that
+<del class="diff-old">will
+affect
+</del>
+<ins class="diff-chg">is
+called
+when
+processing
+is
+complete
+on
+</ins>
+the
+<del class="diff-old">framing
+algorithm.
+</del>
+<ins class="diff-chg">given
+</ins><code><ins class="diff-chg">
+input
+</ins></code>.
+</td>
+</tr>
+<tr>
+<del class="diff-old">Exception
+</del>
+<td class="prmName">
+<ins class="diff-chg">options
+</ins></td>
+<del class="diff-old">Description
+</del>
+<td class="prmType">
+<code>
+<a href="#idl-def-JsonLdOptions" class="idlType">
+<code>
+<ins class="diff-chg">JsonLdOptions
+</ins></code>
+<del class="diff-old">InvalidFrame
+</del>
+</a>
+<del class="diff-old">INVALID_SYNTAX
+</del>
+</code>
+</td>
+<del class="diff-old">A
+frame
+must
+be
+either
+an
+object
+or
+an
+array
+of
+objects,
+if
+the
+frame
+is
+neither
+of
+these
+types,
+this
+exception
+is
+thrown.
+</del>
+<td class="prmNullFalse">
+<ins class="diff-chg">✘
+</ins>
+</td>
+<del class="diff-old">MULTIPLE_EMBEDS
+</del>
+<td class="prmOptTrue">
+<ins class="diff-chg">✔
+</ins>
+</td>
+<td class="prmDesc">
+A
+<del class="diff-old">subject
+IRI
+was
+specified
+in
+more
+than
+one
+place
+in
+</del>
+<ins class="diff-chg">set
+of
+options
+that
+</ins><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em><ins class="diff-chg">
+affect
+the
+framing
+algorithm
+such
+as,
+e.g.,
+</ins>
+the
+input
+<del class="diff-old">frame.
+More
+than
+one
+embed
+of
+a
+given
+subject
+</del>
+<ins class="diff-chg">document's
+base
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">is
+not
+allowed,
+and
+if
+requested,
+must
+result
+in
+this
+exception.
+</del>
+</a>.
+</td>
+</tr>
+</table>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+<del class="diff-old">object
+</del>
+<ins class="diff-chg">void
+</ins>
+</a>
+</code>
+</div>
+</dd>
+<dt id="widl-JsonLdProcessor-fromRDF-void-StatementArray-input-JsonLdCallback-callback-JsonLdOptions-options">
+<code>
+<del class="diff-old">normalize
+</del>
+<ins class="diff-chg">fromRDF
+</ins>
+</code>
+</dt>
+<dd>
+<del class="diff-old">Normalizes
+the
+</del>
+<ins class="diff-chg">Creates
+a
+JSON-LD
+document
+</ins>
+given
+<ins class="diff-new">an
+set
+of
+</ins><a href="#idl-def-Statement" class="idlType">
+<code>
+<del class="diff-old">input
+according
+to
+the
+steps
+in
+the
+Normalization
+Algorithm
+.
+The
+input
+must
+be
+copied,
+normalized
+and
+returned
+if
+there
+are
+no
+errors.
+If
+the
+compaction
+fails,
+null
+</del>
+<ins class="diff-chg">Statement
+</ins>
+</code>
+<del class="diff-old">must
+be
+returned.
+The
+output
+is
+the
+serialized
+representation
+returned
+from
+the
+Normalization
+Algorithm
+.
+It's
+still
+an
+open
+question
+if
+the
+result
+is
+a
+DOMString
+representing
+the
+serialized
+graph
+in
+JSON-LD,
+or
+an
+array
+</del>
+</a>
+<del class="diff-old">representation
+which
+is
+in
+normalized
+form.
+</del>
+<ins class="diff-chg">s.
+</ins>
+<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>
+<del class="diff-old">object
+</del>
+<a href="#idl-def-Statement" class="idlType">
+<code>
+<ins class="diff-new">Statement
+</ins></code></a><ins class="diff-new">
+[]
+</ins>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+<del class="diff-old">The
+JSON-LD
+object
+to
+perform
+normalization
+upon.
+</del>
+<ins class="diff-chg">An
+array
+of
+RDF
+statements.
+</ins>
+</td>
+</tr>
+<tr>
+<td class="prmName">
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">callback
+</ins>
+</td>
+<td class="prmType">
+<code>
+<del class="diff-old">object
+</del>
+<a href="#idl-def-JsonLdCallback" class="idlType">
+<code>
+<ins class="diff-chg">JsonLdCallback
+</ins></code>
+</a>
+</code>
+</td>
+<del class="diff-old">✔
+</del>
+<td class="prmNullFalse">
+<ins class="diff-chg">✘
+</ins>
+</td>
+<del class="diff-old">✔
+</del>
+<td class="prmOptFalse">
+<ins class="diff-chg">✘
+</ins>
+</td>
+<td class="prmDesc">
+<del class="diff-old">An
+external
+context
+to
+use
+additionally
+to
+the
+context
+embedded
+in
+input
+</del>
+<ins class="diff-chg">A
+callback
+that
+is
+called
+</ins>
+when
+<del class="diff-old">expanding
+</del>
+<ins class="diff-chg">processing
+is
+complete
+on
+</ins>
+the
+<ins class="diff-new">given
+</ins>
+<code>
+input
+</code>.
+</td>
+</tr>
+<tr>
+<del class="diff-old">Exception
+</del>
+<td class="prmName">
+<ins class="diff-chg">options
+</ins></td>
+<del class="diff-old">Description
+</del>
+<td class="prmType">
+<code>
+<a href="#idl-def-JsonLdOptions" class="idlType">
+<code>
+<ins class="diff-chg">JsonLdOptions
+</ins></code>
+<del class="diff-old">InvalidContext
+</del>
+</a>
+</code>
+</td>
+<del class="diff-old">INVALID_SYNTAX
+</del>
+<td class="prmNullFalse">
+<ins class="diff-chg">✘
+</ins></td>
+<td class="prmOptTrue">
+<ins class="diff-new">✔
+</ins>
+</td>
+<td class="prmDesc">
+A
+<del class="diff-old">general
+syntax
+error
+was
+detected
+in
+</del>
+<ins class="diff-chg">set
+of
+options
+that
+will
+affect
+</ins>
+the
+<ins class="diff-new">algorithm.
+This
+includes
+</ins>
+<code>
+<del class="diff-old">@context
+.
+For
+example,
+</del>
+<ins class="diff-chg">notType
+</ins></code>,<ins class="diff-chg">
+which
+</ins>
+if
+<del class="diff-old">a
+@type
+key
+maps
+</del>
+<ins class="diff-chg">set
+</ins>
+to
+<del class="diff-old">anything
+other
+than
+@id
+or
+an
+absolute
+IRI
+,
+this
+exception
+would
+be
+raised.
+</del>
+<a class="tref internalDFN" title="true" href="#dfn-true">
+<ins class="diff-chg">true
+</ins></a><ins class="diff-chg">
+causes
+the
+resulting
+document
+to
+use
+</ins>
+<code>
+<del class="diff-old">LOAD_ERROR
+</del>
+<ins class="diff-chg">rdf:type
+</ins>
+</code>
+<del class="diff-old">There
+was
+a
+problem
+encountered
+loading
+</del>
+<ins class="diff-chg">as
+</ins>
+a
+<del class="diff-old">remote
+context.
+</del>
+<ins class="diff-chg">property,
+instead
+of
+</ins><code><ins class="diff-chg">
+@type
+</ins></code>.
+</td>
+</tr>
+</table>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+<del class="diff-old">DOMString
+</del>
+<ins class="diff-chg">void
+</ins>
+</a>
+</code>
+</div>
+</dd>
+<dt id="widl-JsonLdProcessor-toRDF-void-object-or-object---or-URL-input-ObjectOrURL-context-StatementCallback-callback-JsonLdOptions-options">
+<code>
+<del class="diff-old">triples
+</del>
+<ins class="diff-chg">toRDF
+</ins>
+</code>
+</dt>
+<dd>
+Processes
+the
+<code>
+input
+</code>
+according
+to
+the
+<a href="#convert-to-rdf-algorithm">
+<ins class="diff-chg">Convert
+to
+</ins>
+RDF
+<del class="diff-old">Conversion
+</del>
+Algorithm
+</a>,
+calling
+the
+provided
+<code>
+<del class="diff-old">tripleCallback
+</del>
+<ins class="diff-chg">callback
+</ins>
+</code>
+for
+each
+<del class="diff-old">triple
+</del>
+<a href="#idl-def-Statement" class="idlType">
+<code>
+<ins class="diff-chg">Statement
+</ins></code></a>
+generated.
+<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
+<ins class="diff-new">or
+object[]
+or
+URL
+</ins>
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+JSON-LD
+object
+<ins class="diff-new">or
+array
+of
+JSON-LD
+objects
+</ins>
+to
+<del class="diff-old">process
+</del>
+<ins class="diff-chg">convert
+to
+RDF
+or
+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">
+referencing
+the
+JSON-LD
+document
+to
+convert
+to
+RDF.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-chg">
+context
+</ins></td><td class="prmType"><code><a><ins class="diff-chg">
+ObjectOrURL
+</ins></a></code></td><td class="prmNullTrue"><ins class="diff-chg">
+✔
+</ins></td><td class="prmOptFalse"><ins class="diff-chg">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-chg">
+An
+external
+context
+to
+use
+additionally
+to
+the
+context
+embedded
+in
+</ins><code><ins class="diff-chg">
+input
+</ins></code>
+when
+<del class="diff-old">outputting
+triples.
+</del>
+<ins class="diff-chg">expanding
+the
+</ins><code><ins class="diff-chg">
+input
+</ins></code>.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+<del class="diff-old">tripleCallback
+</del>
+<ins class="diff-chg">callback
+</ins>
+</td>
+<td class="prmType">
+<code>
+<a href="#idl-def-StatementCallback" class="idlType">
+<code>
+<del class="diff-old">JsonLdTripleCallback
+</del>
+<ins class="diff-chg">StatementCallback
+</ins>
+</code>
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+A
+callback
+that
+is
+called
+<del class="diff-old">whenever
+</del>
+<ins class="diff-chg">when
+</ins>
+a
+<a href="#idl-def-Statement" class="idlType">
+<code>
+<ins class="diff-new">Statement
+</ins></code></a><ins class="diff-new">
+is
+created
+from
+</ins>
+processing
+<del class="diff-old">error
+occurs
+on
+</del>
+the
+given
+<code>
+input
+</code>.
+<del class="diff-old">This
+callback
+should
+be
+aligned
+with
+the
+RDF
+API.
+</del>
+</td>
+</tr>
+<tr>
+<td class="prmName">
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">options
+</ins>
+</td>
+<td class="prmType">
+<code>
+<del class="diff-old">object
+</del>
+<a href="#idl-def-JsonLdOptions" class="idlType">
+<code>
+<ins class="diff-chg">JsonLdOptions
+</ins></code>
+</a>
+</code>
+</td>
+<del class="diff-old">✔
+</del>
+<td class="prmNullFalse">
+<ins class="diff-chg">✘
+</ins>
+</td>
+<td class="prmOptTrue">
+✔
+</td>
+<td class="prmDesc">
+<del class="diff-old">An
+external
+context
+to
+use
+additionally
+to
+</del>
+<ins class="diff-chg">A
+set
+of
+options
+that
+</ins><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em><ins class="diff-chg">
+affect
+</ins>
+the
+<del class="diff-old">context
+embedded
+in
+input
+when
+expanding
+</del>
+<ins class="diff-chg">conversion
+to
+RDF
+such
+as,
+e.g.,
+</ins>
+the
+input
+<del class="diff-old">.
+</del>
+<ins class="diff-chg">document's
+base
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a>.
+</td>
+</tr>
+</table>
+<del class="diff-old">Exception
+Description
+</del>
+<div>
+<em>
+<ins class="diff-chg">Return
+type:
+</ins></em>
+<code>
+<a>
+<del class="diff-old">InvalidContext
+</del>
+<ins class="diff-chg">void
+</ins>
+</a>
+</code>
+</div>
+</dd>
+</dl>
+</div>
+</div>
+<div id="callbacks" class="section">
+<h3>
+<del class="diff-old">INVALID_SYNTAX
+</del>
+<span class="secno">
+<ins class="diff-chg">2.2
+</ins></span><ins class="diff-chg">
+Callbacks
+</ins></h3><div id="jsonldcallback" class="section"><h4>
+<span class="secno">
+<ins class="diff-chg">2.2.1
+</ins></span><ins class="diff-chg">
+JsonLdCallback
+</ins></h4><p><ins class="diff-chg">
+The
+</ins><a href="#idl-def-JsonLdCallback" class="idlType">
+<del class="diff-old">A
+general
+syntax
+error
+was
+detected
+in
+the
+</del>
+<code>
+<del class="diff-old">@context
+.
+For
+example,
+if
+a
+@type
+</del>
+<ins class="diff-chg">JsonLdCallback
+</ins>
+</code>
+<del class="diff-old">key
+maps
+</del>
+</a>
+<ins class="diff-chg">is
+used
+</ins>
+to
+<del class="diff-old">anything
+other
+than
+</del>
+<ins class="diff-chg">return
+a
+processed
+JSON-LD
+representation
+as
+the
+result
+of
+processing
+an
+API
+method.
+</ins></p>    <pre class="idl"><span id="idl-def-JsonLdCallback" class="idlInterface">[<span class="extAttr">NoInterfaceObject Callback</span>]<ins class="diff-chg">
+interface <span class="idlInterfaceID">JsonLdCallback</span> {
+</ins><span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JsonLdCallback-jsonLd-void-ObjectOrObjectArray-jsonld">jsonLd</a></span> (<span class="idlParam"><span class="idlParamType"><a>ObjectOrObjectArray</a></span> <span class="idlParamName">jsonld</span></span>);</span><ins class="diff-chg">
+};</span>
+</ins></pre><div id="methods-1" class="section"><h5><span class="secno"><ins class="diff-chg">
+2.2.1.1
+</ins></span><ins class="diff-chg">
+Methods
+</ins></h5><dl class="methods"><dt id="widl-JsonLdCallback-jsonLd-void-ObjectOrObjectArray-jsonld">
+<code>
+<del class="diff-old">@id
+</del>
+<ins class="diff-chg">jsonLd
+</ins>
+</code>
+<del class="diff-old">or
+an
+absolute
+IRI
+,
+this
+exception
+would
+be
+raised.
+</del>
+</dt>
+<dd>
+<ins class="diff-chg">This
+callback
+is
+invoked
+when
+processing
+is
+complete.
+</ins><table class="parameters"><tr><th><ins class="diff-chg">
+Parameter
+</ins></th><th><ins class="diff-chg">
+Type
+</ins></th><th><ins class="diff-chg">
+Nullable
+</ins></th><th><ins class="diff-chg">
+Optional
+</ins></th><th><ins class="diff-chg">
+Description
+</ins></th>
+</tr>
+<tr>
+<td class="prmName">
+<ins class="diff-chg">jsonld
+</ins></td><td class="prmType">
+<code>
+<del class="diff-old">LOAD_ERROR
+</del>
+<a>
+<ins class="diff-chg">ObjectOrObjectArray
+</ins></a>
+</code>
+</td>
+<del class="diff-old">There
+was
+a
+problem
+encountered
+loading
+a
+remote
+context.
+</del>
+<td class="prmNullFalse">
+<ins class="diff-chg">✘
+</ins>
+</td>
+<td class="prmOptFalse">
+<ins class="diff-chg">✘
+</ins></td>
+<td class="prmDesc">
+<ins class="diff-new">The
+processed
+JSON-LD
+document.
+</ins>
+</td>
+</tr>
+</table>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+void
+</a>
+</code>
+</div>
+</dd>
+</dl>
+</div>
+</div>
+<div id="statementcallback" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">2.2
+</del>
+<ins class="diff-chg">2.2.2
+</ins>
+</span>
+<del class="diff-old">JsonLdTripleCallback
+</del>
+<ins class="diff-chg">StatementCallback
+</ins></h4>
+<p>
+The
+<del class="diff-old">JsonLdTripleCallback
+</del>
+<a href="#idl-def-StatementCallback" class="idlType">
+<code>
+<ins class="diff-chg">StatementCallback
+</ins></code></a>
+is
+called
+whenever
+the
+processor
+generates
+a
+<del class="diff-old">triple
+</del>
+<ins class="diff-chg">statement
+</ins>
+during
+the
+<code>
+<del class="diff-old">triple()
+</del>
+<ins class="diff-chg">statement()
+</ins>
+</code>
+call.
+</p>
+<del class="diff-old">    ]
+interface  {
+</del>
+    <pre class="idl"><span id="idl-def-StatementCallback" class="idlInterface">[<span class="extAttr">NoInterfaceObject Callback</span>]
+<ins class="diff-chg">interface <span class="idlInterfaceID">StatementCallback</span> {
+</ins><span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-StatementCallback-statement-void-Statement-statement">statement</a></span> (<span class="idlParam"><span class="idlParamType"><a href="#idl-def-Statement" class="idlType"><code>Statement</code></a></span> <span class="idlParamName">statement</span></span>);</span>
+};</span>
+</pre>
+<div id="methods-2" class="section">
+<h5>
+<span class="secno">
+<del class="diff-old">2.2.1
+</del>
+<ins class="diff-chg">2.2.2.1
+</ins>
+</span>
+Methods
+</h5>
+<dl class="methods">
+<dt id="widl-StatementCallback-statement-void-Statement-statement">
+<code>
+<del class="diff-old">triple
+</del>
+<ins class="diff-chg">statement
+</ins>
+</code>
+</dt>
+<dd>
+This
+callback
+is
+invoked
+whenever
+a
+<del class="diff-old">triple
+</del>
+<ins class="diff-chg">statement
+</ins>
+is
+generated
+by
+the
+processor.
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+<del class="diff-old">subject
+</del>
+<ins class="diff-chg">statement
+</ins>
+</td>
+<td class="prmType">
+<code>
+<del class="diff-old">DOMString
+</del>
+<a href="#idl-def-Statement" class="idlType">
+<code>
+<ins class="diff-chg">Statement
+</ins></code>
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+<del class="diff-old">subject
+IRI
+that
+is
+associated
+with
+the
+triple.
+</del>
+<ins class="diff-chg">statement.
+</ins>
+</td>
+</tr>
+</table>
+<del class="diff-old">property
+</del>
+<div>
+<em>
+<ins class="diff-chg">Return
+type:
+</ins></em>
+<code>
+<a>
+<del class="diff-old">DOMString
+</del>
+<ins class="diff-chg">void
+</ins>
+</a>
+</code>
+</div>
+<del class="diff-old">✘
+</del>
+</dd>
+<del class="diff-old">✘
+</del>
+</dl>
+</div>
+</div>
+</div>
+<div id="data-structures" class="section">
+<h3>
+<span class="secno">
+<ins class="diff-chg">2.3
+</ins></span><ins class="diff-chg">
+Data
+Structures
+</ins></h3><p><ins class="diff-chg">
+This
+section
+describes
+datatype
+definitions
+used
+within
+the
+JSON-LD
+API.
+</ins></p><div id="url" class="section"><h4><span class="secno"><ins class="diff-chg">
+2.3.1
+</ins></span><ins class="diff-chg">
+URL
+</ins></h4><p>
+The
+<del class="diff-old">property
+</del>
+<a href="#idl-def-URL" class="idlType">
+<code>
+<ins class="diff-chg">URL
+</ins></code></a><ins class="diff-chg">
+datatype
+is
+a
+string
+representation
+of
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+</p>
+<pre class="idl">
+<span id="idl-def-URL" class="idlTypedef">
+<ins class="diff-new">typedef
+</ins><span class="idlTypedefType"><a><ins class="diff-new">
+DOMString
+</ins></a></span><span class="idlTypedefID"><ins class="diff-new">
+URL
+</ins></span><ins class="diff-new">
+;
+</ins></span></pre><div class="idlTypedefDesc"><ins class="diff-new">
+This
+datatype
+indicates
+</ins>
+that
+<del class="diff-old">is
+associated
+with
+</del>
+the
+<del class="diff-old">triple.
+</del>
+<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">is
+interpreted
+as
+a
+Universal
+Resource
+Locator
+identifying
+a
+document,
+which
+when
+parsed
+as
+JSON
+yields
+either
+a
+</ins><code><ins class="diff-chg">
+JSON
+object
+</ins></code><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+array
+</ins></code>.</div></div><div id="jsonldoptions" class="section"><h4>
+<del class="diff-old">objectType
+</del>
+<span class="secno">
+<ins class="diff-chg">2.3.2
+</ins></span><ins class="diff-chg">
+JsonLdOptions
+</ins></h4><p><ins class="diff-chg">
+The
+</ins><a><ins class="diff-chg">
+JsonLdOptiones
+</ins></a><ins class="diff-chg">
+type
+is
+used
+to
+convery
+a
+set
+of
+options
+to
+an
+interface
+method.
+</ins></p><pre class="idl">
+<span id="idl-def-JsonLdOptions" class="idlTypedef">
+<ins class="diff-chg">typedef
+</ins><span class="idlTypedefType"><a><ins class="diff-chg">
+object
+</ins></a></span><span class="idlTypedefID"><ins class="diff-chg">
+JsonLdOptions
+</ins></span><ins class="diff-chg">
+;
+</ins></span></pre><div class="idlTypedefDesc"><dt><a href="#idl-def-URL" class="idlType"><code><ins class="diff-chg">
+URL
+</ins></code></a><ins class="diff-chg">
+base
+</ins></dt><dd><ins class="diff-chg">
+The
+Base
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+to
+use
+when
+expanding
+the
+document.
+This
+overrides
+the
+value
+of
+</ins><em><ins class="diff-chg">
+input
+</ins></em><ins class="diff-chg">
+if
+it
+is
+a
+</ins><a href="#idl-def-URL" class="idlType">
+<code>
+<ins class="diff-new">URL
+</ins></code>
+</a>
+<ins class="diff-new">or
+if
+it
+is
+a
+</ins><code><ins class="diff-new">
+object
+</ins></code><ins class="diff-new">
+or
+</ins><code><ins class="diff-new">
+object[]
+</ins></code>.</dd><dt><ins class="diff-new">
+boolean
+optimize
+</ins></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><ins class="diff-new">
+boolean
+noType
+</ins></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
+not
+use
+the
+</ins><code><ins class="diff-new">
+@type
+</ins></code><ins class="diff-new">
+property
+when
+generating
+the
+output,
+and
+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>.</dd></div></div><p><ins class="diff-new">
+The
+following
+data
+structures
+are
+used
+for
+representing
+data
+about
+RDF
+statements
+(triples
+or
+quads).
+They
+are
+used
+for
+normalization,
+</ins>
+<a>
+<del class="diff-old">DOMString
+</del>
+<ins class="diff-chg">fromRDF
+</ins></a>,<ins class="diff-chg">
+and
+from
+</ins><a><ins class="diff-chg">
+toRDF
+</ins>
+</a>
+<ins class="diff-new">interfaces.
+</ins></p><div id="statement" class="section"><h4>
+<span class="secno">
+<ins class="diff-new">2.3.3
+</ins></span><ins class="diff-new">
+Statement
+</ins></h4><p><ins class="diff-new">
+The
+</ins><a href="#idl-def-Statement" class="idlType"><code><ins class="diff-new">
+Statement
+</ins>
+</code>
+</a>
+<ins class="diff-chg">interface
+represents
+an
+RDF
+Statement.
+</ins></p>    <pre class="idl"><span id="idl-def-Statement" class="idlInterface">[<span class="extAttr">NoInterfaceObject</span>]<ins class="diff-chg">
+interface <span class="idlInterfaceID">Statement</span> {
+</ins><span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a href="#idl-def-Node" class="idlType"><code>Node</code></a></span>  <span class="idlAttrName"><a href="#widl-Statement-subject">subject</a></span>;</span><span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a href="#idl-def-Node" class="idlType"><code>Node</code></a></span>  <span class="idlAttrName"><a href="#widl-Statement-property">property</a></span>;</span><span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a href="#idl-def-Node" class="idlType"><code>Node</code></a></span>  <span class="idlAttrName"><a href="#widl-Statement-object">object</a></span>;</span><span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a href="#idl-def-Node" class="idlType"><code>Node</code></a>?</span> <span class="idlAttrName"><a href="#widl-Statement-name">name</a></span>;</span><ins class="diff-chg">
+};</span>
+</ins></pre>
+<del class="diff-old">✘
+</del>
+<div id="attributes" class="section">
+<del class="diff-old">✘
+</del>
+<h5>
+<del class="diff-old">The
+</del>
+<span class="secno">
+<ins class="diff-chg">2.3.3.1
+</ins></span><ins class="diff-chg">
+Attributes
+</ins></h5><dl class="attributes"><dt id="widl-Statement-name"><code><ins class="diff-chg">
+name
+</ins></code><ins class="diff-chg">
+of
+</ins>
+type
+<span class="idlAttrType">
+<a href="#idl-def-Node" class="idlType">
+<code>
+<ins class="diff-new">Node
+</ins></code></a></span>,<ins class="diff-new">
+readonly,
+nullable
+</ins></dt><dd><ins class="diff-new">
+The
+name
+associated
+with
+the
+</ins><a href="#idl-def-Statement" class="idlType"><code><ins class="diff-new">
+Statement
+</ins></code></a><ins class="diff-new">
+identifying
+it
+as
+a
+member
+</ins>
+of
+<del class="diff-old">object
+</del>
+<ins class="diff-chg">a
+named
+graph.
+If
+the
+attribute
+is
+present,
+it
+indicates
+</ins>
+that
+<ins class="diff-new">this
+statement
+</ins>
+is
+<ins class="diff-new">a
+member
+of
+a
+</ins><em><ins class="diff-new">
+named
+graph
+</ins></em>
+associated
+with
+<em>
+<ins class="diff-new">name
+</ins></em>.<ins class="diff-new">
+If
+it
+is
+missing,
+</ins>
+the
+<del class="diff-old">triple.
+Valid
+values
+are
+</del>
+<ins class="diff-chg">statement
+is
+a
+member
+of
+the
+</ins><em><ins class="diff-chg">
+default
+graph
+</ins></em>.</dd>
+<del class="diff-old">IRI
+</del>
+<dt id="widl-Statement-object">
+<code>
+<ins class="diff-new">object
+</ins>
+</code>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">of
+type
+</ins><span class="idlAttrType"><a href="#idl-def-Node" class="idlType">
+<code>
+<del class="diff-old">literal
+.
+</del>
+<ins class="diff-chg">Node
+</ins></code>
+</a>
+</span>,
+<ins class="diff-chg">readonly
+</ins></dt>
+<dd>
+<ins class="diff-chg">The
+</ins>
+object
+<ins class="diff-chg">associated
+with
+the
+</ins><a href="#idl-def-Statement" class="idlType">
+<code>
+<ins class="diff-chg">Statement
+</ins></code></a>.</dd><dt id="widl-Statement-property">
+<code>
+<ins class="diff-new">property
+</ins></code><ins class="diff-new">
+of
+type
+</ins><span class="idlAttrType"><a href="#idl-def-Node" class="idlType"><code><ins class="diff-new">
+Node
+</ins></code>
+<del class="diff-old">DOMString
+</del>
+</a>
+</span>,
+<ins class="diff-new">readonly
+</ins></dt><dd><ins class="diff-new">
+The
+property
+associated
+with
+the
+</ins><a href="#idl-def-Statement" class="idlType"><code><ins class="diff-new">
+Statement
+</ins>
+</code>
+</a>.
+</dd>
+<del class="diff-old">✘
+</del>
+<dt id="widl-Statement-subject">
+<del class="diff-old">✘
+</del>
+<code>
+<ins class="diff-chg">subject
+</ins></code><ins class="diff-chg">
+of
+type
+</ins><span class="idlAttrType">
+<a href="#idl-def-Node" class="idlType">
+<code>
+<ins class="diff-chg">Node
+</ins></code></a></span>,<ins class="diff-chg">
+readonly
+</ins></dt><dd>
+The
+<del class="diff-old">object
+value
+</del>
+<ins class="diff-chg">subject
+</ins>
+associated
+with
+the
+<del class="diff-old">subject
+</del>
+<a href="#idl-def-Statement" class="idlType">
+<code>
+<ins class="diff-chg">Statement
+</ins></code></a>.</dd></dl></div></div><div id="node" class="section"><h4><span class="secno"><ins class="diff-chg">
+2.3.4
+</ins></span><ins class="diff-chg">
+Node
+</ins></h4><p><a href="#idl-def-Node" class="idlType"><code><ins class="diff-chg">
+Node
+</ins></code></a><ins class="diff-chg">
+is
+the
+base
+class
+of
+</ins><a href="#idl-def-NamedNode" class="idlType"><code><ins class="diff-chg">
+NamedNode
+</ins></code></a>,<a href="#idl-def-BlankNode" class="idlType"><code><ins class="diff-chg">
+BlankNode
+</ins></code></a>,
+and
+<a href="#idl-def-LiteralNode" class="idlType">
+<code>
+<ins class="diff-new">LiteralNode
+</ins></code></a>.</p>    <pre class="idl"><span id="idl-def-Node" class="idlInterface">[<span class="extAttr">NoInterfaceObject</span>]<ins class="diff-new">
+interface <span class="idlInterfaceID">Node</span> {
+</ins><span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Node-nominalValue">nominalValue</a></span>;</span><span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Node-interfaceName">interfaceName</a></span>;</span><ins class="diff-new">
+};</span>
+</ins></pre><div id="attributes-1" class="section"><h5><span class="secno"><ins class="diff-new">
+2.3.4.1
+</ins></span><ins class="diff-new">
+Attributes
+</ins></h5><dl class="attributes"><dt id="widl-Node-interfaceName"><code><ins class="diff-new">
+interfaceName
+</ins></code><ins class="diff-new">
+of
+type
+</ins><span class="idlAttrType"><a><ins class="diff-new">
+DOMString
+</ins></a></span>,<ins class="diff-new">
+readonly
+</ins></dt><dd><p><ins class="diff-new">
+Provides
+access
+to
+</ins>
+the
+<del class="diff-old">property.
+</del>
+<ins class="diff-chg">string
+name
+of
+the
+current
+interface,
+normally
+one
+of
+</ins><code><ins class="diff-chg">
+&quot;
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+&quot;
+</ins></code>,<code><ins class="diff-chg">
+&quot;BlankNode&quot;
+</ins></code><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+&quot;LiteralNode&quot;
+</ins></code>.</p><p><ins class="diff-chg">
+This
+method
+serves
+to
+disambiguate
+instances
+of
+</ins><a href="#idl-def-Node" class="idlType">
+<code>
+<ins class="diff-chg">Node
+</ins></code>
+</a>
+<ins class="diff-chg">which
+are
+otherwise
+identical,
+such
+as
+</ins><a href="#idl-def-NamedNode" class="idlType">
+<del class="diff-old">datatype
+</del>
+<code>
+<ins class="diff-chg">NamedNode
+</ins></code>
+</a>
+<ins class="diff-chg">and
+</ins><a href="#idl-def-BlankNode" class="idlType">
+<code>
+<ins class="diff-new">BlankNode
+</ins></code></a>.</p></dd><dt id="widl-Node-nominalValue"><code><ins class="diff-new">
+nominalValue
+</ins></code><ins class="diff-new">
+of
+type
+</ins><span class="idlAttrType">
+<a>
+DOMString
+</a>
+</span>,
+<ins class="diff-new">readonly
+</ins></dt><dd><p><ins class="diff-new">
+The
+</ins><code><ins class="diff-new">
+nominalValue
+</ins>
+</code>
+<ins class="diff-new">of
+an
+</ins><a href="#idl-def-Node" class="idlType">
+<code>
+<ins class="diff-chg">Node
+</ins></code>
+<del class="diff-old">✔
+</del>
+</a>
+<ins class="diff-chg">is
+refined
+by
+each
+interface
+which
+extends
+</ins><a href="#idl-def-Node" class="idlType">
+<del class="diff-old">✘
+</del>
+<code>
+<ins class="diff-chg">Node
+</ins></code>
+</a>.
+</p>
+</dd>
+</dl>
+</div>
+</div>
+<div id="namednode" class="section">
+<h4>
+<span class="secno">
+<ins class="diff-chg">2.3.5
+</ins></span><ins class="diff-chg">
+NamedNode
+</ins></h4><p><ins class="diff-chg">
+A
+node
+identified
+by
+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">
+NamedNodes
+are
+defined
+by
+International
+Resource
+Identifier
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-IRI"><ins class="diff-chg">
+IRI
+</ins></a></cite><ins class="diff-chg">
+].
+</ins></p>    <pre class="idl"><span id="idl-def-NamedNode" class="idlInterface">[<span class="extAttr">NoInterfaceObject</span>]<ins class="diff-chg">
+interface <span class="idlInterfaceID">NamedNode</span> : <span class="idlSuperclass"><a href="#idl-def-Node" class="idlType"><code>Node</code></a></span> {
+</ins><span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-NamedNode-nominalValue">nominalValue</a></span>;</span><ins class="diff-chg">
+};</span>
+</ins></pre><div id="attributes-2" class="section"><h5><span class="secno"><ins class="diff-chg">
+2.3.5.1
+</ins></span><ins class="diff-chg">
+Attributes
+</ins></h5><dl class="attributes"><dt id="widl-NamedNode-nominalValue"><code><ins class="diff-chg">
+nominalValue
+</ins></code><ins class="diff-chg">
+of
+type
+</ins><span class="idlAttrType"><a><ins class="diff-chg">
+DOMString
+</ins></a></span>,<ins class="diff-chg">
+readonly
+</ins></dt><dd>
+The
+<del class="diff-old">datatype
+associated
+with
+</del>
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr><ins class="diff-chg">
+identifier
+of
+</ins>
+the
+<del class="diff-old">object.
+</del>
+<ins class="diff-chg">node.
+</ins></dd>
+</dl>
+</div>
+</div>
+<div id="blank-node" class="section">
+<h4>
+<del class="diff-old">language
+</del>
+<span class="secno">
+<ins class="diff-chg">2.3.6
+</ins></span><ins class="diff-chg">
+Blank
+Node
+</ins></h4><p><ins class="diff-chg">
+A
+</ins><a href="#idl-def-BlankNode" class="idlType">
+<code>
+<ins class="diff-chg">BlankNode
+</ins></code></a><ins class="diff-chg">
+is
+a
+reference
+to
+an
+unnamed
+resource
+(one
+for
+which
+an
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+is
+not
+known),
+and
+may
+be
+used
+in
+a
+</ins><a href="#idl-def-Statement" class="idlType"><code><ins class="diff-chg">
+Statement
+</ins></code></a><ins class="diff-chg">
+as
+a
+unique
+reference
+to
+that
+unnamed
+resource.
+</ins></p>    <pre class="idl"><span id="idl-def-BlankNode" class="idlInterface">[<span class="extAttr">NoInterfaceObject</span>]<ins class="diff-chg">
+interface <span class="idlInterfaceID">BlankNode</span> : <span class="idlSuperclass"><a href="#idl-def-Node" class="idlType"><code>Node</code></a></span> {
+</ins><span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-BlankNode-nominalValue">nominalValue</a></span>;</span><ins class="diff-chg">
+};</span>
+</ins></pre><div id="attributes-3" class="section"><h5><span class="secno"><ins class="diff-chg">
+2.3.6.1
+</ins></span><ins class="diff-chg">
+Attributes
+</ins></h5><dl class="attributes"><dt id="widl-BlankNode-nominalValue">
+<code>
+<ins class="diff-new">nominalValue
+</ins></code><ins class="diff-new">
+of
+type
+</ins><span class="idlAttrType">
+<a>
+DOMString
+</a>
+</span>,
+<ins class="diff-new">readonly
+</ins></dt><dd><ins class="diff-new">
+The
+temporary
+identifier
+of
+the
+</ins><a href="#idl-def-BlankNode" class="idlType"><code><ins class="diff-new">
+BlankNode
+</ins>
+</code>
+</a>.
+<ins class="diff-chg">The
+nominalValue
+</ins><em class="rfc2119" title="must not"><ins class="diff-chg">
+must
+not
+</ins></em><ins class="diff-chg">
+be
+relied
+upon
+in
+any
+way
+between
+two
+separate
+processing
+runs
+of
+the
+same
+document.
+</ins></dd>
+<del class="diff-old">✔
+</del>
+</dl>
+<del class="diff-old">✘
+</del>
+</div>
+<p class="note">
+<ins class="diff-chg">Developers
+and
+authors
+must
+not
+assume
+that
+the
+nominalValue
+of
+a
+</ins><a href="#idl-def-BlankNode" class="idlType">
+<del class="diff-old">The
+</del>
+<code>
+<ins class="diff-chg">BlankNode
+</ins></code></a><ins class="diff-chg">
+will
+remain
+the
+same
+between
+two
+processing
+runs.
+</ins><a href="#idl-def-BlankNode" class="idlType"><code><ins class="diff-chg">
+BlankNode
+</ins></code></a><ins class="diff-chg">
+nominalValues
+are
+only
+valid
+for
+the
+most
+recent
+processing
+run
+on
+the
+document.
+</ins><a href="#idl-def-BlankNode" class="idlType"><code><ins class="diff-chg">
+BlankNode
+</ins></code></a><ins class="diff-chg">
+s
+nominalValues
+will
+often
+be
+generated
+differently
+by
+different
+processors.
+</ins></p><p class="note"><ins class="diff-chg">
+Implementers
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+ensure
+that
+</ins><a href="#idl-def-BlankNode" class="idlType"><code><ins class="diff-chg">
+BlankNode
+</ins></code></a><ins class="diff-chg">
+nominalValues
+are
+unique
+within
+the
+current
+environment,
+two
+</ins><a href="#idl-def-BlankNode" class="idlType"><code><ins class="diff-chg">
+BlankNode
+</ins></code></a><ins class="diff-chg">
+s
+are
+considered
+equal
+if,
+and
+only
+if,
+their
+nominalValues
+are
+strictly
+equal.
+</ins></p></div><div id="literalnode" class="section"><h4><span class="secno"><ins class="diff-chg">
+2.3.7
+</ins></span><ins class="diff-chg">
+LiteralNode
+</ins></h4><p><ins class="diff-chg">
+LiteralNodes
+represent
+values
+such
+as
+numbers,
+dates
+and
+strings
+in
+RDF
+data.
+A
+</ins><a href="#idl-def-LiteralNode" class="idlType"><code><ins class="diff-chg">
+LiteralNode
+</ins></code></a><ins class="diff-chg">
+is
+comprised
+of
+three
+attributes:
+</ins></p><ul><li><ins class="diff-chg">
+a
+lexical
+representation
+of
+the
+</ins><code><ins class="diff-chg">
+nominalValue
+</ins></code></li><li><ins class="diff-chg">
+an
+optional
+</ins><code>
+language
+<del class="diff-old">associated
+</del>
+</code>
+<ins class="diff-chg">represented
+by
+a
+string
+token
+</ins></li><li><ins class="diff-chg">
+an
+optional
+</ins><code><ins class="diff-chg">
+datatype
+</ins></code><ins class="diff-chg">
+specified
+by
+a
+</ins><a href="#idl-def-NamedNode" class="idlType"><code><ins class="diff-chg">
+NamedNode
+</ins></code></a></li></ul><p><ins class="diff-chg">
+LiteralNodes
+representing
+plain
+text
+in
+a
+natural
+language
+may
+have
+a
+</ins><code><ins class="diff-chg">
+language
+</ins></code><ins class="diff-chg">
+attribute
+specified
+by
+a
+text
+string
+token,
+as
+specified
+in
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-BCP47"><ins class="diff-chg">
+BCP47
+</ins></a></cite><ins class="diff-chg">
+],
+normalized
+to
+lowercase
+(e.g.,
+</ins><code><ins class="diff-chg">
+'en'
+</ins></code>,<code><ins class="diff-chg">
+'fr'
+</ins></code>,<code><ins class="diff-chg">
+'en-gb'
+</ins></code><ins class="diff-chg">
+).
+They
+may
+also
+have
+a
+datatype
+attribute
+such
+as
+</ins><code><ins class="diff-chg">
+xsd:string
+</ins></code>.</p><p><ins class="diff-chg">
+LiteralNodes
+representing
+values
+</ins>
+with
+<ins class="diff-new">a
+specific
+datatype,
+such
+as
+</ins>
+the
+<del class="diff-old">object
+</del>
+<ins class="diff-chg">integer
+72,
+may
+have
+a
+</ins><code><ins class="diff-chg">
+datatype
+</ins></code><ins class="diff-chg">
+attribute
+specified
+</ins>
+in
+<del class="diff-old">BCP47
+format.
+</del>
+<ins class="diff-chg">the
+form
+of
+a
+</ins><a href="#idl-def-NamedNode" class="idlType">
+<code>
+<ins class="diff-chg">NamedNode
+</ins></code>
+</a>
+<ins class="diff-chg">(e.g.,
+</ins><code><ins class="diff-chg">
+&lt;http://www.w3.org/2001/XMLSchema#integer&gt;
+</ins></code><ins class="diff-chg">
+).
+</ins></p>      <pre class="idl"><span id="idl-def-LiteralNode" class="idlInterface">[<span class="extAttr">NoInterfaceObject</span>]<ins class="diff-chg">
+interface <span class="idlInterfaceID">LiteralNode</span> : <span class="idlSuperclass"><a href="#idl-def-Node" class="idlType"><code>Node</code></a></span> {
+</ins><span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>DOMString</a></span>  <span class="idlAttrName"><a href="#widl-LiteralNode-nominalValue">nominalValue</a></span>;</span><span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>DOMString</a>?</span> <span class="idlAttrName"><a href="#widl-LiteralNode-language">language</a></span>;</span><span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a href="#idl-def-NamedNode" class="idlType"><code>NamedNode</code></a>?</span> <span class="idlAttrName"><a href="#widl-LiteralNode-datatype">datatype</a></span>;</span><ins class="diff-chg">
+};</span>
+</ins></pre>
+<div id="attributes-4" class="section">
+<del class="diff-old">No
+exceptions.
+</del>
+<h5>
+<span class="secno">
+<ins class="diff-chg">2.3.7.1
+</ins></span><ins class="diff-chg">
+Attributes
+</ins></h5>
+<dl class="attributes">
+<del class="diff-old">Return
+type:
+</del>
+<dt id="widl-LiteralNode-datatype">
+<code>
+<ins class="diff-new">datatype
+</ins></code><ins class="diff-new">
+of
+type
+</ins><span class="idlAttrType"><a href="#idl-def-NamedNode" class="idlType"><code><ins class="diff-new">
+NamedNode
+</ins></code></a></span>,<ins class="diff-new">
+readonly,
+nullable
+</ins></dt><dd><ins class="diff-new">
+An
+optional
+datatype
+identified
+by
+a
+NamedNode.
+</ins></dd><dt id="widl-LiteralNode-language"><code><ins class="diff-new">
+language
+</ins></code><ins class="diff-new">
+of
+type
+</ins><span class="idlAttrType">
+<a>
+<del class="diff-old">void
+</del>
+<ins class="diff-chg">DOMString
+</ins></a></span>,<ins class="diff-chg">
+readonly,
+nullable
+</ins></dt><dd><ins class="diff-chg">
+An
+optional
+language
+string
+as
+defined
+in
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-BCP47"><ins class="diff-chg">
+BCP47
+</ins>
+</a>
+</cite>
+<ins class="diff-new">],
+normalized
+to
+lowercase.
+</ins></dd><dt id="widl-LiteralNode-nominalValue"><code><ins class="diff-new">
+nominalValue
+</ins>
+</code>
+<ins class="diff-new">of
+type
+</ins><span class="idlAttrType">
+<a>
+<ins class="diff-chg">DOMString
+</ins></a>
+</span>,
+<ins class="diff-new">readonly
+</ins></dt><dd><ins class="diff-new">
+The
+lexical
+representation
+of
+the
+LiteralNodes
+value.
+</ins>
+</dd>
+</dl>
+</div>
+</div>
+</div>
+</div>
+<div id="algorithms" class="section">
+<h2>
+<span class="secno">
+3.
+</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>
+<div id="syntax-tokens-and-keywords" class="section">
+<h3>
+<span class="secno">
+3.1
+</span>
+Syntax
+Tokens
+and
+Keywords
+</h3>
+<p>
+JSON-LD
+specifies
+a
+number
+of
+syntax
+tokens
+and
+<dfn title="keyword" id="dfn-keyword">
+keyword
+</dfn>
+s
+that
+are
+using
+in
+all
+algorithms
+described
+in
+this
+section:
+</p>
+<dl>
+<dt>
+<code>
+@context
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>.
+</dd>
+<dt>
+<code>
+@id
+</code>
+</dt>
+<dd>
+Sets
+the
+active
+subject.
+</dd>
+<dt>
+<code>
+@language
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+the
+language
+for
+a
+literal.
+</dd>
+<dt>
+<code>
+@type
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+type
+of
+the
+active
+subject
+or
+the
+datatype
+of
+a
+literal.
+</dd>
+<dt>
+<code>
+@value
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+the
+value
+of
+a
+literal.
+</dd>
+<dt>
+<code>
+<ins class="diff-new">@container
+</ins></code></dt><dd><ins class="diff-new">
+Used
+to
+set
+the
+container
+of
+a
+particular
+value.
+</ins></dd><dt><code><ins class="diff-new">
+@list
+</ins></code></dt><dd><ins class="diff-new">
+Used
+to
+express
+an
+ordered
+set
+of
+data.
+</ins></dd><dt><code><ins class="diff-new">
+@set
+</ins></code></dt><dd><ins class="diff-new">
+Used
+to
+express
+an
+unordered
+set
+of
+data.
+</ins></dd><dt><code><ins class="diff-new">
+@graph
+</ins></code></dt><dd><ins class="diff-new">
+Used
+to
+explicitly
+express
+a
+</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-new">
+linked
+data
+graph
+</ins></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">
+<ins class="diff-new">compact
+IRIs
+</ins></a>.</dd><dt><code><ins class="diff-new">
+@default
+</ins></code></dt><dd><ins class="diff-new">
+Used
+in
+</ins><a href="#framing"><ins class="diff-new">
+Framing
+</ins></a><ins class="diff-new">
+to
+set
+</ins>
+the
+<del class="diff-old">prefix
+</del>
+<ins class="diff-chg">defeault
+value
+for
+an
+output
+property
+when
+the
+framed
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-chg">
+subject
+definition
+</ins>
+</a>
+<del class="diff-old">mechanism.
+</del>
+<ins class="diff-chg">does
+not
+include
+such
+a
+property.
+</ins></dd><dt><code><ins class="diff-chg">
+@explicit
+</ins></code></dt><dd><ins class="diff-chg">
+Used
+in
+</ins><a href="#framing"><ins class="diff-chg">
+Framing
+</ins></a><ins class="diff-chg">
+to
+override
+the
+value
+of
+</ins><a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag"><ins class="diff-chg">
+explicit
+inclusion
+flag
+</ins></a><ins class="diff-chg">
+within
+a
+specific
+frame.
+</ins></dd><dt><code><ins class="diff-chg">
+@omitDefault
+</ins></code></dt><dd><ins class="diff-chg">
+Used
+in
+</ins><a href="#framing"><ins class="diff-chg">
+Framing
+</ins></a><ins class="diff-chg">
+to
+override
+the
+value
+of
+</ins><a class="tref internalDFN" title="omit_default_flag" href="#dfn-omit_default_flag"><ins class="diff-chg">
+omit
+default
+flag
+</ins></a><ins class="diff-chg">
+within
+a
+specific
+frame.
+</ins></dd><dt><code><ins class="diff-chg">
+@embed
+</ins></code></dt><dd><ins class="diff-chg">
+Used
+in
+</ins><a href="#framing"><ins class="diff-chg">
+Framing
+</ins></a><ins class="diff-chg">
+to
+override
+the
+value
+of
+</ins><a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag"><ins class="diff-chg">
+object
+embed
+flag
+</ins></a><ins class="diff-chg">
+within
+a
+specific
+frame.
+</ins></dd><dt><code><ins class="diff-chg">
+@null
+</ins></code></dt><dd><ins class="diff-chg">
+&gt;Used
+in
+</ins><a href="#framing"><ins class="diff-chg">
+Framing
+</ins></a><ins class="diff-chg">
+when
+a
+value
+of
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a><ins class="diff-chg">
+should
+be
+returned,
+which
+would
+otherwise
+be
+removed
+when
+</ins><a href="#compaction"><ins class="diff-chg">
+Compacting
+</ins></a>.
+</dd>
+</dl>
+<p>
+All
+JSON-LD
+tokens
+and
+keywords
+are
+case-sensitive.
+</p>
+</div>
+<div id="algorithm-terms" class="section">
+<h3>
+<span class="secno">
+3.2
+</span>
+Algorithm
+Terms
+</h3>
+<dl>
+<dt>
+<dfn title="initial_context" id="dfn-initial_context">
+initial
+context
+</dfn>
+</dt>
+<dd>
+a
+context
+that
+is
+specified
+to
+the
+algorithm
+before
+processing
+begins.
+The
+contents
+of
+the
+initial
+context
+is
+defined
+in
+<a href="#appendix-b">
+Appendix
+B
+</a>.
+</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.
+<ins class="diff-new">The
+active
+property
+is
+represented
+in
+the
+original
+lexical
+form,
+which
+is
+used
+for
+finding
+coercion
+mappings
+in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></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="blank_node" id="dfn-blank_node">
+blank
+node
+</dfn>
+</dt>
+<dd>
+a
+blank
+node
+is
+a
+<a class="tref internalDFN" title="resource" href="#dfn-resource">
+resource
+</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="literal" href="#dfn-literal">
+literal
+</a>.
+Blank
+nodes
+may
+be
+named
+or
+unnamed
+and
+often
+take
+on
+the
+role
+of
+a
+variable
+that
+may
+represent
+either
+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="literal" href="#dfn-literal">
+literal
+</a>.
+</dd>
+<dt>
+<dfn title="compact_iri" id="dfn-compact_iri">
+<ins class="diff-new">compact
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr></dfn></dt><dd><ins class="diff-new">
+a
+compact
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+is
+has
+the
+form
+of
+</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-new">
+prefix
+</ins></a><ins class="diff-new">
+and
+</ins><em><ins class="diff-new">
+suffix
+</ins></em><ins class="diff-new">
+and
+is
+used
+as
+a
+way
+of
+expressing
+an
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+without
+needing
+to
+define
+separate
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a><ins class="diff-new">
+definitions
+for
+each
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+contained
+within
+a
+common
+vocabulary
+identified
+by
+</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-new">
+prefix
+</ins></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
+<del class="diff-old">with
+</del>
+<ins class="diff-chg">in
+</ins>
+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="prefix" id="dfn-prefix">
+prefix
+</dfn>
+</dt>
+<dd>
+A
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>
+is
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+that
+expands
+to
+a
+<del class="diff-old">Web
+Vocabulary
+</del>
+<ins class="diff-chg">vocabulary
+</ins>
+base
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>.
+It
+is
+typically
+used
+along
+with
+a
+<em>
+suffix
+</em>
+to
+<ins class="diff-new">form
+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">
+to
+</ins>
+create
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+within
+a
+<del class="diff-old">Web
+Vocabulary.
+</del>
+<ins class="diff-chg">vocabulary.
+</ins>
+</dd>
+<dt>
+<dfn title="plain_literal" id="dfn-plain_literal">
+plain
+literal
+</dfn>
+</dt>
+<dd>
+A
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>
+is
+a
+<a class="tref internalDFN" title="literal" href="#dfn-literal">
+literal
+</a>
+without
+a
+datatype,
+possibly
+including
+a
+language.
+</dd>
+<dt>
+<dfn title="typed_literal" id="dfn-typed_literal">
+typed
+literal
+</dfn>
+</dt>
+<dd>
+A
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+is
+a
+<a class="tref internalDFN" title="literal" href="#dfn-literal">
+literal
+</a>
+with
+an
+associated
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+which
+indicates
+the
+literal's
+datatype.
+</dd>
+</dl>
+</div>
+<div id="context-processing" class="section">
+<h3 id="context">
+<span class="secno">
+3.3
+</span>
+Context
+<ins class="diff-new">Processing
+</ins>
+</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>.
+Processing
+begins
+by
+pushing
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+onto
+the
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+stack
+and
+initializing
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+with
+the
+<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
+initial
+context
+</a>.
+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>.
+</p>
+<p>
+The
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+used
+for
+expanding
+<del class="diff-old">keys
+</del>
+<ins class="diff-chg">properties
+</ins>
+and
+values
+of
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+(or
+elements
+of
+a
+list
+(see
+<span a="#list-processing">
+List
+Processing
+</span>
+))
+using
+a
+<dfn title="term_mapping" id="dfn-term_mapping">
+term
+mapping
+</dfn>.
+It
+is
+also
+used
+to
+maintain
+<dfn title="coercion_mapping" id="dfn-coercion_mapping">
+coercion
+mapping
+</dfn>
+s
+from
+<del class="diff-old">IRIs
+associated
+with
+</del>
+terms
+to
+datatypes,
+<dfn title="language_mapping" id="dfn-language_mapping">
+<ins class="diff-new">language
+mapping
+</ins></dfn><ins class="diff-new">
+s
+from
+terms
+to
+language
+codes,
+</ins>
+and
+<dfn title="list_mapping" id="dfn-list_mapping">
+list
+mapping
+</dfn>
+s
+<ins class="diff-new">and
+</ins><dfn title="set_mapping" id="dfn-set_mapping"><ins class="diff-new">
+set
+mapping
+</ins></dfn><ins class="diff-new">
+s
+</ins>
+for
+<del class="diff-old">IRIs
+associated
+with
+</del>
+terms.
+<ins class="diff-new">Processors
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+use
+the
+lexical
+form
+of
+the
+property
+when
+creating
+a
+mapping,
+as
+lookup
+is
+performed
+on
+lexical
+representations,
+not
+expanded
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+representations.
+</ins>
+</p>
+<p>
+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
+<del class="diff-old">key
+of
+</del>
+<code>
+@context
+</code>
+<ins class="diff-new">property
+</ins>
+with
+<ins class="diff-new">a
+</ins>
+<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.
+When
+processing
+a
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>,
+special
+processing
+rules
+apply:
+</p>
+<ol class="algorithm">
+<li>
+Create
+a
+new,
+empty
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>.
+</li>
+<li>
+Let
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">context
+</ins>
+</em>
+be
+the
+value
+of
+<code>
+@context
+</code>
+<ol class="algorithm">
+<li id="process-context">
+<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">
+reset
+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">
+to
+the
+</ins><a class="tref internalDFN" title="initial_context" href="#dfn-initial_context"><ins class="diff-chg">
+initial
+context
+</ins></a>.</li>
+<li>
+If
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">context
+</ins>
+</em>
+is
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>,
+process
+each
+element
+as
+<em>
+<del class="diff-old">value
+,
+</del>
+<ins class="diff-chg">context
+</ins></em>
+in
+order
+<del class="diff-old">using
+</del>
+<ins class="diff-chg">by
+starting
+at
+</ins>
+<a href="#process-context">
+Step
+<del class="diff-old">2
+</del>
+<ins class="diff-chg">2.1
+</ins>
+</a>.
+</li>
+<li>
+If
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">context
+</ins>
+</em>
+is
+a
+<del class="diff-old">simple
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>,
+it
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+lexical
+form
+of
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+<del class="diff-old">.
+</del>
+</abbr>
+</a>.
+<ol class="algorithm">
+<li>
+Dereference
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">context
+</ins>
+</em>.
+</li>
+<li>
+If
+the
+resulting
+document
+is
+a
+JSON
+document,
+extract
+the
+top-level
+<code>
+@context
+</code>
+element
+using
+the
+JSON
+Pointer
+&quot;/@context&quot;
+as
+described
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-JSON-POINTER">
+JSON-POINTER
+</a>
+</cite>
+].
+Set
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">context
+</ins>
+</em>
+to
+the
+extracted
+<del class="diff-old">content,
+or
+an
+empty
+JSON
+Object
+if
+no
+value
+exists.
+Merge
+the
+of
+local
+context
+into
+the
+active
+context
+</del>
+<ins class="diff-chg">content
+and
+process
+it
+by
+starting
+at
+</ins><a href="#process-context"><ins class="diff-chg">
+Step
+2.1
+</ins>
+</a>.
+</li>
+</ol>
+</li>
+<li>
+If
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">context
+</ins>
+</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>
+If
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">context
+</ins>
+</em>
+has
+a
+<code>
+@language
+</code>
+<del class="diff-old">key,
+</del>
+<ins class="diff-chg">property,
+</ins>
+it
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+value
+of
+a
+simple
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+or
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+<del class="diff-old">.
+</del>
+</a>.
+Add
+the
+language
+to
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>.
+</li>
+<li id="object-context">
+Otherwise,
+for
+each
+<del class="diff-old">key
+</del>
+<ins class="diff-chg">property
+</ins>
+in
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">context
+</ins>
+</em>
+<del class="diff-old">having
+</del>
+<ins class="diff-chg">perform
+</ins>
+the
+<del class="diff-old">lexical
+form
+of
+</del>
+<ins class="diff-chg">following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+property's
+value
+is
+a
+simple
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a>,<ins class="diff-chg">
+determine
+the
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+mapping
+value
+by
+performing
+</ins><a href="#iri-expansion">
+<del class="diff-old">NCName
+</del>
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr><ins class="diff-chg">
+Expansion
+</ins>
+</a>
+<ins class="diff-new">on
+the
+associated
+value.
+If
+the
+result
+of
+the
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+mapping
+is
+an
+</ins><a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri"><ins class="diff-new">
+absolute
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr>
+<del class="diff-old">(see
+[
+XML-NAMES
+</del>
+</a>,
+<ins class="diff-chg">merge
+the
+property
+into
+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">]),
+or
+</del>
+<a class="tref internalDFN" title="term_mapping" href="#dfn-term_mapping">
+<ins class="diff-chg">term
+mapping
+</ins></a>,<ins class="diff-chg">
+unless
+the
+property
+</ins>
+is
+<ins class="diff-new">a
+JSON-LD
+</ins><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-new">
+keyword
+</ins></a>,<ins class="diff-new">
+in
+which
+case
+throw
+</ins>
+an
+<del class="diff-old">empty
+string,
+</del>
+<ins class="diff-chg">exception.
+</ins></li><li><ins class="diff-chg">
+Otherwise,
+if
+the
+property's
+value
+is
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a><ins class="diff-chg">
+remove
+mapping,
+coercion,
+container
+and
+language
+information
+associated
+with
+property
+from
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a>.</li><li><ins class="diff-chg">
+Otherwise,
+the
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+'s
+</ins><em><ins class="diff-chg">
+value
+</ins></em><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+be
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>.
+<ol class="algorithm">
+<li>
+If
+the
+<del class="diff-old">key's
+value
+</del>
+<em>
+<ins class="diff-chg">property
+</ins></em>
+is
+a
+<del class="diff-old">simple
+string
+,
+</del>
+<ins class="diff-chg">JSON-LD
+</ins><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-chg">
+keyword
+</ins></a><ins class="diff-chg">
+and
+the
+value
+has
+</ins><code><ins class="diff-chg">
+@id
+</ins></code>,<code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+properties,
+throw
+an
+exception.
+</ins><div class="issue"><ins class="diff-chg">
+Undecided
+if
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+@graph
+</ins></code><ins class="diff-chg">
+can
+take
+a
+</ins><code><ins class="diff-chg">
+@container
+</ins></code><ins class="diff-chg">
+with
+</ins><code><ins class="diff-chg">
+@set
+</ins></code>.</div></li><li><ins class="diff-chg">
+If
+the
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+has
+</ins>
+the
+<ins class="diff-new">form
+of
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a>,<ins class="diff-new">
+it's
+</ins><em>
+value
+</em>
+<em class="rfc2119" title="must">
+<ins class="diff-new">must
+</ins></em><ins class="diff-new">
+have
+an
+</ins><code><ins class="diff-new">
+@id
+</ins></code><ins class="diff-new">
+property
+with
+a
+string
+value
+which
+</ins>
+<em class="rfc2119" title="must">
+must
+</em>
+have
+the
+form
+of
+<ins class="diff-new">a
+</ins>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>,
+<del class="diff-old">prefix
+:suffix,
+</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">
+or
+</ins><a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+<del class="diff-old">.
+</del>
+</abbr>
+</a>.
+Determine
+the
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+mapping
+<del class="diff-old">value
+</del>
+by
+performing
+<a href="#iri-expansion">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+</a>
+on
+the
+associated
+value.
+If
+the
+result
+of
+the
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+mapping
+is
+an
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+<del class="diff-old">,
+</del>
+</abbr>
+</a>,
+merge
+the
+<del class="diff-old">key-value
+pair
+</del>
+<em>
+<ins class="diff-chg">property
+</ins></em>
+into
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+<a class="tref internalDFN" title="term_mapping" href="#dfn-term_mapping">
+term
+mapping
+</a>.
+</li>
+<del class="diff-old">Otherwise,
+</del>
+<li>
+<ins class="diff-chg">If
+</ins>
+the
+<del class="diff-old">key's
+value
+must
+</del>
+<em>
+<ins class="diff-chg">property
+</ins>
+</em>
+<del class="diff-old">be
+</del>
+<ins class="diff-chg">has
+the
+form
+of
+of
+</ins>
+a
+<del class="diff-old">JSON
+object
+.
+The
+</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">
+or
+</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">
+the
+</ins><em>
+value
+<del class="diff-old">must
+</del>
+</em>
+<em class="rfc2119" title="may">
+<ins class="diff-chg">may
+</ins>
+</em>
+have
+a
+<code>
+@id
+</code>
+<del class="diff-old">key
+</del>
+<ins class="diff-chg">property
+</ins>
+with
+a
+string
+<del class="diff-old">value,
+the
+</del>
+value
+<ins class="diff-new">which
+</ins>
+<em class="rfc2119" title="must">
+must
+</em>
+have
+the
+form
+of
+<ins class="diff-new">a
+</ins>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>,
+<del class="diff-old">prefix
+:suffix,
+</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">
+or
+</ins>
+absolute
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+<del class="diff-old">.
+</del>
+</abbr>
+</a>.
+Determine
+the
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+mapping
+<del class="diff-old">value
+</del>
+by
+performing
+<a href="#iri-expansion">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+</a>
+on
+the
+associated
+value.
+If
+the
+result
+of
+the
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+mapping
+is
+an
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+<del class="diff-old">,
+</del>
+</abbr>
+</a>,
+merge
+the
+<del class="diff-old">key-value
+pair
+</del>
+<em>
+<ins class="diff-chg">property
+</ins></em>
+into
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+<a class="tref internalDFN" title="term_mapping" href="#dfn-term_mapping">
+term
+mapping
+</a>.
+</li>
+<li>
+If
+the
+<em>
+value
+</em>
+has
+a
+<code>
+@type
+</code>
+<del class="diff-old">key,
+the
+</del>
+<ins class="diff-chg">property,
+it's
+</ins>
+value
+<em class="rfc2119" title="must">
+must
+</em>
+have
+the
+form
+of
+<ins class="diff-new">a
+</ins>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>,
+<del class="diff-old">prefix
+:suffix,
+</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>,<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+or
+the
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+<code>
+@id
+</code>.
+Determine
+the
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+by
+performing
+<a href="#iri-expansion">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+</a>
+on
+the
+associated
+value.
+If
+the
+result
+of
+the
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+mapping
+is
+an
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+or
+<code>
+@id
+</code>,
+merge
+into
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+<a class="tref internalDFN" title="coercion_mapping" href="#dfn-coercion_mapping">
+coercion
+mapping
+<del class="diff-old">.
+</del>
+</a>
+<ins class="diff-chg">using
+the
+lexical
+value
+of
+the
+</ins><em><ins class="diff-chg">
+property
+</ins></em>.
+</li>
+<li>
+If
+the
+<em>
+value
+</em>
+has
+a
+<code>
+<del class="diff-old">@list
+</del>
+<ins class="diff-chg">@container
+</ins>
+</code>
+<del class="diff-old">key,
+the
+</del>
+<ins class="diff-chg">property,
+it's
+</ins>
+value
+<em class="rfc2119" title="must">
+must
+</em>
+be
+<code>
+<del class="diff-old">true
+</del>
+<ins class="diff-chg">@list
+</ins>
+</code>
+or
+<code>
+<del class="diff-old">false
+</del>
+<ins class="diff-chg">@set
+</ins>
+</code>.
+Merge
+<ins class="diff-new">the
+</ins><a class="tref internalDFN" title="list_mapping" href="#dfn-list_mapping"><ins class="diff-new">
+list
+mapping
+</ins></a><ins class="diff-new">
+or
+</ins><a class="tref internalDFN" title="set_mapping" href="#dfn-set_mapping"><ins class="diff-new">
+set
+mapping
+</ins></a>
+into
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+<del class="diff-old">list
+mapping
+</del>
+<ins class="diff-chg">using
+the
+lexical
+value
+of
+the
+</ins><em><ins class="diff-chg">
+property
+</ins></em>.</li><li><ins class="diff-chg">
+If
+the
+</ins><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">
+property
+but
+no
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+property,
+the
+value
+of
+the
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+property
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+be
+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"><ins class="diff-chg">
+null
+</ins>
+</a>.
+<ins class="diff-new">Merge
+the
+</ins><a class="tref internalDFN" title="language_mapping" href="#dfn-language_mapping"><ins class="diff-new">
+language
+mapping
+</ins></a><ins class="diff-new">
+into
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-new">
+local
+context
+</ins></a><ins class="diff-new">
+using
+the
+lexical
+value
+of
+the
+</ins><em><ins class="diff-new">
+property
+</ins></em>.
+</li>
+</ol>
+</li>
+<li>
+Merge
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+into
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+</li>
+<li>
+Repeat
+<a href="#object-context">
+Step
+<del class="diff-old">3.2
+</del>
+<ins class="diff-chg">2.4.2
+</ins>
+</a>
+until
+no
+entries
+are
+added
+to
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>.
+</li>
+</ol>
+</li>
+</ol>
+</li>
+</ol>
+</li>
+</ol>
+<p class="note">
+It
+can
+be
+difficult
+to
+distinguish
+between
+a
+<del class="diff-old">prefix:suffix
+</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>
+and
+an
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+<del class="diff-old">,
+</del>
+</abbr>
+</a>,
+as
+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>
+may
+seem
+to
+be
+a
+valid
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<em>
+scheme
+</em>.
+When
+performing
+repeated
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+expansion,
+a
+term
+used
+as
+a
+prefix
+may
+not
+have
+a
+valid
+mapping
+due
+to
+dependencies
+in
+resolving
+term
+definitions.
+By
+continuing
+<a href="#object-context">
+Step
+<del class="diff-old">3.2
+</del>
+<ins class="diff-chg">2.3.2
+</ins>
+</a>
+until
+no
+changes
+are
+made,
+mappings
+to
+IRIs
+created
+using
+an
+undefined
+term
+prefix
+will
+eventually
+resolve
+to
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<del class="diff-old">IRIs.
+</del>
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr></a><ins class="diff-chg">
+s.
+</ins>
+</p>
+<p class="issue">
+<a href="https://github.com/json-ld/json-ld.org/issues/43">
+Issue
+43
+</a>
+concerns
+performing
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+expansion
+in
+the
+key
+position
+of
+a
+context
+definition.
+</p>
+</div>
+<div id="iri-expansion" class="section">
+<h3>
+<span class="secno">
+3.4
+</span>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+</h3>
+<p>
+Keys
+and
+some
+values
+are
+evaluated
+to
+produce
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+<del class="diff-old">.
+</del>
+</abbr>
+</a>.
+This
+section
+defines
+an
+algorithm
+for
+transforming
+a
+value
+representing
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+into
+an
+actual
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>.
+</p>
+<p>
+<del class="diff-old">IRIs
+</del>
+<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">
+s
+</ins>
+may
+be
+represented
+as
+an
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+<del class="diff-old">,
+</del>
+</abbr>
+</a>,
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+or
+a
+<del class="diff-old">prefix
+:suffix
+construct.
+</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>.</p><p><ins class="diff-chg">
+An
+</ins><dfn title="absolute_iri" id="dfn-absolute_iri"><ins class="diff-chg">
+absolute
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></dfn><ins class="diff-chg">
+is
+defined
+in
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987"><ins class="diff-chg">
+RFC3987
+</ins></a></cite><ins class="diff-chg">
+]
+containing
+a
+</ins><em><ins class="diff-chg">
+scheme
+</ins></em><ins class="diff-chg">
+along
+with
+</ins><em><ins class="diff-chg">
+path
+</ins></em><ins class="diff-chg">
+and
+optional
+</ins><em><ins class="diff-chg">
+query
+</ins></em><ins class="diff-chg">
+and
+fragment
+segments.
+A
+</ins><dfn title="relative_iri" id="dfn-relative_iri"><ins class="diff-chg">
+relative
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></dfn><ins class="diff-chg">
+is
+an
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+that
+is
+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"><ins class="diff-chg">
+IRI
+</ins></abbr></a><ins class="diff-chg">
+;
+in
+the
+case
+of
+JSON-LD
+this
+is
+the
+base
+location
+of
+the
+document.
+</ins>
+</p>
+<p>
+The
+algorithm
+for
+generating
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+is:
+</p>
+<ol class="algorithm">
+<li>
+<del class="diff-old">Split
+</del>
+<ins class="diff-chg">If
+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
+a
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+mapping
+for
+the
+value
+using
+a
+case-sensitive
+comparison,
+use
+the
+mapped
+value
+as
+an
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>.</li><li><ins class="diff-chg">
+Otherwise,
+split
+</ins>
+the
+value
+into
+a
+<em>
+prefix
+</em>
+and
+<em>
+suffix
+</em>
+from
+the
+first
+occurrence
+of
+':'.
+</li>
+<li>
+If
+the
+prefix
+is
+a
+'_'
+(underscore),
+the
+value
+represents
+a
+named
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+contains
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+mapping
+for
+<em>
+prefix
+</em>
+using
+a
+case-sensitive
+comparison,
+<ins class="diff-new">and
+</ins><em><ins class="diff-new">
+suffix
+</ins></em><ins class="diff-new">
+does
+not
+does
+not
+begin
+with
+'//'
+(i.e.,
+it
+does
+not
+match
+a
+</ins><em><ins class="diff-new">
+hier-part
+</ins></em><ins class="diff-new">
+including
+</ins><em><ins class="diff-new">
+authority
+</ins></em><ins class="diff-new">
+(as
+defined
+in
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC3986"><ins class="diff-new">
+RFC3986
+</ins></a></cite><ins class="diff-new">
+]),
+</ins>
+generate
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+by
+prepending
+the
+mapped
+prefix
+to
+the
+(possibly
+empty)
+suffix
+using
+textual
+concatenation.
+Note
+that
+an
+empty
+suffix
+and
+no
+suffix
+(meaning
+the
+value
+contains
+no
+':'
+string
+at
+all)
+are
+treated
+equivalently.
+</li>
+<li>
+Otherwise,
+use
+the
+value
+directly
+as
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>.
+</li>
+</ol>
+<p>
+</p>
+<p class="note">
+Previous
+versions
+of
+this
+specification
+used
+<code>
+@base
+</code>
+and
+<code>
+@vocab
+</code>
+to
+define
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+prefixes
+used
+to
+resolve
+<a class="tref internalDFN" title="relative_iri" href="#dfn-relative_iri">
+relative
+<del class="diff-old">IRIs.
+</del>
+<ins class="diff-chg">IRIs
+</ins></a>.
+It
+was
+determined
+that
+this
+added
+too
+much
+complexity,
+but
+the
+issue
+can
+be
+re-examined
+in
+the
+future
+based
+on
+community
+input.
+</p>
+</div>
+<div id="iri-compaction" class="section">
+<h3>
+<span class="secno">
+3.5
+</span>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Compaction
+</h3>
+<p>
+Some
+keys
+and
+values
+are
+expressed
+using
+<del class="diff-old">IRIs.
+</del>
+<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">
+s.
+</ins>
+This
+section
+defines
+an
+algorithm
+for
+transforming
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<ins class="diff-new">(
+</ins><em><ins class="diff-new">
+iri
+</ins></em><ins class="diff-new">
+)
+</ins>
+to
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<ins class="diff-new">term
+</ins></a><ins class="diff-new">
+or
+</ins><a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+using
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+specified
+in
+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
+<del class="diff-old">.
+</del>
+</a>
+<ins class="diff-chg">using
+an
+optional
+</ins><em><ins class="diff-chg">
+value
+</ins></em>.
+</p>
+<div id="iri-compaction-algorithm" class="section">
+<h4>
+<span class="secno">
+<ins class="diff-new">3.5.1
+</ins></span><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+Compaction
+Algorithm
+</ins></h4>
+<p>
+The
+algorithm
+for
+generating
+a
+<del class="diff-old">compacted
+</del>
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+<ins class="diff-chg">compact
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+is:
+</p>
+<ol class="algorithm">
+<li>
+<del class="diff-old">Search
+every
+key-value
+pair
+</del>
+<ins class="diff-chg">Create
+an
+empty
+list
+of
+terms
+</ins><em><ins class="diff-chg">
+terms
+</ins></em><ins class="diff-chg">
+that
+will
+be
+populated
+with
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+s
+that
+are
+ranked
+according
+to
+how
+closely
+they
+match
+</ins><em><ins class="diff-chg">
+value
+</ins></em>.<ins class="diff-chg">
+Initialize
+</ins><em><ins class="diff-chg">
+highest
+rank
+</ins></em><ins class="diff-chg">
+to
+</ins><code><ins class="diff-chg">
+0
+</ins></code>,<ins class="diff-chg">
+and
+set
+a
+flag
+</ins><em><ins class="diff-chg">
+list
+container
+</ins></em><ins class="diff-chg">
+to
+</ins><code><ins class="diff-chg">
+false
+</ins></code>.</li><li><ins class="diff-chg">
+For
+each
+</ins><em><ins class="diff-chg">
+term
+</ins></em>
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+<del class="diff-old">for
+a
+</del>
+</a>:
+<ol class="algorithm">
+<li>
+<ins class="diff-chg">If
+the
+</ins><em>
+term
+</em>
+<ins class="diff-new">'s
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr>
+</a>
+<del class="diff-old">that
+</del>
+is
+<ins class="diff-new">not
+</ins>
+a
+complete
+match
+against
+<em>
+<ins class="diff-new">iri
+</ins></em>,<ins class="diff-new">
+continue
+to
+</ins>
+the
+<del class="diff-old">IRI
+.
+</del>
+<ins class="diff-chg">next
+</ins><em><ins class="diff-chg">
+term
+</ins></em>.</li><li>
+If
+<del class="diff-old">a
+complete
+match
+</del>
+<em>
+<ins class="diff-chg">value
+</ins></em>
+is
+<del class="diff-old">found,
+</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><ins class="diff-chg">
+containing
+only
+</ins>
+the
+<del class="diff-old">resulting
+compacted
+IRI
+</del>
+<ins class="diff-chg">property
+</ins><code><ins class="diff-chg">
+@list
+</ins></code>:<ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+term
+</ins></em><ins class="diff-chg">
+has
+a
+</ins><code><ins class="diff-chg">
+@container
+</ins></code><ins class="diff-chg">
+set
+to
+</ins><code><ins class="diff-chg">
+@set
+</ins></code>,<ins class="diff-chg">
+continue
+to
+the
+next
+</ins><em><ins class="diff-chg">
+term
+</ins></em>.</li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+list
+container
+</ins></em>
+is
+<code>
+<ins class="diff-new">true
+</ins></code><ins class="diff-new">
+and
+</ins><em><ins class="diff-new">
+term
+</ins></em><ins class="diff-new">
+does
+not
+have
+a
+</ins><code><ins class="diff-new">
+container
+</ins></code><ins class="diff-new">
+set
+to
+</ins><code><ins class="diff-new">
+@list
+</ins></code>,<ins class="diff-new">
+continue
+to
+</ins>
+the
+<ins class="diff-chg">next
+</ins><em>
+term
+<del class="diff-old">associated
+with
+</del>
+</em>.
+</li>
+</ol>
+</li>
+<li>
+<ins class="diff-chg">Otherwise,
+if
+</ins><em><ins class="diff-chg">
+term
+</ins></em><ins class="diff-chg">
+has
+a
+</ins><code><ins class="diff-chg">
+container
+</ins></code><ins class="diff-chg">
+set
+to
+</ins><code><ins class="diff-chg">
+@list
+</ins></code>,<ins class="diff-chg">
+continue
+to
+</ins>
+the
+<del class="diff-old">IRI
+in
+</del>
+<ins class="diff-chg">next
+</ins><em><ins class="diff-chg">
+term
+</ins></em>.</li><li><ins class="diff-chg">
+Set
+</ins><em><ins class="diff-chg">
+rank
+</ins></em><ins class="diff-chg">
+to
+</ins>
+the
+<a class="tref internalDFN" title="term_rank" href="#dfn-term_rank">
+<ins class="diff-new">term
+rank
+</ins></a><ins class="diff-new">
+of
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+by
+passing
+passing
+</ins><em><ins class="diff-new">
+term
+</ins></em>,<em><ins class="diff-new">
+value
+</ins></em>,<ins class="diff-new">
+and
+</ins>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+<ins class="diff-new">to
+the
+</ins><a href="#term-rank-algorithm"><ins class="diff-new">
+Term
+Rank
+Algorithm
+</ins>
+</a>.
+</li>
+<li>
+If
+<em>
+<ins class="diff-new">rank
+</ins></em><ins class="diff-new">
+is
+greater
+than
+</ins><code><ins class="diff-new">
+0
+</ins></code>:<ol class="algorithm"><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+term
+</ins></em><ins class="diff-new">
+has
+</ins>
+a
+<del class="diff-old">complete
+match
+</del>
+<code>
+<ins class="diff-chg">container
+</ins></code><ins class="diff-chg">
+set
+to
+</ins><code><ins class="diff-chg">
+@set
+</ins></code>,<ins class="diff-chg">
+then
+add
+</ins><code><ins class="diff-chg">
+1
+</ins></code><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+rank
+</ins></em>.</li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+value
+</ins></em>
+is
+<del class="diff-old">not
+found,
+search
+for
+</del>
+a
+<del class="diff-old">partial
+match
+from
+</del>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a><ins class="diff-chg">
+containing
+only
+</ins>
+the
+<del class="diff-old">beginning
+</del>
+<ins class="diff-chg">property
+</ins><code><ins class="diff-chg">
+@list
+</ins></code><ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+list
+container
+</ins></em><ins class="diff-chg">
+is
+</ins><code><ins class="diff-chg">
+false
+</ins></code><ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+term
+</ins></em><ins class="diff-chg">
+has
+a
+</ins><code><ins class="diff-chg">
+container
+</ins></code><ins class="diff-chg">
+set
+to
+</ins><code><ins class="diff-chg">
+@list
+</ins></code>,<ins class="diff-chg">
+then
+set
+</ins><em><ins class="diff-chg">
+list
+container
+</ins></em><ins class="diff-chg">
+to
+</ins><code><ins class="diff-chg">
+true
+</ins></code>,<ins class="diff-chg">
+clear
+</ins><em><ins class="diff-chg">
+terms
+</ins></em>,<ins class="diff-chg">
+set
+</ins><em><ins class="diff-chg">
+highest
+rank
+</ins></em><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+rank
+</ins></em>,<ins class="diff-chg">
+and
+add
+</ins><em><ins class="diff-chg">
+term
+</ins></em><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+terms
+</ins></em>.</li><li><ins class="diff-chg">
+Otherwise,
+if
+</ins><em><ins class="diff-chg">
+rank
+</ins></em><ins class="diff-chg">
+is
+greater
+than
+or
+equal
+to
+</ins><em><ins class="diff-chg">
+highest
+rank
+</ins></em>:<ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+rank
+</ins></em><ins class="diff-chg">
+is
+greater
+than
+</ins><em><ins class="diff-chg">
+highest
+rank
+</ins></em>,<ins class="diff-chg">
+clear
+</ins><em><ins class="diff-chg">
+terms
+</ins></em><ins class="diff-chg">
+and
+set
+</ins><em><ins class="diff-chg">
+highest
+rank
+</ins></em><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+rank
+</ins></em>.</li><li><ins class="diff-chg">
+Add
+</ins><em><ins class="diff-chg">
+term
+</ins></em><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+terms
+</ins></em>.</li></ol></li></ol></li></ol></li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+terms
+</ins></em><ins class="diff-chg">
+is
+empty,
+add
+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">
+representation
+</ins>
+of
+<em>
+<ins class="diff-new">iri
+</ins></em><ins class="diff-new">
+for
+each
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a><ins class="diff-new">
+in
+</ins>
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-new">active
+context
+</ins></a><ins class="diff-new">
+which
+maps
+to
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+<del class="diff-old">.
+For
+all
+matches
+that
+are
+found,
+</del>
+</abbr>
+</a>
+<ins class="diff-chg">which
+is
+a
+prefix
+for
+</ins><em><ins class="diff-chg">
+iri
+</ins></em><ins class="diff-chg">
+where
+</ins>
+the
+resulting
+<del class="diff-old">compacted
+</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">
+is
+not
+a
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><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">
+The
+resulting
+</ins><a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri"><ins class="diff-chg">
+compact
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+is
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+associated
+with
+the
+partially
+matched
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+concatenated
+with
+a
+colon
+(:)
+character
+and
+the
+unmatched
+part
+of
+<del class="diff-old">the
+string.
+</del>
+<em>
+<ins class="diff-chg">iri
+</ins></em>.</li><li>
+If
+<del class="diff-old">there
+is
+more
+than
+one
+compacted
+IRI
+produced,
+the
+final
+value
+</del>
+<em>
+<ins class="diff-chg">terms
+</ins></em>
+is
+<ins class="diff-new">empty,
+return
+</ins><em><ins class="diff-new">
+iri
+</ins></em>.</li><li><ins class="diff-new">
+Return
+</ins>
+the
+shortest
+and
+lexicographically
+least
+value
+<ins class="diff-new">in
+</ins><em><ins class="diff-new">
+terms
+</ins></em>.</li></ol><p></p></div><div id="term-rank-algorithm" class="section"><h4><span class="secno"><ins class="diff-new">
+3.5.2
+</ins></span><ins class="diff-new">
+Term
+Rank
+Algorithm
+</ins></h4><p><ins class="diff-new">
+When
+selecting
+among
+multiple
+possible
+terms
+for
+a
+given
+property,
+it
+may
+be
+that
+multiple
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+terms
+</ins></a><ins class="diff-new">
+are
+defined
+with
+the
+same
+</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">
+but
+differ
+in
+</ins><code><ins class="diff-new">
+@type
+</ins></code>,<code><ins class="diff-new">
+@container
+</ins></code><ins class="diff-new">
+or
+</ins><code><ins class="diff-new">
+@language
+</ins></code>.<ins class="diff-new">
+The
+purpose
+</ins>
+of
+<ins class="diff-new">this
+algorithm
+is
+to
+take
+an
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a><ins class="diff-new">
+and
+a
+value
+and
+give
+it
+a
+</ins><dfn title="term_rank" id="dfn-term_rank"><ins class="diff-new">
+term
+rank
+</ins></dfn>.<ins class="diff-new">
+The
+selection
+can
+then
+be
+based,
+partly,
+on
+</ins>
+the
+<del class="diff-old">entire
+</del>
+<ins class="diff-chg">term
+having
+the
+highest
+</ins><a class="tref internalDFN" title="term_rank" href="#dfn-term_rank"><ins class="diff-chg">
+term
+rank
+</ins></a>.</p><p><ins class="diff-chg">
+Given
+a
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><em><ins class="diff-chg">
+term
+</ins></em>,<em><ins class="diff-chg">
+value
+</ins></em>,<ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+determine
+the
+</ins><a class="tref internalDFN" title="term_rank" href="#dfn-term_rank"><ins class="diff-chg">
+term
+rank
+</ins></a><ins class="diff-chg">
+using
+the
+following
+steps:
+</ins></p><ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+is
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<a class="tref internalDFN" title="term_rank" href="#dfn-term_rank"><ins class="diff-chg">
+term
+rank
+</ins></a><ins class="diff-chg">
+is
+</ins><code><ins class="diff-chg">
+3
+</ins></code>.</li><li><ins class="diff-chg">
+Otherwise,
+if
+</ins><em><ins class="diff-chg">
+value
+</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">
+containing
+only
+the
+property
+</ins><code><ins class="diff-chg">
+@list
+</ins></code>:<ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+</ins><code><ins class="diff-chg">
+@list
+</ins></code><ins class="diff-chg">
+property
+is
+an
+empty
+array,
+if
+</ins><em><ins class="diff-chg">
+term
+</ins></em><ins class="diff-chg">
+has
+</ins><code><ins class="diff-chg">
+@container
+</ins></code>
+set
+<ins class="diff-new">to
+</ins><code><ins class="diff-new">
+@list
+</ins></code>,<a class="tref internalDFN" title="term_rank" href="#dfn-term_rank"><ins class="diff-new">
+term
+rank
+</ins></a><ins class="diff-new">
+is
+</ins><code><ins class="diff-new">
+1
+</ins></code>,<ins class="diff-new">
+otherwise
+</ins><code><ins class="diff-new">
+0
+</ins></code>.</li><li><ins class="diff-new">
+Otherwise,
+return
+the
+sum
+</ins>
+of
+<del class="diff-old">compacted
+IRIs.
+</del>
+<ins class="diff-chg">the
+</ins><a class="tref internalDFN" title="term_rank" href="#dfn-term_rank"><ins class="diff-chg">
+term
+rank
+</ins></a><ins class="diff-chg">
+s
+for
+every
+entry
+in
+the
+list.
+</ins></li></ol></li><li><ins class="diff-chg">
+Otherwise,
+if
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+is
+</ins><a class="tref internalDFN" title="true" href="#dfn-true"><ins class="diff-chg">
+true
+</ins></a>,<a class="tref internalDFN" title="false" href="#dfn-false"><ins class="diff-chg">
+false
+</ins></a>,<ins class="diff-chg">
+or
+a
+</ins><a class="tref internalDFN" title="number" href="#dfn-number"><ins class="diff-chg">
+number
+</ins></a>,<ins class="diff-chg">
+if
+</ins><em><ins class="diff-chg">
+term
+</ins></em><ins class="diff-chg">
+has
+a
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+coercion
+to
+</ins><code><ins class="diff-chg">
+xsd:boolean
+</ins></code>,<code><ins class="diff-chg">
+xsd:integer
+</ins></code>,<ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+xsd:double
+</ins></code><ins class="diff-chg">
+respectively,
+</ins><a class="tref internalDFN" title="term_rank" href="#dfn-term_rank"><ins class="diff-chg">
+term
+rank
+</ins></a><ins class="diff-chg">
+is
+</ins><code><ins class="diff-chg">
+3
+</ins></code>,<ins class="diff-chg">
+otherwise
+if
+</ins><em><ins class="diff-chg">
+term
+</ins></em><ins class="diff-chg">
+has
+no
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+it
+is
+</ins><code><ins class="diff-chg">
+2
+</ins></code>,<ins class="diff-chg">
+otherwise
+</ins><code><ins class="diff-chg">
+1
+</ins></code>.</li><li><ins class="diff-chg">
+Otherwise,
+if
+</ins><em><ins class="diff-chg">
+value
+</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">
+it
+represents
+a
+string
+value
+with
+no
+</ins><code><ins class="diff-chg">
+@language
+</ins></code>.<ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+term
+</ins></em><ins class="diff-chg">
+has
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+or
+</ins><em><ins class="diff-chg">
+term
+</ins></em><ins class="diff-chg">
+has
+no
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+and
+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">
+has
+no
+</ins><code><ins class="diff-chg">
+@language
+</ins></code>,<a class="tref internalDFN" title="term_rank" href="#dfn-term_rank"><ins class="diff-chg">
+term
+rank
+</ins></a><ins class="diff-chg">
+is
+</ins><code><ins class="diff-chg">
+3
+</ins></code>,<ins class="diff-chg">
+otherwise
+</ins><code><ins class="diff-chg">
+0
+</ins></code>.</li><li><ins class="diff-chg">
+Otherwise,
+</ins><em><ins class="diff-chg">
+value
+</ins></em><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+be
+a
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-chg">
+subject
+definition
+</ins></a>,<a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference"><ins class="diff-chg">
+subject
+reference
+</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">
+having
+a
+</ins><code><ins class="diff-chg">
+@value
+</ins></code>.<ol class="algorithm"><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">
+@value
+</ins></code><ins class="diff-chg">
+property,
+it
+must
+have
+either
+a
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+or
+a
+</ins><code><ins class="diff-chg">
+@language
+</ins></code>:<ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+has
+a
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+property
+matching
+a
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+coercion
+for
+</ins><em><ins class="diff-chg">
+term
+</ins></em>,<a class="tref internalDFN" title="term_rank" href="#dfn-term_rank"><ins class="diff-chg">
+term
+rank
+</ins></a><ins class="diff-chg">
+is
+</ins><code><ins class="diff-chg">
+3
+</ins></code>,<ins class="diff-chg">
+otherwise
+if
+</ins><em><ins class="diff-chg">
+term
+</ins></em><ins class="diff-chg">
+has
+no
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+coersion
+and
+no
+</ins><code><ins class="diff-chg">
+@language
+</ins></code>,<a class="tref internalDFN" title="term_rank" href="#dfn-term_rank"><ins class="diff-chg">
+term
+rank
+</ins></a><ins class="diff-chg">
+is
+</ins><code><ins class="diff-chg">
+1
+</ins></code>,<ins class="diff-chg">
+otherwise
+</ins><code><ins class="diff-chg">
+0
+</ins></code>.</li><li><ins class="diff-chg">
+Otherwise,
+if
+</ins><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">
+property
+matching
+a
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+definition
+for
+</ins><em><ins class="diff-chg">
+term
+</ins></em><ins class="diff-chg">
+(or
+</ins><em><ins class="diff-chg">
+term
+</ins></em><ins class="diff-chg">
+has
+no
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+definition
+and
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><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">
+matches
+the
+</ins><em><ins class="diff-chg">
+value
+</ins></em><code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+),
+</ins><a class="tref internalDFN" title="term_rank" href="#dfn-term_rank"><ins class="diff-chg">
+term
+rank
+</ins></a><ins class="diff-chg">
+is
+</ins><code><ins class="diff-chg">
+3
+</ins></code>,<ins class="diff-chg">
+otherwise
+if
+</ins><em><ins class="diff-chg">
+term
+</ins></em><ins class="diff-chg">
+has
+no
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+coersion
+and
+no
+</ins><code><ins class="diff-chg">
+@language
+</ins></code>,<a class="tref internalDFN" title="term_rank" href="#dfn-term_rank"><ins class="diff-chg">
+term
+rank
+</ins></a><ins class="diff-chg">
+is
+</ins><code><ins class="diff-chg">
+1
+</ins></code>,<ins class="diff-chg">
+otherwise
+</ins><code><ins class="diff-chg">
+0
+</ins></code>.</li></ol></li><li><ins class="diff-chg">
+Otherwise,
+if
+</ins><em><ins class="diff-chg">
+term
+</ins></em><ins class="diff-chg">
+has
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+coerced
+to
+</ins><code><ins class="diff-chg">
+@id
+</ins></code>,<a class="tref internalDFN" title="term_rank" href="#dfn-term_rank"><ins class="diff-chg">
+term
+rank
+</ins></a><ins class="diff-chg">
+is
+</ins><code><ins class="diff-chg">
+3
+</ins></code>,<ins class="diff-chg">
+otherwise
+if
+</ins><em><ins class="diff-chg">
+term
+</ins></em><ins class="diff-chg">
+has
+no
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+coersion
+and
+no
+</ins><code><ins class="diff-chg">
+@language
+</ins></code>,<a class="tref internalDFN" title="term_rank" href="#dfn-term_rank"><ins class="diff-chg">
+term
+rank
+</ins></a><ins class="diff-chg">
+is
+</ins><code><ins class="diff-chg">
+1
+</ins></code>,<ins class="diff-chg">
+otherwise
+</ins><code><ins class="diff-chg">
+0
+</ins></code>.</li></ol></li><li><ins class="diff-chg">
+Return
+</ins><a class="tref internalDFN" title="term_rank" href="#dfn-term_rank"><ins class="diff-chg">
+term
+rank
+</ins></a>.
+</li>
+</ol>
+</div>
+</div>
+<div id="value-expansion" class="section">
+<h3>
+<span class="secno">
+3.6
+</span>
+Value
+Expansion
+</h3>
+<p>
+Some
+values
+in
+JSON-LD
+can
+be
+expressed
+in
+a
+compact
+form.
+These
+values
+are
+required
+to
+be
+expanded
+at
+times
+when
+processing
+JSON-LD
+documents.
+</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
+<del class="diff-old">true
+,
+false
+or
+</del>
+<ins class="diff-chg">a
+</ins>
+<a class="tref internalDFN" title="number" href="#dfn-number">
+number
+<del class="diff-old">,
+</del>
+</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">
+is
+the
+target
+of
+typed
+literal
+coercion
+to
+</ins><code><ins class="diff-chg">
+xsd:integer
+</ins></code><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+xsd:double
+</ins></code>,
+expand
+the
+value
+<del class="diff-old">by
+adding
+a
+</del>
+<ins class="diff-chg">into
+an
+object
+with
+</ins>
+two
+<del class="diff-old">new
+</del>
+key-value
+pairs.
+The
+first
+key-value
+pair
+will
+be
+<code>
+@value
+</code>
+and
+the
+string
+representation
+of
+<em>
+value
+<del class="diff-old">.
+</del>
+</em>
+<ins class="diff-chg">as
+defined
+in
+the
+section
+</ins><a href="#data-round-tripping"><ins class="diff-chg">
+Data
+Round
+Tripping
+</ins></a>.
+The
+second
+key-value
+pair
+will
+be
+<code>
+<del class="diff-old">@type&gt;
+,
+</del>
+<ins class="diff-chg">@type
+</ins></code>
+and
+the
+<ins class="diff-new">associated
+coercion
+datatype
+</ins>
+expanded
+<del class="diff-old">version
+of
+xsd:boolean
+,
+xsd:integer
+,
+or
+xsd:double
+,
+depending
+on
+value
+.
+</del>
+<ins class="diff-chg">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
+</ins></a><ins class="diff-chg">
+rules.
+</ins>
+</li>
+<li>
+Otherwise,
+if
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+is
+<code>
+<ins class="diff-new">@graph
+</ins></code>,<ins class="diff-new">
+or
+</ins>
+the
+target
+of
+an
+<code>
+@id
+</code>
+coercion,
+expand
+the
+value
+<del class="diff-old">by
+adding
+</del>
+<ins class="diff-chg">into
+an
+object
+with
+</ins>
+a
+<del class="diff-old">new
+</del>
+key-value
+pair
+where
+the
+key
+is
+<code>
+@id
+</code>
+and
+the
+value
+is
+the
+expanded
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+according
+to
+the
+<a href="#iri-expansion">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+</a>
+rules.
+</li>
+<li>
+Otherwise,
+if
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+is
+the
+target
+of
+typed
+literal
+coercion,
+expand
+<em>
+value
+</em>
+<del class="diff-old">by
+adding
+two
+new
+</del>
+<ins class="diff-chg">into
+an
+object
+with
+</ins>
+key-value
+pairs.
+The
+first
+key-value
+pair
+will
+be
+<code>
+@value
+</code>
+and
+the
+unexpanded
+<del class="diff-old">value.
+</del>
+<em>
+<ins class="diff-chg">value
+</ins></em>.
+The
+second
+key-value
+pair
+will
+be
+<code>
+@type
+</code>
+and
+the
+associated
+coercion
+datatype
+expanded
+according
+to
+the
+<a href="#iri-expansion">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+</a>
+rules.
+</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
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">property
+</ins>
+</a>
+<del class="diff-old">has
+a
+@language
+,
+</del>
+<ins class="diff-chg">is
+not
+the
+target
+of
+typed
+literal
+coercion
+but
+target
+of
+language
+tagging,
+</ins>
+expand
+<em>
+value
+</em>
+<del class="diff-old">by
+adding
+</del>
+<ins class="diff-chg">into
+an
+object
+with
+</ins>
+two
+<del class="diff-old">new
+</del>
+key-value
+pairs.
+The
+first
+key-value
+pair
+will
+be
+<code>
+@value
+</code>
+and
+the
+unexpanded
+<del class="diff-old">value.
+</del>
+<em>
+<ins class="diff-chg">value
+</ins></em>.
+The
+second
+key-value
+pair
+will
+be
+<code>
+@language
+</code>
+and
+value
+of
+<del class="diff-old">@language
+</del>
+<ins class="diff-chg">the
+language
+tagging
+</ins>
+from
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+</li>
+<li>
+Otherwise,
+<em>
+value
+</em>
+is
+already
+expanded.
+</li>
+</ol>
+</div>
+<div id="value-compaction" class="section">
+<h3>
+<span class="secno">
+3.7
+</span>
+Value
+Compaction
+</h3>
+<p>
+Some
+values,
+such
+as
+IRIs
+and
+typed
+literals,
+may
+be
+expressed
+in
+an
+expanded
+form
+in
+JSON-LD.
+These
+values
+are
+required
+to
+be
+compacted
+at
+times
+when
+processing
+JSON-LD
+documents.
+</p>
+<p>
+The
+algorithm
+for
+compacting
+an
+expanded
+value
+<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
+the
+value
+may
+be
+expressed
+as
+<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="number" href="#dfn-number">
+number
+</a>,
+the
+value
+is
+the
+native
+representation
+of
+the
+<code>
+@value
+</code>
+value.
+</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><ins class="diff-new">
+is
+</ins><code><ins class="diff-new">
+@graph
+</ins></code>,<ins class="diff-new">
+the
+compacted
+value
+is
+the
+value
+associated
+with
+the
+</ins><code><ins class="diff-new">
+@id
+</ins></code><ins class="diff-new">
+key,
+processed
+according
+to
+the
+</ins><a href="#iri-compaction"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+Compaction
+</ins></a><ins class="diff-new">
+steps.
+</ins></li><li>
+Otherwise,
+if
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+contains
+a
+coercion
+target
+for
+the
+key
+that
+matches
+the
+expression
+of
+the
+value,
+compact
+the
+value
+using
+the
+following
+steps:
+<ol class="algorithm">
+<li>
+If
+the
+coercion
+target
+is
+an
+<code>
+@id
+</code>,
+the
+compacted
+value
+is
+the
+value
+associated
+with
+the
+<code>
+@id
+</code>
+key,
+processed
+according
+to
+the
+<a href="#iri-compaction">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Compaction
+</a>
+steps.
+</li>
+<li>
+If
+the
+coercion
+target
+is
+a
+typed
+literal,
+the
+compacted
+value
+is
+the
+value
+associated
+with
+the
+<code>
+@value
+</code>
+key.
+</li>
+</ol>
+</li>
+<li>
+Otherwise,
+if
+<em>
+value
+</em>
+contains
+an
+<code>
+@id
+</code>
+key,
+the
+compacted
+value
+is
+<em>
+value
+</em>
+with
+the
+value
+of
+<code>
+@id
+</code>
+processed
+according
+to
+the
+<a href="#iri-compaction">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Compaction
+</a>
+steps.
+</li>
+<li>
+Otherwise,
+if
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+contains
+a
+<code>
+@language
+</code>,
+which
+matches
+the
+<code>
+@language
+</code>
+of
+the
+value,
+or
+the
+value
+has
+only
+a
+<code>
+@value
+</code>
+key,
+the
+compacted
+value
+is
+the
+value
+associated
+with
+the
+<code>
+@value
+</code>
+key.
+</li>
+<li>
+Otherwise,
+if
+the
+value
+contains
+a
+<code>
+@type
+</code>
+key,
+the
+compacted
+value
+is
+<em>
+value
+</em>
+with
+the
+<code>
+@type
+</code>
+value
+processed
+according
+to
+the
+<a href="#iri-compaction">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Compaction
+</a>
+steps.
+</li>
+<li>
+Otherwise,
+the
+value
+is
+not
+modified.
+</li>
+</ol>
+</div>
+<div id="generate-blank-node-identifier" class="section">
+<h3>
+<span class="secno">
+3.8
+</span>
+<ins class="diff-new">Generate
+Blank
+Node
+Identifier
+</ins></h3><p><ins class="diff-new">
+This
+algorithm
+is
+used
+by
+the
+</ins><a href="#framing-algorithm"><ins class="diff-new">
+Framing
+Algorithm
+</ins></a><ins class="diff-new">
+and
+</ins><a href="#convert-from-rdf-algorithm"><ins class="diff-new">
+Convert
+From
+RDF
+Algorithm
+</ins></a><ins class="diff-new">
+to
+deterministicly
+name
+</ins><a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-new">
+blank
+node
+</ins></a><ins class="diff-new">
+identifiers.
+It
+uses
+a
+</ins><em><ins class="diff-new">
+identifier
+map
+</ins></em><ins class="diff-new">
+and
+</ins><em><ins class="diff-new">
+prefix
+</ins></em><ins class="diff-new">
+and
+takes
+a
+possibly
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-new">
+null
+</ins></a><ins class="diff-new">
+identifier
+and
+returns
+a
+new
+identifier
+based
+on
+</ins><em><ins class="diff-new">
+prefix
+</ins></em>.</p><p><ins class="diff-new">
+The
+variable
+</ins><em><ins class="diff-new">
+next
+identifier
+</ins></em><ins class="diff-new">
+is
+initialized
+to
+</ins><em><ins class="diff-new">
+prefix
+</ins></em><ins class="diff-new">
+appended
+with
+</ins><code><ins class="diff-new">
+0
+</ins></code>.</p><ol class="algorithm"><li><ins class="diff-new">
+If
+the
+old
+identifier
+is
+not
+null
+and
+is
+in
+</ins><em><ins class="diff-new">
+identifier
+map
+</ins></em><ins class="diff-new">
+return
+the
+mapped
+identifier.
+</ins></li><li><ins class="diff-new">
+Otherwise,
+if
+old
+identifier
+is
+not
+null,
+create
+a
+new
+entry
+in
+</ins><em><ins class="diff-new">
+identifier
+map
+</ins></em><ins class="diff-new">
+initialized
+to
+the
+current
+value
+of
+</ins><em><ins class="diff-new">
+next
+identifier
+</ins></em>.<ins class="diff-new">
+Increment
+</ins><em><ins class="diff-new">
+next
+identifier
+</ins></em><ins class="diff-new">
+by
+adding
+one
+to
+the
+integer
+suffix.
+Return
+the
+mapped
+identifier.
+</ins></li><li><ins class="diff-new">
+Otherwise,
+increment
+</ins><em><ins class="diff-new">
+next
+identifier
+</ins></em><ins class="diff-new">
+by
+adding
+one
+to
+the
+integer
+suffix
+and
+return
+its
+original
+value.
+</ins></li></ol></div><div id="expansion" class="section"><h3><span class="secno"><ins class="diff-new">
+3.9
+</ins></span>
+Expansion
+</h3>
+<p>
+Expansion
+is
+the
+process
+of
+taking
+a
+JSON-LD
+document
+and
+applying
+a
+context
+such
+that
+all
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>,
+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
+<a href="#framing">
+Framing
+<del class="diff-old">or
+Normalization
+</del>
+</a>.
+</p>
+<p>
+For
+example,
+assume
+the
+following
+JSON-LD
+input
+document:
+</p>
+<pre class="example">{
+   &quot;@context&quot;:
+   {
+      &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+      &quot;homepage&quot;: {
+        &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+        &quot;@type&quot;, &quot;@id&quot;
+      }
+   },
+   &quot;name&quot;: &quot;Manu Sporny&quot;,
+   &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;
+}
+</pre>
+<p>
+Running
+the
+JSON-LD
+Expansion
+algorithm
+against
+the
+JSON-LD
+input
+document
+provided
+above
+would
+result
+in
+the
+following
+output:
+</p>
+<pre class="example">{
+   &quot;http://xmlns.com/foaf/0.1/name&quot;: &quot;Manu Sporny&quot;,
+   &quot;http://xmlns.com/foaf/0.1/homepage&quot;: {
+      &quot;@id&quot;: &quot;http://manu.sporny.org/&quot;
+   }
+}
+</pre>
+<div id="expansion-algorithm" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">3.8.1
+</del>
+<ins class="diff-chg">3.9.1
+</ins>
+</span>
+Expansion
+Algorithm
+</h4>
+<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
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">an
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">element
+</ins>
+</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
+<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
+initial
+context
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+is
+set
+to
+<del class="diff-old">nil,
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins></a>,
+and
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+is
+set
+to
+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>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+is
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>,
+process
+each
+<del class="diff-old">item
+</del>
+<ins class="diff-chg">entry
+</ins>
+in
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+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>.
+<ins class="diff-new">If
+has
+a
+</ins><code><ins class="diff-new">
+@container
+</ins></code><ins class="diff-new">
+set
+to
+</ins><code><ins class="diff-new">
+@list
+</ins></code><ins class="diff-new">
+and
+any
+entry
+in
+</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"><ins class="diff-new">
+array
+</ins></a>,<ins class="diff-new">
+or
+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">
+containing
+a
+</ins><code><ins class="diff-new">
+@list
+</ins></code><ins class="diff-new">
+property,
+throw
+an
+exception,
+as
+lists
+of
+lists
+are
+not
+allowed.
+If
+the
+expanded
+entry
+is
+null,
+drop
+it.
+If
+it's
+an
+array,
+merge
+it's
+entries
+with
+</ins><em><ins class="diff-new">
+element
+</ins></em><ins class="diff-new">
+'s
+entries.
+</ins>
+</li>
+<li>
+Otherwise,
+if
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+is
+an
+object
+<ol class="algorithm">
+<li>
+<del class="diff-old">Update
+</del>
+<ins class="diff-chg">If
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+has
+a
+</ins><code><ins class="diff-chg">
+@context
+</ins></code><ins class="diff-chg">
+property,
+update
+</ins>
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+according
+to
+the
+steps
+outlined
+in
+<del class="diff-old">the
+context
+</del>
+<a href="#context-processing">
+<ins class="diff-chg">Context
+Processing
+</ins>
+</a>
+<del class="diff-old">section
+</del>
+and
+remove
+<del class="diff-old">it
+from
+</del>
+the
+<del class="diff-old">expanded
+result.
+</del>
+<code>
+<ins class="diff-chg">@context
+</ins></code><ins class="diff-chg">
+property.
+</ins>
+</li>
+<li>
+<del class="diff-old">For
+</del>
+<ins class="diff-chg">Then,
+proceed
+and
+process
+</ins>
+each
+<del class="diff-old">key
+</del>
+<em>
+<ins class="diff-chg">property
+</ins></em>
+and
+<em>
+value
+</em>
+in
+<em>
+<del class="diff-old">value
+:
+</del>
+<ins class="diff-chg">element
+</ins></em><ins class="diff-chg">
+as
+follows:
+</ins>
+<ol class="algorithm">
+<li>
+<ins class="diff-new">Remove
+</ins><em><ins class="diff-new">
+property
+</ins></em><ins class="diff-new">
+from
+</ins><em><ins class="diff-new">
+element
+</ins></em>,<ins class="diff-new">
+expand
+</ins><em><ins class="diff-new">
+property
+</ins></em><ins class="diff-new">
+according
+to
+the
+steps
+outlined
+in
+</ins><a href="#iri-expansion"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+Expansion
+</ins></a>.<ins class="diff-new">
+Set
+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">
+to
+the
+original
+un-expanded
+</ins><em><ins class="diff-new">
+property
+</ins></em><ins class="diff-new">
+if
+</ins><em><ins class="diff-new">
+property
+</ins></em><ins class="diff-new">
+is
+not
+a
+</ins><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-new">
+keyword
+</ins></a>.</li><li>
+If
+<em>
+<ins class="diff-new">property
+</ins></em><ins class="diff-new">
+does
+not
+expand
+to
+a
+keyword
+or
+an
+</ins><a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri"><ins class="diff-new">
+absolute
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr></a><ins class="diff-new">
+(i.e.,
+it
+doesn't
+contain
+a
+colon),
+continue
+with
+</ins>
+the
+<del class="diff-old">key
+</del>
+<ins class="diff-chg">next
+property
+from
+</ins><em><ins class="diff-chg">
+element
+</ins></em>.</li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+value
+</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">
+and
+</ins><em><ins class="diff-chg">
+property
+</ins></em>
+is
+<ins class="diff-new">not
+</ins>
+<code>
+<del class="diff-old">@id
+or
+</del>
+<ins class="diff-chg">@value
+</ins></code>,<ins class="diff-chg">
+continue
+with
+the
+next
+property
+from
+</ins><em><ins class="diff-chg">
+element
+</ins></em>.</li><li><ins class="diff-chg">
+If
+the
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+is
+</ins>
+<code>
+<del class="diff-old">@type
+</del>
+<ins class="diff-chg">@id
+</ins>
+</code>
+<del class="diff-old">and
+</del>
+the
+<em>
+value
+<del class="diff-old">is
+</del>
+</em>
+<em class="rfc2119" title="must">
+<ins class="diff-chg">must
+</ins></em><ins class="diff-chg">
+be
+</ins>
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+<del class="diff-old">,
+expand
+</del>
+</a>.
+<ins class="diff-chg">Expand
+</ins>
+the
+<em>
+value
+</em>
+according
+to
+<a href="#iri-expansion">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+</a>.
+</li>
+<li>
+Otherwise,
+if
+the
+<del class="diff-old">key
+</del>
+<em>
+<ins class="diff-chg">property
+</ins></em>
+is
+<code>
+<del class="diff-old">@value
+,
+the
+</del>
+<ins class="diff-chg">@type
+</ins></code>:<ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><em>
+value
+<del class="diff-old">must
+</del>
+</em>
+<del class="diff-old">be
+</del>
+<ins class="diff-chg">is
+</ins>
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+<del class="diff-old">and
+is
+not
+subject
+</del>
+</a>,
+<ins class="diff-chg">expand
+according
+</ins>
+to
+<del class="diff-old">further
+expansion.
+</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>
+Otherwise,
+if
+<del class="diff-old">the
+key
+</del>
+<em>
+<ins class="diff-chg">value
+</ins></em>
+is
+<del class="diff-old">not
+</del>
+a
+<del class="diff-old">keyword
+</del>
+<a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">
+<ins class="diff-chg">subject
+reference
+</ins>
+</a>,
+<del class="diff-old">expand
+</del>
+the
+<del class="diff-old">key
+according
+to
+</del>
+<ins class="diff-chg">expanded
+value
+is
+the
+result
+of
+performing
+</ins>
+<a href="#iri-expansion">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+</a>
+<del class="diff-old">rules
+and
+set
+as
+active
+property
+.
+</del>
+<ins class="diff-chg">on
+the
+value
+of
+</ins><code><ins class="diff-chg">
+@id
+</ins></code>.
+</li>
+<li>
+<del class="diff-old">If
+the
+</del>
+<ins class="diff-chg">Otherwise,
+if
+</ins><em>
+value
+</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">
+it
+must
+be
+empty
+(used
+for
+</ins><a href="#framing"><ins class="diff-new">
+Framing
+</ins></a><ins class="diff-new">
+).
+</ins></li><li><ins class="diff-new">
+Otherwise,
+if
+</ins><em><ins class="diff-new">
+value
+</ins></em>
+is
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>,
+<del class="diff-old">and
+active
+property
+</del>
+<ins class="diff-chg">all
+elements
+must
+be
+either
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins>
+</a>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">or
+</ins><a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">
+subject
+<del class="diff-old">to
+@list
+expansion,
+replace
+the
+</del>
+<ins class="diff-chg">reference
+</ins></a>.<ins class="diff-chg">
+Expand
+</ins><em>
+value
+<del class="diff-old">with
+a
+new
+key-value
+key
+where
+</del>
+</em>
+<ins class="diff-chg">for
+each
+of
+it's
+entries
+using
+</ins>
+the
+<del class="diff-old">key
+</del>
+<ins class="diff-chg">previous
+three
+steps.
+</ins></li></ol></li><li><ins class="diff-chg">
+Otherwise,
+if
+the
+</ins><em><ins class="diff-chg">
+property
+</ins></em>
+is
+<code>
+<del class="diff-old">@list
+</del>
+<ins class="diff-chg">@value
+</ins></code><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+@language
+</ins>
+</code>
+<del class="diff-old">and
+value
+set
+to
+the
+current
+value.
+If
+</del>
+the
+<em>
+value
+<del class="diff-old">is
+</del>
+</em>
+<em class="rfc2119" title="must not">
+<ins class="diff-chg">must
+not
+</ins></em><ins class="diff-chg">
+be
+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">
+or
+</ins>
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+<del class="diff-old">,
+process
+each
+item
+in
+</del>
+</a>.
+</li>
+<li>
+<ins class="diff-chg">Otherwise,
+if
+</ins>
+the
+<del class="diff-old">array
+</del>
+<em>
+<ins class="diff-chg">property
+</ins></em><ins class="diff-chg">
+is
+</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">
+@graph
+</ins></code>,<ins class="diff-chg">
+expand
+</ins><em><ins class="diff-chg">
+value
+</ins></em>
+recursively
+using
+this
+algorithm,
+passing
+copies
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+and
+<em>
+active
+property
+<del class="diff-old">.
+</del>
+</em>.
+If
+the
+<ins class="diff-new">expanded
+</ins><em>
+value
+</em>
+is
+<ins class="diff-new">not
+</ins>
+an
+<del class="diff-old">object,
+process
+the
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a>,<ins class="diff-chg">
+convert
+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
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+is
+</ins><code><ins class="diff-chg">
+@list
+</ins></code><ins class="diff-chg">
+and
+any
+entry
+in
+</ins><em><ins class="diff-chg">
+value
+</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
+</ins>
+object
+</a>
+<ins class="diff-new">containing
+an
+</ins><code><ins class="diff-new">
+@list
+</ins></code><ins class="diff-new">
+property,
+throw
+an
+exception,
+as
+lists
+of
+lists
+are
+not
+supported.
+</ins></li><li><ins class="diff-new">
+Otherwise,
+expand
+</ins><em><ins class="diff-new">
+value
+</ins></em>
+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>
+<del class="diff-old">Otherwise,
+expand
+</del>
+<ins class="diff-chg">If
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+is
+not
+a
+keyword
+and
+</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><code><ins class="diff-chg">
+@container
+</ins></code><code><ins class="diff-chg">
+@list
+</ins></code><ins class="diff-chg">
+and
+</ins>
+the
+<ins class="diff-new">expanded
+</ins><em>
+value
+<del class="diff-old">according
+</del>
+</em>
+<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">
+convert
+</ins><em><ins class="diff-chg">
+value
+</ins></em>
+to
+<ins class="diff-new">an
+</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-new">
+object
+</ins></a><ins class="diff-new">
+with
+an
+</ins><code><ins class="diff-new">
+@list
+</ins></code><ins class="diff-new">
+property
+whose
+value
+is
+set
+to
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+(unless
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+is
+already
+in
+that
+form).
+</ins></li><li><ins class="diff-new">
+Convert
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+to
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-new">
+array
+</ins></a><ins class="diff-new">
+form
+unless
+</ins><em><ins class="diff-new">
+value
+</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">
+or
+</ins><em><ins class="diff-new">
+property
+</ins></em><ins class="diff-new">
+is
+</ins><code><ins class="diff-new">
+@id
+</ins></code>,<code><ins class="diff-new">
+@type
+</ins></code>,<code><ins class="diff-new">
+@value
+</ins></code>,<ins class="diff-new">
+or
+</ins><code><ins class="diff-new">
+@language
+</ins></code>.</li><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+is
+not
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-new">
+null
+</ins></a>,<ins class="diff-new">
+either
+merge
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+into
+an
+existing
+</ins><em><ins class="diff-new">
+property
+</ins></em><ins class="diff-new">
+property
+of
+</ins><em><ins class="diff-new">
+element
+</ins></em><ins class="diff-new">
+or
+create
+a
+new
+</ins><em><ins class="diff-new">
+property
+</ins></em><ins class="diff-new">
+property
+with
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+as
+value.
+</ins></li></ol></li><li><ins class="diff-new">
+If
+</ins>
+the
+<del class="diff-old">Value
+Expansion
+</del>
+<ins class="diff-chg">processed
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+has
+an
+</ins><code><ins class="diff-chg">
+@value
+</ins></code><ins class="diff-chg">
+property
+</ins><ol class="algorithm"><li><em><ins class="diff-chg">
+element
+</ins></em><em class="rfc2119" title="must not"><ins class="diff-chg">
+must
+not
+</ins></em><ins class="diff-chg">
+have
+more
+than
+one
+other
+property,
+which
+can
+either
+be
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+with
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins>
+</a>
+<del class="diff-old">rules,
+passing
+active
+</del>
+<ins class="diff-chg">value.
+</ins></li><li><ins class="diff-chg">
+if
+</ins><code><ins class="diff-chg">
+@value
+</ins></code><ins class="diff-chg">
+is
+the
+only
+</ins>
+property
+<del class="diff-old">.
+</del>
+<ins class="diff-chg">or
+the
+value
+of
+</ins><code><ins class="diff-chg">
+@value
+</ins></code><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><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+with
+the
+value
+of
+</ins><code><ins class="diff-chg">
+@value
+</ins></code>.
+</li>
+</ol>
+</li>
+<li>
+<del class="diff-old">Remove
+</del>
+<ins class="diff-chg">Otherwise,
+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">
+property
+and
+it's
+value
+is
+not
+in
+</ins>
+the
+<del class="diff-old">context
+from
+</del>
+<ins class="diff-chg">form
+of
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a>,<ins class="diff-chg">
+convert
+it
+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">
+@set
+</ins></code><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+@list
+</ins></code><ins class="diff-chg">
+property,
+it
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+be
+</ins>
+the
+<del class="diff-old">object.
+</del>
+<ins class="diff-chg">only
+property.
+Set
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+to
+the
+value
+of
+</ins><code><ins class="diff-chg">
+@set
+</ins></code><ins class="diff-chg">
+;
+leave
+</ins><code><ins class="diff-chg">
+@list
+</ins></code><ins class="diff-chg">
+untouched.
+</ins></li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+has
+just
+a
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+property,
+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>
+</ol>
+</li>
+<li>
+Otherwise,
+expand
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+according
+to
+the
+<a href="#value-expansion">
+Value
+Expansion
+</a>
+rules,
+passing
+<ins class="diff-new">copies
+of
+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">
+and
+</ins>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>.
+</li>
+</ol>
+<p>
+<ins class="diff-new">If,
+after
+the
+algorithm
+outlined
+above
+is
+run,
+the
+resulting
+</ins><em><ins class="diff-new">
+element
+</ins></em><ins class="diff-new">
+is
+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">
+with
+just
+a
+</ins><code><ins class="diff-new">
+@graph
+</ins></code><ins class="diff-new">
+property,
+</ins><em><ins class="diff-new">
+element
+</ins></em><ins class="diff-new">
+is
+set
+to
+the
+value
+of
+</ins><code><ins class="diff-new">
+@graph
+</ins></code><ins class="diff-new">
+'s
+value.
+Finally,
+if
+</ins><em><ins class="diff-new">
+element
+</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">
+it
+is
+wrapped
+into
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-new">
+array
+</ins></a>.</p>
+</div>
+</div>
+<div id="compaction" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">3.9
+</del>
+<ins class="diff-chg">3.10
+</ins>
+</span>
+Compaction
+</h3>
+<p>
+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>
+<pre class="example">{
+  &quot;http://xmlns.com/foaf/0.1/name&quot;: &quot;Manu Sporny&quot;,
+  &quot;http://xmlns.com/foaf/0.1/homepage&quot;: {
+    &quot;@id&quot;: &quot;http://manu.sporny.org/&quot;
+  }
+}
+</pre>
+<p>
+Additionally,
+assume
+the
+following
+developer-supplied
+JSON-LD
+context:
+</p>
+<pre class="example">{
+<del class="diff-old">  &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+  &quot;homepage&quot;: {
+    &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+    &quot;@type&quot;: &quot;@id&quot;
+</del>
+<ins class="diff-chg">  &quot;@context&quot;: {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;homepage&quot;: {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+</ins>
+  }
+}
+</pre>
+<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>
+<pre class="example">{
+  &quot;@context&quot;: {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;homepage&quot;: {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  },
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;
+}
+</pre>
+<p>
+The
+compaction
+algorithm
+also
+enables
+the
+developer
+to
+map
+any
+expanded
+format
+into
+an
+application-specific
+compacted
+format.
+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.
+</p>
+<div id="compaction-algorithm" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">3.9.1
+</del>
+<ins class="diff-chg">3.10.1
+</ins>
+</span>
+Compaction
+Algorithm
+</h4>
+<p>
+The
+algorithm
+takes
+<del class="diff-old">two
+</del>
+<ins class="diff-chg">three
+</ins>
+input
+variables:
+an
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-new">active
+context
+</ins></a>,<ins class="diff-new">
+an
+</ins>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>,
+and
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">an
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">element
+</ins>
+</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">
+<ins class="diff-new">active
+context
+</ins></a><ins class="diff-new">
+is
+set
+to
+the
+result
+of
+performing
+</ins><a href="#context-processing"><ins class="diff-new">
+Context
+Processing
+</ins></a><ins class="diff-new">
+on
+the
+passed
+</ins><em><ins class="diff-new">
+context
+</ins></em>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+is
+set
+to
+<del class="diff-old">nil,
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins></a>,
+and
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">element
+</ins>
+</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>.
+This
+removes
+any
+existing
+context
+to
+allow
+the
+given
+<del class="diff-old">context
+to
+be
+cleanly
+applied.
+The
+</del>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+to
+<del class="diff-old">the
+given
+context.
+</del>
+<ins class="diff-chg">be
+cleanly
+applied.
+</ins>
+</p>
+<ol class="algorithm">
+<li>
+If
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+is
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>,
+process
+each
+<del class="diff-old">item
+</del>
+<ins class="diff-chg">entry
+</ins>
+in
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+recursively
+using
+this
+algorithm,
+passing
+a
+copy
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-new">active
+context
+</ins></a><ins class="diff-new">
+and
+the
+</ins>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>.
+<ins class="diff-new">If
+</ins><em><ins class="diff-new">
+element
+</ins></em><ins class="diff-new">
+has
+a
+single
+item,
+the
+compacted
+value
+is
+that
+item;
+otherwise
+the
+compacted
+value
+is
+</ins><em><ins class="diff-new">
+element
+</ins></em>.
+</li>
+<li>
+Otherwise,
+if
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+is
+an
+<del class="diff-old">object,
+</del>
+<ins class="diff-chg">object:
+</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><ins class="diff-chg">
+@value
+</ins></code><ins class="diff-chg">
+property
+or
+element
+is
+a
+</ins><a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference"><ins class="diff-chg">
+subject
+reference
+</ins></a>,<ins class="diff-chg">
+return
+the
+result
+of
+performing
+</ins><a href="#value-compaction"><ins class="diff-chg">
+Value
+Compaction
+</ins></a><ins class="diff-chg">
+on
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+using
+</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">
+Otherwise,
+if
+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><code><ins class="diff-chg">
+@container
+</ins></code><ins class="diff-chg">
+mapping
+to
+</ins><code><ins class="diff-chg">
+@list
+</ins></code><ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+has
+a
+corresponding
+</ins><code><ins class="diff-chg">
+@list
+</ins></code><ins class="diff-chg">
+property,
+recursively
+compact
+that
+property's
+value
+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><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
+array
+and
+removing
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a><ins class="diff-chg">
+values.
+Return
+either
+the
+result
+as
+an
+array,
+as
+an
+object
+with
+a
+key
+of
+</ins><code><ins class="diff-chg">
+@list
+</ins></code><ins class="diff-chg">
+(or
+appropriate
+alias
+from
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+).
+</ins></li><li><ins class="diff-chg">
+Otherwise,
+construct
+</ins><em><ins class="diff-chg">
+output
+</ins></em><ins class="diff-chg">
+as
+a
+new
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+used
+</ins>
+for
+<ins class="diff-new">returning
+the
+result
+of
+compacting
+</ins><em><ins class="diff-new">
+element
+</ins></em>.<ins class="diff-new">
+For
+</ins>
+each
+<del class="diff-old">key
+</del>
+<em>
+<ins class="diff-chg">property
+</ins></em>
+and
+<em>
+value
+</em>
+in
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">element:
+</ins>
+</em>
+<ol class="algorithm">
+<li>
+If
+<del class="diff-old">the
+key
+</del>
+<em>
+<ins class="diff-chg">property
+</ins></em>
+is
+<code>
+@id
+</code>
+or
+<code>
+@type
+</code>
+<ol class="algorithm">
+<li>
+<del class="diff-old">If
+</del>
+<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
+</ins>
+the
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">result
+</ins>
+of
+<del class="diff-old">the
+key
+</del>
+<ins class="diff-chg">performing
+</ins><a href="#iri-compaction"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+Compaction
+</ins></a><ins class="diff-chg">
+on
+</ins><em><ins class="diff-chg">
+property
+</ins></em>.</li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+value
+</ins></em>
+is
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>,
+the
+compacted
+<em>
+value
+</em>
+is
+the
+result
+of
+performing
+<a href="#iri-compaction">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Compaction
+</a>
+on
+<del class="diff-old">the
+value.
+</del>
+<em>
+<ins class="diff-chg">value
+</ins></em>.
+</li>
+<li>
+Otherwise,
+<del class="diff-old">the
+compacted
+</del>
+<em>
+value
+<del class="diff-old">is
+the
+result
+of
+performing
+this
+algorithm
+</del>
+</em>
+<em class="rfc2119" title="must">
+<ins class="diff-chg">must
+</ins></em><ins class="diff-chg">
+be
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a>.<ins class="diff-chg">
+Perform
+</ins><a href="#iri-compaction"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+Compaction
+</ins></a>
+on
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">every
+entry
+of
+</ins><em>
+value
+<del class="diff-old">with
+the
+current
+</del>
+</em>.
+<ins class="diff-chg">If
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+contains
+just
+one
+entry,
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+is
+set
+to
+that
+entry.
+</ins></li><li><ins class="diff-chg">
+Add
+</ins>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+<del class="diff-old">.
+</del>
+</a>
+<ins class="diff-chg">and
+the
+expanded
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+output
+</ins></em>.
+</li>
+</ol>
+</li>
+<li>
+<del class="diff-old">Otherwise:
+</del>
+<ins class="diff-chg">Otherwise,
+</ins><em><ins class="diff-chg">
+value
+</ins></em><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+be
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a>.</li>
+<li>
+If
+<del class="diff-old">the
+key
+</del>
+<em>
+<ins class="diff-chg">value
+</ins></em>
+is
+<del class="diff-old">not
+a
+keyword
+,
+set
+as
+</del>
+<ins class="diff-chg">empty:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+Set
+</ins>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+<del class="diff-old">and
+compact
+according
+</del>
+to
+<ins class="diff-new">the
+result
+of
+performing
+</ins>
+<a href="#iri-compaction">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Compaction
+<del class="diff-old">.
+</del>
+</a>
+<ins class="diff-chg">on
+</ins><em><ins class="diff-chg">
+property
+</ins></em>.
+</li>
+<li>
+<del class="diff-old">If
+the
+value
+is
+an
+object
+If
+the
+value
+contains
+only
+</del>
+<ins class="diff-chg">Create
+</ins>
+an
+<del class="diff-old">@id
+key
+or
+the
+</del>
+<ins class="diff-chg">entry
+in
+</ins><em><ins class="diff-chg">
+output
+</ins></em><ins class="diff-chg">
+for
+</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
+</ins><em>
+value
+<del class="diff-old">contains
+a
+@value
+key,
+the
+compacted
+</del>
+</em>.
+</li>
+</ol>
+</li>
+<li>
+<ins class="diff-chg">For
+each
+</ins><em><ins class="diff-chg">
+item
+</ins></em><ins class="diff-chg">
+in
+</ins><em>
+value
+<del class="diff-old">is
+</del>
+</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><ins class="diff-chg">
+to
+</ins>
+the
+result
+of
+performing
+<del class="diff-old">Value
+</del>
+<a href="#iri-compaction">
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr>
+Compaction
+</a>
+<del class="diff-old">on
+</del>
+<ins class="diff-chg">for
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+item
+</ins></em><ins class="diff-chg">
+using
+</ins>
+the
+<del class="diff-old">value.
+</del>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-chg">active
+context
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+if
+the
+value
+contains
+only
+</del>
+<ins class="diff-chg">Compact
+</ins><em><ins class="diff-chg">
+item
+</ins></em><ins class="diff-chg">
+by
+recursively
+performing
+this
+algorithm
+passing
+</ins>
+a
+<del class="diff-old">@list
+key,
+</del>
+<ins class="diff-chg">copy
+of
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>
+and
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+<del class="diff-old">is
+subject
+to
+list
+coercion,
+the
+compacted
+value
+is
+the
+result
+of
+performing
+this
+algorithm
+on
+that
+value.
+</del>
+</a>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+</del>
+<ins class="diff-chg">If
+an
+entry
+already
+exists
+in
+</ins><em><ins class="diff-chg">
+output
+</ins></em><ins class="diff-chg">
+for
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a>,<ins class="diff-chg">
+convert
+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
+necessary,
+and
+append
+</ins>
+the
+compacted
+<em>
+value
+<del class="diff-old">is
+the
+result
+of
+performing
+this
+algorithm
+on
+the
+value.
+</del>
+</em>.
+</li>
+<li>
+Otherwise,
+if
+the
+<ins class="diff-new">compacted
+</ins><em>
+value
+</em>
+is
+<ins class="diff-new">not
+</ins>
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+<del class="diff-old">,
+the
+compacted
+</del>
+</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><ins class="diff-chg">
+has
+a
+</ins><code><ins class="diff-chg">
+@container
+</ins></code><ins class="diff-chg">
+mapping
+to
+</ins><code><ins class="diff-chg">
+@set
+</ins></code>,<ins class="diff-chg">
+create
+an
+entry
+in
+</ins><em><ins class="diff-chg">
+output
+</ins></em><ins class="diff-chg">
+for
+</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
+</ins><em>
+value
+<del class="diff-old">is
+the
+result
+of
+performing
+this
+algorithm
+on
+the
+value.
+</del>
+</em>
+<ins class="diff-chg">as
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a>.
+</li>
+<li>
+Otherwise,
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">create
+an
+entry
+in
+</ins><em><ins class="diff-chg">
+output
+</ins></em><ins class="diff-chg">
+for
+</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
+</ins><em>
+value
+<del class="diff-old">is
+already
+compacted.
+</del>
+</em>.
+</li>
+</ol>
+</li>
+</ol>
+</li>
+</ol>
+</li>
+<li>
+Otherwise,
+<ins class="diff-new">return
+</ins><em><ins class="diff-new">
+element
+</ins></em><ins class="diff-new">
+as
+</ins>
+the
+compacted
+<del class="diff-old">value
+is
+the
+</del>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>.
+<div class="issue">
+<ins class="diff-new">Perhaps
+this
+should
+also
+call
+</ins><a href="#value-compaction"><ins class="diff-new">
+Value
+Compaction
+</ins></a><ins class="diff-new">
+on
+native
+types
+and
+strings,
+which
+could
+consolodate
+potential
+transformation
+in
+one
+place.
+</ins></div>
+</li>
+</ol>
+<p>
+<ins class="diff-new">If,
+after
+the
+algorithm
+outlined
+above
+is
+run,
+the
+resulting
+</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"><ins class="diff-new">
+array
+</ins></a>,<ins class="diff-new">
+put
+</ins><em><ins class="diff-new">
+element
+</ins></em><ins class="diff-new">
+into
+the
+</ins><code><ins class="diff-new">
+@graph
+</ins></code><ins class="diff-new">
+property
+of
+a
+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">
+and
+then
+set
+</ins><em><ins class="diff-new">
+element
+</ins></em><ins class="diff-new">
+to
+that
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a>.<ins class="diff-new">
+Finally,
+add
+a
+</ins><code><ins class="diff-new">
+@context
+</ins></code><ins class="diff-new">
+property
+to
+</ins><em><ins class="diff-new">
+element
+</ins></em><ins class="diff-new">
+and
+set
+it
+to
+the
+initially
+passed
+</ins><em><ins class="diff-new">
+context
+</ins></em>.</p>
+</div>
+</div>
+<div id="framing" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">3.10
+</del>
+<ins class="diff-chg">3.11
+</ins>
+</span>
+Framing
+</h3>
+<p>
+JSON-LD
+Framing
+allows
+developers
+to
+query
+by
+example
+and
+force
+a
+specific
+tree
+layout
+to
+a
+JSON-LD
+document.
+</p>
+<p>
+A
+JSON-LD
+document
+is
+a
+representation
+of
+a
+directed
+graph.
+A
+single
+directed
+graph
+can
+have
+many
+different
+serializations,
+each
+expressing
+exactly
+the
+same
+information.
+Developers
+typically
+work
+with
+trees,
+represented
+as
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+s.
+While
+mapping
+a
+graph
+to
+a
+tree
+can
+be
+done,
+the
+layout
+of
+the
+end
+result
+must
+be
+specified
+in
+advance.
+A
+<dfn title="frame" id="dfn-frame">
+Frame
+</dfn>
+can
+be
+used
+by
+a
+developer
+on
+a
+JSON-LD
+document
+to
+specify
+a
+deterministic
+layout
+for
+a
+graph.
+</p>
+<p>
+Framing
+is
+the
+process
+of
+taking
+a
+JSON-LD
+document,
+which
+expresses
+a
+graph
+of
+information,
+and
+applying
+a
+specific
+graph
+layout
+(called
+a
+<a class="tref internalDFN" title="frame" href="#dfn-frame">
+Frame
+</a>
+).
+</p>
+<p>
+<del class="diff-old">The
+JSON-LD
+document
+below
+expresses
+a
+library,
+a
+book
+and
+a
+chapter:
+{
+  &quot;@context&quot;: {
+    &quot;Book&quot;:         &quot;http://example.org/vocab#Book&quot;,
+    &quot;Chapter&quot;:      &quot;http://example.org/vocab#Chapter&quot;,
+    &quot;contains&quot;:     {
+      &quot;@id&quot;: &quot;http://example.org/vocab#contains&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+    &quot;creator&quot;:      &quot;http://purl.org/dc/terms/creator&quot;,
+    &quot;description&quot;:  &quot;http://purl.org/dc/terms/description&quot;,
+    &quot;Library&quot;:      &quot;http://example.org/vocab#Library&quot;,
+    &quot;title&quot;:        &quot;http://purl.org/dc/terms/title&quot;
+  },
+  &quot;@id&quot;:
+  [{
+    &quot;@id&quot;: &quot;http://example.com/library&quot;,
+    &quot;@type&quot;: &quot;Library&quot;,
+    &quot;contains&quot;: &quot;http://example.org/library/the-republic&quot;
+  },
+  {
+    &quot;@id&quot;: &quot;http://example.org/library/the-republic&quot;,
+    &quot;@type&quot;: &quot;Book&quot;,
+    &quot;creator&quot;: &quot;Plato&quot;,
+    &quot;title&quot;: &quot;The Republic&quot;,
+    &quot;contains&quot;: &quot;http://example.org/library/the-republic#introduction&quot;
+  },
+  {
+    &quot;@id&quot;: &quot;http://example.org/library/the-republic#introduction&quot;,
+    &quot;@type&quot;: &quot;Chapter&quot;,
+    &quot;description&quot;: &quot;An introductory chapter on The Republic.&quot;,
+    &quot;title&quot;: &quot;The Introduction&quot;
+  }]
+}
+Developers
+typically
+like
+to
+operate
+on
+items
+in
+a
+hierarchical,
+tree-based
+fashion.
+Ideally,
+a
+developer
+would
+want
+the
+data
+above
+sorted
+into
+top-level
+libraries,
+then
+the
+books
+that
+are
+contained
+in
+each
+library,
+and
+then
+the
+chapters
+contained
+in
+each
+book.
+To
+achieve
+that
+layout,
+the
+developer
+can
+define
+the
+following
+frame
+:
+{
+  &quot;@context&quot;: {
+    &quot;Book&quot;:         &quot;http://example.org/vocab#Book&quot;,
+    &quot;Chapter&quot;:      &quot;http://example.org/vocab#Chapter&quot;,
+    &quot;contains&quot;:     &quot;http://example.org/vocab#contains&quot;,
+    &quot;creator&quot;:      &quot;http://purl.org/dc/terms/creator&quot;
+    &quot;description&quot;:  &quot;http://purl.org/dc/terms/description&quot;
+    &quot;Library&quot;:      &quot;http://example.org/vocab#Library&quot;,
+    &quot;title&quot;:        &quot;http://purl.org/dc/terms/title&quot;
+  },
+  &quot;@type&quot;: &quot;Library&quot;,
+  &quot;contains&quot;: {
+    &quot;@type&quot;: &quot;Book&quot;,
+    &quot;contains&quot;: {
+      &quot;@type&quot;: &quot;Chapter&quot;
+    }
+  }
+}
+When
+</del>
+<ins class="diff-chg">Framing
+makes
+use
+of
+</ins>
+the
+<del class="diff-old">framing
+</del>
+<a href="#subject-flattening">
+<ins class="diff-chg">Subject
+Flattening
+</ins></a>
+algorithm
+<del class="diff-old">is
+run
+against
+the
+previously
+</del>
+<ins class="diff-chg">to
+place
+each
+object
+</ins>
+defined
+<del class="diff-old">JSON-LD
+document,
+paired
+with
+the
+frame
+above,
+</del>
+<ins class="diff-chg">in
+</ins>
+the
+<del class="diff-old">following
+</del>
+JSON-LD
+document
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">into
+a
+flat
+list
+of
+objects,
+allowing
+them
+to
+be
+operated
+upon
+by
+</ins>
+the
+<del class="diff-old">end
+result:
+</del>
+<ins class="diff-chg">framing
+algorithm.
+</ins>
+</p>
+<del class="diff-old">{
+  &quot;@context&quot;: {
+    &quot;Book&quot;:         &quot;http://example.org/vocab#Book&quot;,
+    &quot;Chapter&quot;:      &quot;http://example.org/vocab#Chapter&quot;,
+    &quot;contains&quot;:     &quot;http://example.org/vocab#contains&quot;,
+    &quot;creator&quot;:      &quot;http://purl.org/dc/terms/creator&quot;
+    &quot;description&quot;:  &quot;http://purl.org/dc/terms/description&quot;
+    &quot;Library&quot;:      &quot;http://example.org/vocab#Library&quot;,
+    &quot;title&quot;:        &quot;http://purl.org/dc/terms/title&quot;
+  },
+  &quot;@id&quot;: &quot;http://example.org/library&quot;,
+  &quot;@type&quot;: &quot;Library&quot;,
+  &quot;contains&quot;: {
+
+    &quot;@type&quot;: &quot;Book&quot;,
+
+
+    &quot;contains&quot;: {
+
+      &quot;@type&quot;: &quot;Chapter&quot;,
+
+
+    },
+  },
+}
+</del>
+<div id="framing-algorithm-terms" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">3.10.1
+</del>
+<ins class="diff-chg">3.11.1
+</ins>
+</span>
+Framing
+Algorithm
+Terms
+</h4>
+<del class="diff-old">This
+algorithm
+is
+a
+work
+in
+progress,
+do
+not
+implement
+it.
+There
+was
+also
+a
+recent
+update
+to
+the
+algorithm
+in
+order
+to
+auto-embed
+frame-unspecified
+data
+(if
+the
+explicit
+inclusion
+flag
+is
+not
+set)
+in
+order
+to
+preserve
+graph
+information.
+This
+change
+is
+particularly
+important
+for
+comparing
+subgraphs
+(or
+verifying
+digital
+signatures
+on
+subgraphs).
+This
+change
+is
+not
+yet
+reflected
+in
+the
+algorithm
+below.
+</del>
+<dl>
+<dt>
+<dfn title="input_frame" id="dfn-input_frame">
+input
+frame
+</dfn>
+</dt>
+<dd>
+the
+initial
+<a class="tref internalDFN" title="frame" href="#dfn-frame">
+frame
+</a>
+provided
+to
+the
+framing
+algorithm.
+</dd>
+<dt>
+<dfn title="framing_context" id="dfn-framing_context">
+framing
+context
+</dfn>
+</dt>
+<dd>
+a
+context
+containing
+<ins class="diff-new">a
+</ins><a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds"><ins class="diff-new">
+map
+of
+embeds
+</ins></a>,
+the
+<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
+object
+embed
+flag
+</a>,
+the
+<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
+explicit
+inclusion
+flag
+</a>
+and
+the
+<a class="tref internalDFN" title="omit_default_flag" href="#dfn-omit_default_flag">
+omit
+default
+flag
+</a>.
+</dd>
+<dt>
+<dfn title="map_of_embeds" id="dfn-map_of_embeds">
+<ins class="diff-new">map
+of
+embeds
+</ins></dfn></dt><dd><ins class="diff-new">
+a
+map
+that
+tracks
+if
+a
+subject
+is
+to
+be
+embedded
+in
+the
+output
+of
+the
+</ins><a href="#framing-algorithm"><ins class="diff-new">
+Framing
+Algorithm
+</ins></a><ins class="diff-new">
+;
+it
+maps
+a
+subject
+</ins><code><ins class="diff-new">
+@id
+</ins></code><ins class="diff-new">
+to
+a
+parent
+</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
+property
+or
+parent
+array.
+</ins></dd><dt>
+<dfn title="object_embed_flag" id="dfn-object_embed_flag">
+object
+embed
+flag
+</dfn>
+</dt>
+<dd>
+a
+flag
+specifying
+that
+objects
+should
+be
+directly
+embedded
+in
+the
+output,
+instead
+of
+being
+referred
+to
+by
+their
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>.
+</dd>
+<dt>
+<dfn title="explicit_inclusion_flag" id="dfn-explicit_inclusion_flag">
+explicit
+inclusion
+flag
+</dfn>
+</dt>
+<dd>
+a
+flag
+specifying
+that
+for
+properties
+to
+be
+included
+in
+the
+output,
+they
+must
+be
+explicitly
+declared
+in
+the
+<a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">
+framing
+context
+</a>.
+</dd>
+<dt>
+<dfn title="omit_default_flag" id="dfn-omit_default_flag">
+omit
+<del class="diff-old">missing
+properties
+</del>
+<ins class="diff-chg">default
+</ins>
+flag
+</dfn>
+</dt>
+<dd>
+a
+flag
+specifying
+that
+properties
+that
+are
+missing
+from
+the
+<a class="tref internalDFN" title="json-ld_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>,
+<ins class="diff-new">but
+present
+in
+the
+</ins><a class="tref internalDFN" title="input_frame" href="#dfn-input_frame"><ins class="diff-new">
+input
+frame
+</ins>
+</a>
+should
+be
+omitted
+from
+the
+output.
+</dd>
+<dt>
+<del class="diff-old">omit
+default
+flag
+Referenced
+from
+framing
+context
+,
+but
+not
+defined
+match
+limit
+A
+value
+specifying
+the
+maximum
+number
+of
+matches
+to
+accept
+when
+building
+arrays
+of
+values
+during
+the
+framing
+algorithm.
+A
+value
+of
+-1
+specifies
+that
+there
+is
+no
+match
+limit.
+</del>
+<dfn title="map_of_flattened_subjects" id="dfn-map_of_flattened_subjects">
+map
+of
+<del class="diff-old">embedded
+</del>
+<ins class="diff-chg">flattened
+</ins>
+subjects
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">A
+</del>
+<ins class="diff-chg">a
+</ins>
+map
+<ins class="diff-new">of
+subjects
+</ins>
+that
+<del class="diff-old">tracks
+if
+a
+subject
+has
+been
+embedded
+in
+</del>
+<ins class="diff-chg">is
+</ins>
+the
+<del class="diff-old">output
+</del>
+<ins class="diff-chg">result
+</ins>
+of
+the
+<del class="diff-old">Framing
+</del>
+<a href="#subject-flattening">
+<ins class="diff-chg">Subject
+Flattening
+</ins>
+Algorithm
+</a>.
+</dd>
+</dl>
+</div>
+<div id="framing-algorithm" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">3.10.2
+</del>
+<ins class="diff-chg">3.11.2
+</ins>
+</span>
+Framing
+Algorithm
+</h4>
+<p class="issue">
+<ins class="diff-new">This
+algorithm
+is
+a
+work
+in
+progress.
+Presently,
+it
+only
+works
+for
+documents
+without
+named
+graphs.
+</ins></p>
+<p>
+The
+framing
+algorithm
+takes
+<ins class="diff-new">an
+</ins>
+<a class="tref internalDFN" title="json-ld_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>
+<del class="diff-old">that
+has
+been
+normalized
+according
+to
+the
+Normalization
+Algorithm
+</del>
+(
+<strong>
+<del class="diff-old">normalized
+</del>
+<ins class="diff-chg">expanded
+</ins>
+input
+</strong>
+<del class="diff-old">),
+</del>
+<ins class="diff-chg">)
+and
+</ins>
+an
+<a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">
+input
+frame
+</a>
+<ins class="diff-new">(
+</ins><strong><ins class="diff-new">
+expanded
+frame
+</ins></strong><ins class="diff-new">
+)
+</ins>
+that
+<del class="diff-old">has
+</del>
+<ins class="diff-chg">have
+</ins>
+been
+expanded
+according
+to
+the
+<a href="#expansion-algorithm">
+Expansion
+Algorithm
+<del class="diff-old">(
+expanded
+frame
+),
+</del>
+</a>,
+and
+a
+number
+of
+options
+and
+produces
+<a class="tref internalDFN" title="json-ld_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>.
+<del class="diff-old">The
+following
+series
+of
+steps
+is
+the
+recursive
+portion
+of
+the
+framing
+algorithm:
+</del>
+</p>
+<del class="diff-old">Initialize
+the
+</del>
+<p>
+<ins class="diff-chg">Create
+</ins>
+<a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">
+framing
+context
+</a>
+<del class="diff-old">by
+setting
+</del>
+<ins class="diff-chg">using
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a><ins class="diff-chg">
+for
+the
+</ins><a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds"><ins class="diff-chg">
+map
+of
+embeds
+</ins></a>,
+the
+<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
+object
+embed
+flag
+</a>
+<ins class="diff-new">set
+to
+</ins><a class="tref internalDFN" title="true" href="#dfn-true"><ins class="diff-new">
+true
+</ins>
+</a>,
+<del class="diff-old">clearing
+</del>
+the
+<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
+explicit
+inclusion
+flag
+</a>
+<ins class="diff-new">set
+to
+</ins><a class="tref internalDFN" title="false" href="#dfn-false"><ins class="diff-new">
+false
+</ins>
+</a>,
+and
+<del class="diff-old">clearing
+</del>
+the
+<a class="tref internalDFN" title="omit_default_flag" href="#dfn-omit_default_flag">
+omit
+<del class="diff-old">missing
+properties
+</del>
+<ins class="diff-chg">default
+</ins>
+flag
+<del class="diff-old">.
+Override
+these
+values
+based
+on
+input
+options
+provided
+</del>
+</a>
+<ins class="diff-chg">set
+</ins>
+to
+<del class="diff-old">the
+algorithm
+by
+the
+application.
+Generate
+a
+list
+</del>
+<a class="tref internalDFN" title="false" href="#dfn-false">
+<ins class="diff-chg">false
+</ins></a><ins class="diff-chg">
+along
+with
+</ins><a class="tref internalDFN" title="map_of_flattened_subjects" href="#dfn-map_of_flattened_subjects"><ins class="diff-chg">
+map
+</ins>
+of
+<del class="diff-old">frames
+by
+processing
+the
+expanded
+frame
+:
+If
+the
+expanded
+frame
+is
+not
+an
+array
+,
+set
+match
+limit
+</del>
+<ins class="diff-chg">flattened
+subjects
+</ins>
+</a>
+<ins class="diff-new">set
+</ins>
+to
+<del class="diff-old">1,
+place
+the
+expanded
+frame
+into
+</del>
+the
+<del class="diff-old">list
+</del>
+<ins class="diff-chg">result
+</ins>
+of
+<del class="diff-old">frames
+,
+and
+set
+the
+JSON-LD
+output
+</del>
+<ins class="diff-chg">performing
+</ins><a href="#subject-flattening"><ins class="diff-chg">
+Subject
+Flattening
+</ins>
+</a>
+<del class="diff-old">to
+null
+.
+If
+the
+</del>
+<ins class="diff-chg">on
+</ins>
+<strong>
+expanded
+<del class="diff-old">frame
+is
+</del>
+<ins class="diff-chg">input
+</ins></strong>.<ins class="diff-chg">
+Also
+create
+</ins><em><ins class="diff-chg">
+results
+</ins></em><ins class="diff-chg">
+as
+</ins>
+an
+empty
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+<del class="diff-old">,
+place
+an
+empty
+object
+into
+the
+list
+of
+frames
+,
+set
+</del>
+</a>.
+</p>
+<p>
+<ins class="diff-chg">Invoke
+</ins>
+the
+<del class="diff-old">JSON-LD
+output
+to
+an
+array
+,
+and
+set
+match
+limit
+</del>
+<ins class="diff-chg">recursive
+algorithm
+using
+</ins><a class="tref internalDFN" title="framing_context" href="#dfn-framing_context"><ins class="diff-chg">
+framing
+context
+</ins>
+</a>
+<del class="diff-old">to
+-1.
+If
+</del>
+<ins class="diff-chg">(
+</ins><em><ins class="diff-chg">
+state
+</ins></em><ins class="diff-chg">
+),
+</ins>
+the
+<a class="tref internalDFN" title="map_of_flattened_subjects" href="#dfn-map_of_flattened_subjects">
+<ins class="diff-new">map
+of
+flattened
+subjects
+</ins></a><ins class="diff-new">
+(
+</ins><em><ins class="diff-new">
+subjects
+</ins></em><ins class="diff-new">
+),
+</ins>
+<strong>
+expanded
+frame
+</strong>
+<del class="diff-old">is
+a
+non-empty
+array
+,
+add
+each
+item
+in
+the
+expanded
+</del>
+<ins class="diff-chg">(
+</ins><em>
+frame
+<del class="diff-old">into
+</del>
+</em>
+<ins class="diff-chg">),
+</ins><em><ins class="diff-chg">
+result
+</ins></em><ins class="diff-chg">
+as
+</ins><em><ins class="diff-chg">
+parent
+</ins></em>,<ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a><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>.</p><p><ins class="diff-chg">
+The
+following
+series
+of
+steps
+is
+</ins>
+the
+<del class="diff-old">list
+</del>
+<ins class="diff-chg">recursive
+portion
+</ins>
+of
+<del class="diff-old">frames
+,
+set
+</del>
+the
+<del class="diff-old">JSON-LD
+output
+to
+an
+array
+,
+and
+set
+match
+limit
+to
+-1.
+</del>
+<ins class="diff-chg">framing
+algorithm:
+</ins></p><ol class="algorithm"><li><ins class="diff-chg">
+Validate
+</ins><em><ins class="diff-chg">
+frame
+</ins></em>.
+</li>
+<li>
+Create
+a
+<del class="diff-old">match
+array
+for
+each
+expanded
+frame
+in
+the
+list
+of
+frames
+halting
+when
+either
+the
+match
+limit
+is
+zero
+or
+the
+end
+</del>
+<ins class="diff-chg">set
+</ins>
+of
+<ins class="diff-new">matched
+subjects
+by
+filtering
+</ins><em><ins class="diff-new">
+subjects
+</ins></em><ins class="diff-new">
+checking
+</ins>
+the
+<del class="diff-old">list
+</del>
+<a class="tref internalDFN" title="map_of_flattened_subjects" href="#dfn-map_of_flattened_subjects">
+<ins class="diff-chg">map
+</ins>
+of
+<del class="diff-old">frames
+</del>
+<ins class="diff-chg">flattened
+subjects
+</ins>
+</a>
+<del class="diff-old">is
+reached.
+</del>
+<ins class="diff-chg">against
+</ins><em><ins class="diff-chg">
+frame
+</ins></em>:<ol class="algorithm"><li>
+If
+<del class="diff-old">an
+expanded
+</del>
+<em>
+frame
+<del class="diff-old">is
+not
+an
+object,
+the
+processor
+must
+</del>
+</em>
+<del class="diff-old">throw
+</del>
+<ins class="diff-chg">has
+</ins>
+a
+<code>
+<del class="diff-old">Invalid
+Frame
+Format
+</del>
+<ins class="diff-chg">@type
+</ins>
+</code>
+<del class="diff-old">exception.
+Add
+each
+matching
+item
+from
+the
+normalized
+input
+to
+the
+matches
+array
+</del>
+<ins class="diff-chg">property
+containing
+one
+or
+more
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-chg">
+IRIs
+</ins>
+</a>
+<del class="diff-old">and
+decrement
+the
+</del>
+match
+<del class="diff-old">limit
+</del>
+<ins class="diff-chg">any
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-chg">
+subject
+definition
+</ins>
+</a>
+<del class="diff-old">by
+1
+if:
+The
+expanded
+frame
+has
+an
+</del>
+<ins class="diff-chg">with
+a
+</ins>
+<code>
+<del class="diff-old">rdf:type
+</del>
+<ins class="diff-chg">@type
+</ins>
+</code>
+<del class="diff-old">that
+exists
+in
+the
+item's
+list
+</del>
+<ins class="diff-chg">property
+including
+any
+</ins>
+of
+<ins class="diff-new">those
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-new">
+IRIs
+</ins></a>.</li><li><ins class="diff-new">
+Otherwise,
+if
+</ins><em><ins class="diff-new">
+frame
+</ins></em><ins class="diff-new">
+has
+a
+</ins>
+<code>
+<del class="diff-old">rdf:type
+s.
+Note:
+the
+rdf:type
+</del>
+<ins class="diff-chg">@type
+</ins>
+</code>
+<del class="diff-old">can
+be
+an
+array
+,
+but
+</del>
+<ins class="diff-chg">property
+</ins>
+only
+<del class="diff-old">one
+value
+needs
+to
+be
+in
+common
+between
+the
+item
+and
+the
+expanded
+frame
+for
+</del>
+a
+<del class="diff-old">match.
+The
+expanded
+frame
+does
+not
+have
+an
+</del>
+<ins class="diff-chg">empty
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>,<ins class="diff-chg">
+matches
+any
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-chg">
+subject
+definition
+</ins></a><ins class="diff-chg">
+with
+a
+</ins>
+<code>
+<del class="diff-old">rdf:type
+</del>
+<ins class="diff-chg">@type
+</ins>
+</code>
+property,
+<del class="diff-old">but
+every
+property
+in
+</del>
+<ins class="diff-chg">regardless
+of
+</ins>
+the
+<del class="diff-old">expanded
+frame
+exists
+in
+</del>
+<ins class="diff-chg">actual
+values.
+</ins></li><li><ins class="diff-chg">
+Otherwise,
+match
+if
+</ins>
+the
+<del class="diff-old">item.
+</del>
+<a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">
+<ins class="diff-chg">subject
+definition
+</ins></a><ins class="diff-chg">
+contains
+all
+of
+the
+non-
+</ins><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-chg">
+keyword
+</ins></a><ins class="diff-chg">
+properties
+in
+</ins><em><ins class="diff-chg">
+frame
+</ins></em>.
+</li>
+</ol>
+<del class="diff-old">matches
+array
+not
+defined
+anywhere.
+</del>
+</li>
+<li>
+<del class="diff-old">Process
+each
+item
+</del>
+<ins class="diff-chg">Get
+values
+for
+</ins><em><ins class="diff-chg">
+embedOn
+</ins></em><ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+explicitOn
+</ins></em><ins class="diff-chg">
+by
+looking
+</ins>
+in
+<del class="diff-old">the
+match
+array
+with
+its
+associated
+match
+</del>
+<em>
+frame
+<del class="diff-old">:
+If
+</del>
+</em>
+<ins class="diff-chg">for
+</ins>
+the
+<del class="diff-old">match
+frame
+contains
+an
+</del>
+<ins class="diff-chg">keys
+</ins>
+<code>
+@embed
+</code>
+<del class="diff-old">keyword
+,
+set
+</del>
+<ins class="diff-chg">and
+</ins><code><ins class="diff-chg">
+@explicit
+</ins></code><ins class="diff-chg">
+using
+</ins>
+the
+<ins class="diff-new">current
+values
+for
+</ins>
+<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
+object
+embed
+flag
+</a>
+<del class="diff-old">to
+its
+value.
+If
+the
+match
+frame
+contains
+an
+@explicit
+keyword
+,
+set
+the
+</del>
+<ins class="diff-chg">and
+</ins>
+<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
+explicit
+inclusion
+flag
+</a>
+<del class="diff-old">to
+its
+value.
+Note:
+</del>
+<ins class="diff-chg">from
+</ins><em><ins class="diff-chg">
+state
+</ins></em>
+if
+<ins class="diff-new">not
+found.
+</ins></li><li><ins class="diff-new">
+For
+each
+</ins><em><ins class="diff-new">
+id
+</ins></em><ins class="diff-new">
+and
+</ins><em><ins class="diff-new">
+subject
+</ins></em><ins class="diff-new">
+from
+</ins>
+the
+<del class="diff-old">keyword
+exists,
+but
+</del>
+<ins class="diff-chg">set
+of
+matched
+subjects,
+ordered
+by
+</ins><em><ins class="diff-chg">
+id
+</ins></em>:<ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins>
+the
+<del class="diff-old">value
+</del>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+<ins class="diff-chg">active
+property
+</ins></a>
+is
+<del class="diff-old">neither
+true
+or
+false
+,
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins></a>,
+set
+the
+<del class="diff-old">associated
+flag
+</del>
+<a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds">
+<ins class="diff-chg">map
+of
+embeds
+</ins></a><ins class="diff-chg">
+in
+</ins><em><ins class="diff-chg">
+state
+</ins></em>
+to
+<ins class="diff-new">an
+empty
+map.
+</ins></li><li><ins class="diff-new">
+Initialize
+</ins><em><ins class="diff-new">
+output
+</ins></em><ins class="diff-new">
+with
+</ins>
+<code>
+<del class="diff-old">true
+.
+</del>
+<ins class="diff-chg">@id
+</ins></code><ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+id
+</ins></em>.
+</li>
+<li>
+<del class="diff-old">If
+the
+object
+</del>
+<ins class="diff-chg">Initialize
+</ins><em>
+embed
+<del class="diff-old">flag
+</del>
+</em>
+<ins class="diff-chg">with
+</ins><em><ins class="diff-chg">
+parent
+</ins></em><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>
+<ins class="diff-new">to
+</ins><em><ins class="diff-new">
+property
+</ins></em>.</li><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+embedOn
+</ins></em>
+is
+<del class="diff-old">cleared
+</del>
+<a class="tref internalDFN" title="true" href="#dfn-true">
+<ins class="diff-chg">true
+</ins></a>,
+and
+<del class="diff-old">the
+item
+has
+the
+@id
+property,
+replace
+the
+item
+with
+</del>
+<em>
+<ins class="diff-chg">id
+</ins></em><ins class="diff-chg">
+is
+in
+</ins><a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds"><ins class="diff-chg">
+map
+of
+embeds
+</ins></a><ins class="diff-chg">
+from
+</ins><em><ins class="diff-chg">
+state
+</ins></em>:<ol class="algorithm"><li><ins class="diff-chg">
+Set
+</ins><em><ins class="diff-chg">
+existing
+</ins></em><ins class="diff-chg">
+to
+</ins>
+the
+value
+of
+<del class="diff-old">the
+@id
+property.
+</del>
+<em>
+<ins class="diff-chg">id
+</ins></em><ins class="diff-chg">
+in
+</ins><a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds"><ins class="diff-chg">
+map
+of
+embeds
+</ins></a><ins class="diff-chg">
+and
+set
+</ins><em><ins class="diff-chg">
+embedOn
+</ins></em><ins class="diff-chg">
+to
+</ins><a class="tref internalDFN" title="false" href="#dfn-false"><ins class="diff-chg">
+false
+</ins></a>.
+</li>
+<li>
+If
+<del class="diff-old">the
+</del>
+<em>
+<ins class="diff-chg">existing
+</ins></em><ins class="diff-chg">
+has
+a
+</ins><em><ins class="diff-chg">
+parent
+</ins></em><ins class="diff-chg">
+which
+is
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a><ins class="diff-chg">
+containing
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+</ins>
+object
+<del class="diff-old">embed
+flag
+</del>
+</a>
+<del class="diff-old">is
+set
+and
+the
+item
+has
+the
+</del>
+<ins class="diff-chg">with
+</ins>
+<code>
+@id
+</code>
+<del class="diff-old">property,
+</del>
+<ins class="diff-chg">equal
+to
+</ins><em><ins class="diff-chg">
+id
+</ins></em>,<em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+has
+already
+been
+embedded
+</ins>
+and
+<del class="diff-old">its
+IRI
+</del>
+<ins class="diff-chg">can
+be
+overwritten,
+so
+set
+</ins><em><ins class="diff-chg">
+embedOn
+</ins></em><ins class="diff-chg">
+to
+</ins><a class="tref internalDFN" title="true" href="#dfn-true"><ins class="diff-chg">
+true
+</ins></a>.</li><li><ins class="diff-chg">
+Otherwise,
+</ins><em><ins class="diff-chg">
+existing
+</ins></em><ins class="diff-chg">
+has
+a
+</ins><em><ins class="diff-chg">
+parent
+</ins></em><ins class="diff-chg">
+which
+</ins>
+is
+<ins class="diff-new">a
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-new">
+subject
+definition
+</ins></a>.<ins class="diff-new">
+Set
+</ins><em><ins class="diff-new">
+embedOn
+</ins></em><ins class="diff-new">
+to
+</ins><a class="tref internalDFN" title="true" href="#dfn-true"><ins class="diff-new">
+true
+</ins></a><ins class="diff-new">
+if
+any
+of
+the
+items
+</ins>
+in
+<em>
+<ins class="diff-new">parent
+</ins></em><em><ins class="diff-new">
+property
+</ins></em><ins class="diff-new">
+is
+a
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-new">
+subject
+definition
+</ins></a><ins class="diff-new">
+or
+</ins><a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference"><ins class="diff-new">
+subject
+reference
+</ins></a><ins class="diff-new">
+for
+</ins><em><ins class="diff-new">
+id
+</ins></em><ins class="diff-new">
+because
+</ins>
+the
+<del class="diff-old">map
+of
+embedded
+subjects
+</del>
+<ins class="diff-chg">embed
+can
+be
+overwritten.
+</ins></li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+embedOn
+</ins></em><ins class="diff-chg">
+is
+</ins><a class="tref internalDFN" title="true" href="#dfn-true"><ins class="diff-chg">
+true
+</ins>
+</a>,
+<del class="diff-old">throw
+a
+Duplicate
+Embed
+exception.
+</del>
+<em>
+<ins class="diff-chg">existing
+</ins></em><ins class="diff-chg">
+is
+already
+embedded
+but
+can
+be
+overwritten,
+so
+</ins><a href="#remove-embed"><ins class="diff-chg">
+Remove
+Embedded
+Definition
+</ins></a><ins class="diff-chg">
+for
+</ins><em><ins class="diff-chg">
+id
+</ins></em>.</li></ol>
+</li>
+<li>
+If
+<del class="diff-old">the
+object
+</del>
+<em>
+<ins class="diff-chg">embedOn
+</ins></em><ins class="diff-chg">
+is
+</ins><a class="tref internalDFN" title="false" href="#dfn-false"><ins class="diff-chg">
+false
+</ins></a>,<ins class="diff-chg">
+add
+</ins><em><ins class="diff-chg">
+output
+</ins></em><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+parent
+</ins></em><ins class="diff-chg">
+by
+either
+appending
+to
+</ins><em><ins class="diff-chg">
+parent
+</ins></em><ins class="diff-chg">
+if
+it
+is
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a>,<ins class="diff-chg">
+or
+appending
+to
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+in
+</ins><em><ins class="diff-chg">
+parent
+</ins></em><ins class="diff-chg">
+otherwise.
+</ins></li><li><ins class="diff-chg">
+Otherwise:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+Add
+</ins><em>
+embed
+<del class="diff-old">flag
+</del>
+</em>
+<ins class="diff-chg">to
+</ins><a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds"><ins class="diff-chg">
+map
+of
+embeds
+</ins>
+</a>
+<del class="diff-old">is
+set
+and
+the
+item
+has
+the
+@id
+</del>
+<ins class="diff-chg">for
+</ins><em><ins class="diff-chg">
+id
+</ins></em>.</li><li><ins class="diff-chg">
+Process
+each
+</ins><em>
+property
+</em>
+and
+<del class="diff-old">its
+IRI
+is
+not
+</del>
+<em>
+<ins class="diff-chg">value
+</ins></em>
+in
+the
+<del class="diff-old">map
+of
+embedded
+subjects
+:
+</del>
+<ins class="diff-chg">matched
+</ins><em><ins class="diff-chg">
+subject
+</ins></em>,<ins class="diff-chg">
+ordered
+by
+</ins><em><ins class="diff-chg">
+property
+</ins></em>:
+<ol class="algorithm">
+<li>
+If
+<del class="diff-old">the
+explicit
+inclusion
+flag
+</del>
+<em>
+<ins class="diff-chg">property
+</ins></em>
+is
+<del class="diff-old">set,
+then
+delete
+any
+key
+from
+the
+item
+that
+does
+not
+exist
+in
+the
+match
+frame
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-chg">
+keyword
+</ins>
+</a>,
+<del class="diff-old">except
+@id
+.
+</del>
+<ins class="diff-chg">add
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+and
+a
+copy
+of
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+output
+</ins></em><ins class="diff-chg">
+and
+continue
+with
+the
+next
+property
+from
+</ins><em><ins class="diff-chg">
+subject
+</ins></em>.
+</li>
+<li>
+<del class="diff-old">For
+each
+key
+</del>
+<ins class="diff-chg">If
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+is
+not
+</ins>
+in
+<del class="diff-old">the
+match
+</del>
+<em>
+frame
+</em>:
+<ol class="algorithm">
+<li>
+<ins class="diff-new">If
+</ins><em><ins class="diff-new">
+explicitOn
+</ins></em><ins class="diff-new">
+is
+</ins><a class="tref internalDFN" title="false" href="#dfn-false"><ins class="diff-new">
+false
+</ins>
+</a>,
+<del class="diff-old">except
+for
+keyword
+</del>
+<a href="#embed-values">
+<ins class="diff-chg">Embed
+values
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+<ins class="diff-chg">from
+</ins><em><ins class="diff-chg">
+subject
+</ins></em><ins class="diff-chg">
+in
+</ins><em><ins class="diff-chg">
+output
+</ins></em><ins class="diff-chg">
+using
+</ins><em><ins class="diff-chg">
+subject
+</ins></em><ins class="diff-chg">
+as
+</ins><em><ins class="diff-chg">
+element
+</ins></em>
+and
+<del class="diff-old">rdf:type
+:
+</del>
+<em>
+<ins class="diff-chg">property
+</ins></em><ins class="diff-chg">
+as
+</ins><em><ins class="diff-chg">
+active
+property
+</ins></em>.</li><li><ins class="diff-chg">
+Continue
+to
+next
+property.
+</ins></li></ol></li><li id="frm-process-prop-item"><ins class="diff-chg">
+Process
+each
+</ins><em><ins class="diff-chg">
+item
+</ins></em><ins class="diff-chg">
+from
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+as
+follows:
+</ins>
+<ol class="algorithm">
+<li>
+If
+<del class="diff-old">the
+key
+</del>
+<em>
+<ins class="diff-chg">item
+</ins></em>
+is
+<del class="diff-old">in
+</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><ins class="diff-chg">
+with
+</ins>
+the
+<del class="diff-old">item,
+</del>
+<ins class="diff-chg">key
+</ins><code><ins class="diff-chg">
+@list
+</ins></code>,
+then
+<del class="diff-old">build
+</del>
+<ins class="diff-chg">create
+</ins>
+a
+<del class="diff-old">new
+recursion
+input
+list
+using
+the
+</del>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+</ins>
+object
+<del class="diff-old">or
+objects
+associated
+</del>
+</a>
+<ins class="diff-chg">named
+</ins><em><ins class="diff-chg">
+list
+</ins></em>
+with
+the
+<del class="diff-old">key.
+If
+any
+object
+contains
+an
+</del>
+<ins class="diff-chg">key
+</ins>
+<code>
+<del class="diff-old">@id
+</del>
+<ins class="diff-chg">@list
+</ins>
+</code>
+<ins class="diff-new">and
+the
+</ins>
+value
+<del class="diff-old">that
+exists
+</del>
+<ins class="diff-chg">of
+an
+empty
+array.
+Append
+</ins><em><ins class="diff-chg">
+list
+</ins></em><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+property
+</ins></em>
+in
+<del class="diff-old">the
+normalized
+input
+,
+replace
+the
+object
+</del>
+<em>
+<ins class="diff-chg">output
+</ins></em>.<ins class="diff-chg">
+Process
+each
+</ins><em><ins class="diff-chg">
+listitem
+</ins></em>
+in
+the
+<del class="diff-old">recursion
+input
+list
+</del>
+<code>
+<ins class="diff-chg">@list
+</ins></code><ins class="diff-chg">
+array
+as
+follows:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+listitem
+</ins></em><ins class="diff-chg">
+is
+a
+</ins><a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference"><ins class="diff-chg">
+subject
+reference
+</ins>
+</a>
+<del class="diff-old">with
+</del>
+<ins class="diff-chg">process
+</ins><em><ins class="diff-chg">
+listitem
+</ins></em><ins class="diff-chg">
+recursively
+using
+this
+algorithm
+passing
+</ins>
+a
+new
+<del class="diff-old">object
+containing
+</del>
+<ins class="diff-chg">map
+of
+</ins><em><ins class="diff-chg">
+subjects
+</ins></em><ins class="diff-chg">
+that
+contains
+</ins>
+the
+<code>
+@id
+</code>
+<del class="diff-old">key
+where
+the
+value
+is
+the
+value
+</del>
+of
+<em>
+<ins class="diff-new">listitem
+</ins></em><ins class="diff-new">
+as
+</ins>
+the
+<del class="diff-old">@id
+,
+</del>
+<ins class="diff-chg">key
+</ins>
+and
+<del class="diff-old">all
+of
+</del>
+the
+<del class="diff-old">other
+key-value
+pairs
+for
+that
+subject.
+Set
+the
+recursion
+match
+frame
+to
+the
+value
+associated
+with
+</del>
+<a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">
+<ins class="diff-chg">subject
+definition
+</ins></a><ins class="diff-chg">
+from
+</ins>
+the
+<del class="diff-old">match
+frame
+</del>
+<ins class="diff-chg">original
+</ins><a class="tref internalDFN" title="map_of_flattened_subjects" href="#dfn-map_of_flattened_subjects"><ins class="diff-chg">
+map
+of
+flattened
+subjects
+</ins>
+</a>
+<del class="diff-old">'s
+key.
+Replace
+</del>
+<ins class="diff-chg">as
+</ins>
+the
+<del class="diff-old">value
+associated
+with
+</del>
+<ins class="diff-chg">value.
+Pass
+</ins>
+the
+<del class="diff-old">key
+by
+recursively
+calling
+this
+algorithm
+using
+recursion
+input
+list
+,
+recursion
+match
+</del>
+<ins class="diff-chg">first
+value
+from
+</ins><em>
+frame
+</em>
+<ins class="diff-chg">for
+</ins><em><ins class="diff-chg">
+property
+</ins></em>
+as
+<del class="diff-old">input.
+</del>
+<em>
+<ins class="diff-chg">frame
+</ins></em>,<em><ins class="diff-chg">
+list
+</ins></em><ins class="diff-chg">
+as
+</ins><em><ins class="diff-chg">
+parent
+</ins></em>,<ins class="diff-chg">
+and
+</ins><code><ins class="diff-chg">
+@list
+</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>
+<del class="diff-old">If
+the
+key
+is
+not
+in
+the
+item,
+add
+the
+key
+to
+the
+item
+and
+set
+the
+associated
+value
+</del>
+<ins class="diff-chg">Otherwise,
+append
+a
+copy
+of
+</ins><em><ins class="diff-chg">
+listitem
+</ins></em>
+to
+<del class="diff-old">an
+empty
+array
+if
+the
+match
+frame
+key's
+value
+is
+an
+array
+or
+</del>
+<code>
+<del class="diff-old">null
+</del>
+<ins class="diff-chg">@list
+</ins>
+</code>
+<del class="diff-old">otherwise.
+</del>
+<ins class="diff-chg">in
+</ins><em><ins class="diff-chg">
+list
+</ins></em>.</li></ol>
+</li>
+<li>
+If
+<del class="diff-old">value
+associated
+with
+the
+item's
+key
+</del>
+<em>
+<ins class="diff-chg">item
+</ins></em>
+is
+<del class="diff-old">null
+,
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference"><ins class="diff-chg">
+subject
+reference
+</ins></a>
+process
+<em>
+<ins class="diff-new">item
+</ins></em><ins class="diff-new">
+recursively
+using
+this
+algorithm
+passing
+a
+new
+map
+as
+</ins><em><ins class="diff-new">
+subjects
+</ins></em><ins class="diff-new">
+that
+contains
+</ins>
+the
+<del class="diff-old">omit
+missing
+properties
+flag
+:
+If
+the
+value
+associated
+with
+</del>
+<code>
+<ins class="diff-chg">@id
+</ins></code><ins class="diff-chg">
+of
+</ins><em><ins class="diff-chg">
+item
+</ins></em><ins class="diff-chg">
+as
+</ins>
+the
+key
+<del class="diff-old">in
+</del>
+<ins class="diff-chg">and
+</ins>
+the
+<del class="diff-old">match
+frame
+</del>
+<a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">
+<ins class="diff-chg">subject
+definition
+</ins>
+</a>
+<del class="diff-old">is
+an
+array,
+use
+the
+first
+frame
+</del>
+from
+the
+<del class="diff-old">array
+</del>
+<ins class="diff-chg">original
+</ins><a class="tref internalDFN" title="map_of_flattened_subjects" href="#dfn-map_of_flattened_subjects"><ins class="diff-chg">
+map
+of
+flattened
+subjects
+</ins></a>
+as
+the
+<del class="diff-old">property
+frame
+,
+otherwise
+set
+</del>
+<ins class="diff-chg">value.
+Pass
+</ins>
+the
+<ins class="diff-chg">first
+value
+from
+</ins><em><ins class="diff-chg">
+frame
+</ins></em><ins class="diff-chg">
+for
+</ins><em>
+property
+</em>
+<ins class="diff-new">as
+</ins><em>
+frame
+</em>,
+<em>
+<ins class="diff-new">output
+</ins></em><ins class="diff-new">
+as
+</ins><em><ins class="diff-new">
+parent
+</ins></em>,<ins class="diff-new">
+and
+</ins><em><ins class="diff-new">
+property
+</ins></em><ins class="diff-new">
+as
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a>.<div class="issue"><ins class="diff-new">
+Passing
+a
+</ins><a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference"><ins class="diff-new">
+subject
+reference
+</ins>
+</a>
+<ins class="diff-new">doesn't
+work
+if
+this
+map
+is
+used
+recursively.
+Presently
+pass
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-new">
+subject
+definition
+</ins></a><ins class="diff-new">
+from
+original
+</ins><a class="tref internalDFN" title="map_of_flattened_subjects" href="#dfn-map_of_flattened_subjects"><ins class="diff-new">
+map
+of
+flattened
+subjects
+</ins></a>.</div></li><li><ins class="diff-new">
+Otherwise,
+append
+a
+copy
+of
+</ins><em><ins class="diff-new">
+item
+</ins></em>
+to
+<del class="diff-old">an
+empty
+object.
+</del>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+<ins class="diff-chg">active
+property
+</ins></a><ins class="diff-chg">
+in
+</ins><em><ins class="diff-chg">
+output
+</ins></em>.</li></ol></li></ol>
+</li>
+<li>
+<del class="diff-old">If
+the
+</del>
+<ins class="diff-chg">Process
+each
+</ins><em>
+property
+</em>
+<ins class="diff-new">and
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+in
+</ins><em>
+frame
+<del class="diff-old">contains
+an
+@omitDefault
+</del>
+</em>,
+<ins class="diff-chg">where
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+is
+not
+a
+</ins><em>
+keyword
+<del class="diff-old">,
+set
+the
+omit
+missing
+properties
+flag
+</del>
+</em>,
+<ins class="diff-chg">ordered
+by
+</ins><em><ins class="diff-chg">
+property
+</ins></em>:<ol class="algorithm"><li><ins class="diff-chg">
+Set
+</ins><em><ins class="diff-chg">
+property
+frame
+</ins></em>
+to
+<del class="diff-old">its
+value.
+Note:
+if
+</del>
+the
+<del class="diff-old">keyword
+</del>
+<ins class="diff-chg">first
+item
+in
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+or
+a
+newly
+created
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins>
+</a>
+<del class="diff-old">exists,
+but
+the
+</del>
+<ins class="diff-chg">if
+</ins><em>
+value
+</em>
+is
+<del class="diff-old">neither
+</del>
+<ins class="diff-chg">empty.
+</ins></li><li><ins class="diff-chg">
+Skip
+to
+the
+next
+property
+in
+</ins><em><ins class="diff-chg">
+frame
+</ins></em><ins class="diff-chg">
+if
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+is
+in
+</ins><em><ins class="diff-chg">
+output
+</ins></em><ins class="diff-chg">
+or
+if
+</ins><em><ins class="diff-chg">
+property
+frame
+</ins></em><ins class="diff-chg">
+contains
+</ins>
+<code>
+<del class="diff-old">true
+</del>
+<ins class="diff-chg">@omitDefault
+</ins>
+</code>
+<ins class="diff-new">which
+is
+</ins><a class="tref internalDFN" title="true" href="#dfn-true"><ins class="diff-new">
+true
+</ins></a>
+or
+<ins class="diff-new">if
+it
+does
+not
+contain
+</ins>
+<code>
+<del class="diff-old">false
+,
+set
+</del>
+<ins class="diff-chg">@omitDefault
+</ins></code><ins class="diff-chg">
+but
+</ins>
+the
+<del class="diff-old">associated
+</del>
+<ins class="diff-chg">value
+of
+</ins><a class="tref internalDFN" title="omit_default_flag" href="#dfn-omit_default_flag"><ins class="diff-chg">
+omit
+default
+</ins>
+flag
+<del class="diff-old">to
+</del>
+</a>
+<a class="tref internalDFN" title="true" href="#dfn-true">
+true
+<del class="diff-old">.
+</del>
+</a>.
+</li>
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">Set
+</ins>
+the
+<del class="diff-old">omit
+missing
+properties
+flag
+</del>
+<ins class="diff-chg">value
+of
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+in
+</ins><em><ins class="diff-chg">
+output
+</ins></em><ins class="diff-chg">
+to
+a
+new
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins>
+</a>
+<ins class="diff-new">with
+a
+property
+</ins><code><ins class="diff-new">
+@preserve
+</ins></code><ins class="diff-new">
+and
+a
+value
+that
+</ins>
+is
+<del class="diff-old">set,
+delete
+the
+key
+in
+the
+item.
+Otherwise,
+if
+</del>
+<ins class="diff-chg">a
+copy
+of
+</ins>
+the
+<ins class="diff-new">value
+of
+</ins>
+<code>
+@default
+</code>
+<del class="diff-old">keyword
+is
+set
+</del>
+in
+<del class="diff-old">the
+property
+</del>
+<em>
+frame
+<del class="diff-old">set
+the
+item's
+value
+to
+</del>
+</em>
+<ins class="diff-chg">if
+it
+exists,
+or
+</ins>
+the
+<del class="diff-old">value
+of
+</del>
+<ins class="diff-chg">string
+</ins>
+<code>
+<del class="diff-old">@default
+.
+</del>
+<ins class="diff-chg">@null
+</ins></code><ins class="diff-chg">
+otherwise.
+</ins>
+</li>
+</ol>
+</li>
+<li>
+<del class="diff-old">If
+the
+JSON-LD
+</del>
+<ins class="diff-chg">Add
+</ins><em>
+output
+<del class="diff-old">is
+null
+set
+it
+</del>
+</em>
+to
+<del class="diff-old">the
+item,
+otherwise,
+</del>
+<em>
+<ins class="diff-chg">parent
+</ins></em>.<ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+parent
+</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>,
+append
+<del class="diff-old">the
+item
+to
+the
+JSON-LD
+</del>
+<em>
+output
+<del class="diff-old">.
+</del>
+</em>,
+<ins class="diff-chg">otherwise
+append
+</ins><em><ins class="diff-chg">
+output
+</ins></em><ins class="diff-chg">
+to
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+in
+</ins><em><ins class="diff-chg">
+parent
+</ins></em>.
+</li>
+</ol>
+</li>
+<del class="diff-old">Return
+the
+JSON-LD
+output
+.
+</del>
+</ol>
+</li>
+</ol>
+<p>
+<ins class="diff-new">At
+the
+completion
+of
+the
+recursive
+algorithm,
+</ins><em><ins class="diff-new">
+results
+</ins></em><ins class="diff-new">
+will
+contain
+the
+top-level
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-new">
+subject
+definition
+</ins></a><ins class="diff-new">
+s.
+</ins></p><p>
+The
+<del class="diff-old">final,
+non-recursive
+step
+</del>
+<ins class="diff-chg">final
+two
+steps
+</ins>
+of
+the
+framing
+algorithm
+<del class="diff-old">requires
+the
+JSON-LD
+output
+</del>
+<ins class="diff-chg">require
+</ins><em><ins class="diff-chg">
+results
+</ins></em>
+to
+be
+compacted
+according
+to
+the
+<a href="#compaction-algorithm">
+Compaction
+Algorithm
+</a>
+by
+using
+the
+context
+provided
+in
+the
+<a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">
+input
+frame
+</a>.
+<del class="diff-old">The
+resulting
+value
+is
+the
+final
+output
+of
+</del>
+<ins class="diff-chg">If
+</ins>
+the
+<ins class="diff-new">frame
+has
+no
+context,
+</ins>
+compaction
+<del class="diff-old">algorithm
+and
+</del>
+is
+<del class="diff-old">what
+should
+be
+returned
+to
+</del>
+<ins class="diff-chg">performed
+with
+an
+empty
+context
+(not
+a
+null
+context).
+The
+compaction
+result
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+use
+</ins>
+the
+<del class="diff-old">application.
+What
+are
+</del>
+<code>
+<ins class="diff-chg">@graph
+</ins></code><ins class="diff-chg">
+keyword
+at
+</ins>
+the
+<del class="diff-old">implications
+for
+framing
+lists?
+3.11
+Normalization
+This
+algorithm
+is
+a
+work
+in
+progress,
+do
+not
+implement
+it.
+Normalization
+is
+</del>
+<ins class="diff-chg">top-level,
+even
+if
+</ins>
+the
+<del class="diff-old">process
+of
+taking
+JSON-LD
+input
+and
+performing
+a
+deterministic
+transformation
+on
+that
+input
+that
+results
+in
+a
+normalized
+and
+serialized
+JSON-LD
+representation.
+Normalization
+</del>
+<ins class="diff-chg">context
+</ins>
+is
+<del class="diff-old">achieved
+by
+transforming
+JSON-LD
+input
+</del>
+<ins class="diff-chg">empty
+or
+if
+there
+is
+only
+one
+element
+</ins>
+to
+<del class="diff-old">RDF,
+as
+described
+</del>
+<ins class="diff-chg">put
+</ins>
+in
+<del class="diff-old">RDF
+Conversion
+,
+invoking
+</del>
+the
+<del class="diff-old">normalization
+procedure
+as
+described
+in
+[
+RDF-NORMALIZATION
+],
+returning
+</del>
+<code>
+<ins class="diff-chg">@graph
+</ins></code><ins class="diff-chg">
+array.
+Subsequently,
+replace
+all
+key-value
+pairs
+where
+</ins>
+the
+<del class="diff-old">serialized
+results.
+There
+an
+open
+issue
+(
+ISSUE-53
+)
+on
+</del>
+<ins class="diff-chg">key
+is
+</ins><code><ins class="diff-chg">
+@preserve
+</ins></code><ins class="diff-chg">
+with
+</ins>
+the
+<del class="diff-old">purpose
+and
+results
+of
+performing
+normalization.
+Previous
+versions
+of
+</del>
+<ins class="diff-chg">value
+from
+</ins>
+the
+<del class="diff-old">specification
+generated
+JSON-LD
+as
+</del>
+<ins class="diff-chg">key-pair.
+If
+</ins>
+the
+<del class="diff-old">result
+of
+</del>
+<ins class="diff-chg">value
+from
+</ins>
+the
+<del class="diff-old">normalization
+algorithm,
+however
+normalization
+is
+a
+process
+required
+across
+different
+linked
+data
+serializations.
+To
+be
+useful,
+a
+graph
+requires
+an
+identical
+normalized
+representation
+that
+</del>
+<ins class="diff-chg">key-pair
+</ins>
+is
+<del class="diff-old">independent
+of
+the
+data
+format
+originally
+used
+for
+markup,
+or
+the
+way
+in
+which
+language
+features
+or
+publisher
+preferences
+create
+differences
+in
+</del>
+<code>
+<ins class="diff-chg">@null
+</ins></code>,<ins class="diff-chg">
+replace
+</ins>
+the
+<del class="diff-old">markup
+of
+identical
+graphs.
+It
+may
+be
+that
+</del>
+<ins class="diff-chg">value
+with
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>.<ins class="diff-chg">
+If,
+after
+replacement,
+an
+array
+contains
+only
+</ins>
+the
+<del class="diff-old">need
+for
+either
+or
+both
+of
+flattening
+algorithm
+or
+to
+retrieve
+such
+a
+cryptographic
+signature.
+Normalization
+is
+useful
+when
+comparing
+two
+graphs
+against
+one
+another,
+when
+generating
+a
+detailed
+list
+of
+differences
+between
+two
+graphs,
+and
+when
+generating
+a
+cryptographic
+digital
+signature
+for
+information
+contained
+in
+a
+graph
+or
+when
+generating
+a
+hash
+of
+</del>
+<ins class="diff-chg">value
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a><ins class="diff-chg">
+remove
+</ins>
+the
+<del class="diff-old">information
+contained
+in
+a
+graph.
+The
+example
+below
+is
+</del>
+<ins class="diff-chg">value,
+leaving
+</ins>
+an
+<del class="diff-old">un-normalized
+JSON-LD
+document:
+{
+  &quot;@context&quot;: {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;homepage&quot;: {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;
+  },
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;
+}
+</del>
+<ins class="diff-chg">empty
+array.
+</ins>
+The
+<del class="diff-old">example
+below
+</del>
+<ins class="diff-chg">resulting
+value
+</ins>
+is
+the
+<del class="diff-old">normalized
+form
+of
+the
+</del>
+<ins class="diff-chg">final
+</ins><a class="tref internalDFN" title="json-ld_output" href="#dfn-json-ld_output">
+JSON-LD
+<del class="diff-old">document
+above:
+</del>
+<ins class="diff-chg">output
+</ins></a>.
+</p>
+<del class="diff-old">Whitespace
+is
+used
+below
+to
+aid
+readability.
+</del>
+<p class="issue">
+The
+<del class="diff-old">normalization
+</del>
+algorithm
+<del class="diff-old">for
+JSON-LD
+removes
+all
+unnecessary
+whitespace
+in
+the
+fully
+normalized
+form.
+Not
+clear
+that
+whitespace
+must
+be
+normalized,
+as
+the
+JSON-LD
+representation
+can't
+be
+used
+directly
+</del>
+<ins class="diff-chg">needs
+</ins>
+to
+<del class="diff-old">create
+a
+signature,
+but
+would
+</del>
+be
+<del class="diff-old">based
+on
+</del>
+<ins class="diff-chg">updated
+to
+consider
+</ins><code><ins class="diff-chg">
+@graph
+</ins></code>.<ins class="diff-chg">
+For
+1.0,
+this
+might
+not
+require
+anything,
+as
+</ins>
+the
+<del class="diff-old">serialized
+result
+</del>
+<ins class="diff-chg">default
+implementation
+</ins>
+of
+<del class="diff-old">[
+RDF-NORMALIZATION
+</del>
+<a href="#subject-flattening">
+<ins class="diff-chg">Subject
+Flattening
+</ins>
+</a>
+<del class="diff-old">].
+</del>
+<ins class="diff-chg">should
+flatten
+everything
+into
+a
+single
+graph.
+</ins>
+</p>
+<del class="diff-old">[{
+  &quot;@id&quot;: &quot;_:c14n0&quot;,
+  &quot;http://xmlns.com/foaf/0.1/homepage&quot;: {
+    &quot;@id&quot;: &quot;http://manu.sporny.org/&quot;
+  },
+  &quot;http://xmlns.com/foaf/0.1/name&quot;: &quot;Manu Sporny&quot;
+}]
+</del>
+</div>
+<div id="subject-flattening" class="section">
+<h4>
+<span class="secno">
+<ins class="diff-chg">3.11.3
+</ins></span><ins class="diff-chg">
+Subject
+Flattening
+</ins></h4>
+<p>
+<del class="diff-old">Notice
+how
+all
+of
+the
+term
+s
+have
+been
+</del>
+<ins class="diff-chg">Subject
+Flattening
+takes
+as
+input
+an
+</ins>
+expanded
+<ins class="diff-new">JSON-LD
+document,
+</ins>
+and
+<del class="diff-old">sorted
+</del>
+<ins class="diff-chg">results
+</ins>
+in
+<del class="diff-old">alphabetical
+order.
+Also,
+notice
+how
+the
+subject
+</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">has
+been
+labeled
+</del>
+<em>
+<ins class="diff-chg">subjects
+</ins></em>
+with
+a
+<del class="diff-old">named
+</del>
+<ins class="diff-chg">mapping
+from
+each
+object
+represented
+in
+the
+document
+to
+a
+single
+entry
+within
+the
+input
+document,
+assigning
+</ins>
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+<del class="diff-old">.
+Normalization
+ensures
+that
+any
+arbitrary
+graph
+containing
+exactly
+the
+same
+information
+would
+be
+normalized
+</del>
+</a>
+<ins class="diff-chg">identifiers
+</ins>
+to
+<del class="diff-old">exactly
+the
+same
+form
+shown
+above.
+</del>
+<ins class="diff-chg">objects
+without
+a
+@id,
+or
+with
+an
+@id
+that
+references
+a
+blank
+node
+identifier.
+</ins>
+</p>
+<del class="diff-old">3.11.1
+Normalization
+Algorithm
+</del>
+<p>
+The
+<del class="diff-old">normalization
+</del>
+algorithm
+<del class="diff-old">transforms
+</del>
+<ins class="diff-chg">operates
+on
+</ins>
+the
+<del class="diff-old">JSON-LD
+input
+into
+RDF,
+normalizes
+it
+according
+to
+[
+RDF-NORMALIZATION
+]
+</del>
+<ins class="diff-chg">initially
+empty
+</ins><em><ins class="diff-chg">
+subjects
+</ins></em>
+and
+<del class="diff-old">then
+transforms
+back
+to
+JSON-LD.
+The
+result
+</del>
+<ins class="diff-chg">takes
+as
+input
+the
+current
+document
+</ins><em><ins class="diff-chg">
+element
+</ins></em>.</p><ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+element
+</ins></em>
+is
+an
+<del class="diff-old">object
+representation
+that
+deterministically
+represents
+</del>
+<ins class="diff-chg">array,
+process
+each
+entry
+in
+element
+recursively,
+using
+this
+algorithm.
+</ins></li><li><ins class="diff-chg">
+Otherwise,
+if
+element
+is
+</ins>
+a
+<del class="diff-old">RDF
+graph.
+</del>
+<ins class="diff-chg">JSON
+object:
+</ins>
+<ol class="algorithm">
+<li>
+<del class="diff-old">Transform
+the
+JSON-LD
+input
+</del>
+<ins class="diff-chg">If
+element
+is
+a
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-chg">
+subject
+definition
+</ins>
+</a>
+<del class="diff-old">to
+RDF
+according
+to
+the
+steps
+in
+the
+RDF
+Conversion
+Algorithm
+.
+</del>
+<ins class="diff-chg">or
+</ins><a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference"><ins class="diff-chg">
+subject
+reference
+</ins></a>:<ol class="algorithm">
+<li>
+<del class="diff-old">Perform
+[
+</del>
+<ins class="diff-chg">If
+the
+property
+</ins><cide><ins class="diff-chg">
+@id
+</ins></cide><ins class="diff-chg">
+is
+not
+an
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri">
+<del class="diff-old">RDF-NORMALIZATION
+</del>
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr>
+<del class="diff-old">]
+of
+that
+RDF
+to
+create
+</del>
+</a>,
+<ins class="diff-chg">return
+</ins>
+a
+<del class="diff-old">serialized
+N-Triples
+representation
+</del>
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+<ins class="diff-chg">blank
+node
+</ins></a><ins class="diff-chg">
+identifer
+using
+</ins><a href="#generate-blank-node-identifier"><ins class="diff-chg">
+Generate
+Blank
+Node
+Identifier
+</ins></a><ins class="diff-chg">
+as
+</ins><em><ins class="diff-chg">
+name
+</ins></em>,<ins class="diff-chg">
+otherwise
+use
+the
+value
+</ins>
+of
+the
+<del class="diff-old">RDF
+graph.
+</del>
+<ins class="diff-chg">@id
+property
+as
+</ins><em><ins class="diff-chg">
+name
+</ins></em>.
+</li>
+<li>
+<del class="diff-old">Construct
+</del>
+<ins class="diff-chg">Unless
+</ins><em><ins class="diff-chg">
+subjects
+</ins></em><ins class="diff-chg">
+as
+an
+entry
+for
+</ins><em><ins class="diff-chg">
+name
+</ins></em><ins class="diff-chg">
+create
+</ins>
+a
+<ins class="diff-new">new
+entry
+in
+</ins><em><ins class="diff-new">
+subjects
+</ins></em><ins class="diff-new">
+initialized
+using
+a
+new
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+<del class="diff-old">array
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>
+<ins class="diff-new">with
+</ins><code><ins class="diff-new">
+@id
+</ins></code><ins class="diff-new">
+set
+to
+</ins>
+<em>
+<del class="diff-old">array
+</del>
+<ins class="diff-chg">name
+</ins>
+</em>
+<del class="diff-old">to
+serve
+</del>
+as
+<del class="diff-old">the
+output
+object.
+</del>
+<em>
+<ins class="diff-chg">subject
+</ins></em>.<ins class="diff-chg">
+Otherwise,
+use
+that
+existing
+entrpy
+as
+</ins><em><ins class="diff-chg">
+subject
+</ins></em>.
+</li>
+<li>
+For
+each
+<del class="diff-old">triple
+in
+the
+N-Triples
+document
+having
+subject
+,
+</del>
+<em>
+<del class="diff-old">predicate
+,
+</del>
+<ins class="diff-chg">property
+</ins></em>
+and
+<em>
+<del class="diff-old">object
+:
+</del>
+<ins class="diff-chg">value
+</ins></em><ins class="diff-chg">
+in
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+other
+than
+</ins><code><ins class="diff-chg">
+@id
+</ins></code>:
+<ol class="algorithm">
+<li>
+If
+<em>
+<del class="diff-old">predicate
+</del>
+<ins class="diff-chg">property
+</ins>
+</em>
+is
+<ins class="diff-new">a
+keyword,
+copy
+</ins><code><ins class="diff-new">
+property
+</ins></code><ins class="diff-new">
+and
+</ins>
+<code>
+<del class="diff-old">http://www.w3.org/1999/02/22-rdf-syntax-ns#first
+,
+let
+object
+representation
+be
+object
+represented
+in
+expanded
+form
+as
+described
+in
+Value
+Expansion
+.
+Set
+</del>
+value
+<del class="diff-old">as
+the
+last
+entry
+in
+array
+.
+</del>
+</code>
+<ins class="diff-chg">to
+</ins><code><ins class="diff-chg">
+subject
+</ins></code>.
+</li>
+<li>
+<del class="diff-old">If
+the
+last
+entry
+in
+</del>
+<ins class="diff-chg">Otherwise,
+if
+</ins>
+value
+is
+<del class="diff-old">subject
+,
+replace
+</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>,
+it
+<del class="diff-old">with
+</del>
+<em class="rfc2119" title="must">
+<ins class="diff-chg">must
+</ins></em><ins class="diff-chg">
+only
+have
+</ins>
+the
+<ins class="diff-new">key
+</ins><code><ins class="diff-new">
+@list.
+</ins></code><ins class="diff-new">
+Create
+</ins>
+a
+<ins class="diff-new">new
+</ins>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+<del class="diff-old">having
+a
+key/value
+pair
+of
+</del>
+<ins class="diff-chg">containing
+</ins>
+<code>
+@list
+</code>
+and
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+<del class="diff-old">containing
+</del>
+<ins class="diff-chg">created
+by
+performing
+this
+algorithm
+recursively
+on
+each
+item
+in
+the
+list
+and
+add
+to
+</ins>
+<em>
+<del class="diff-old">object
+representation
+</del>
+<ins class="diff-chg">subject
+</ins></em><ins class="diff-chg">
+along
+with
+</ins><em><ins class="diff-chg">
+property
+</ins>
+</em>.
+</li>
+<li>
+Otherwise,
+<del class="diff-old">the
+last
+key/value
+entry
+in
+</del>
+value
+<em class="rfc2119" title="must">
+must
+</em>
+be
+<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">
+Add
+property
+to
+</ins><em><ins class="diff-new">
+subject
+</ins></em><ins class="diff-new">
+and
+an
+array
+value
+created
+by
+performing
+this
+algorithm
+recursively
+on
+each
+item
+in
+the
+array.
+</ins></li></ol></li><li><ins class="diff-new">
+Return
+</ins>
+a
+<ins class="diff-new">new
+</ins>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+<del class="diff-old">having
+a
+single
+key
+of
+@list
+with
+</del>
+<ins class="diff-chg">created
+as
+</ins>
+a
+<del class="diff-old">value
+that
+is
+an
+array
+.
+Append
+</del>
+<a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">
+<ins class="diff-chg">subject
+reference
+</ins></a><ins class="diff-chg">
+to
+</ins>
+<em>
+<del class="diff-old">object
+representation
+</del>
+<ins class="diff-chg">name
+</ins>
+</em>.
+</li>
+</ol>
+</li>
+<li>
+Otherwise,
+<del class="diff-old">if
+</del>
+<ins class="diff-chg">return
+</ins>
+<em>
+<del class="diff-old">predicate
+is
+http://www.w3.org/1999/02/22-rdf-syntax-ns#rest
+,
+ignore
+this
+triple.
+</del>
+<ins class="diff-chg">element
+</ins></em>.</li></ol>
+</li>
+<li>
+Otherwise,
+<del class="diff-old">if
+</del>
+<ins class="diff-chg">return
+</ins><em><ins class="diff-chg">
+element
+</ins></em>.</li></ol><p class="issue"><ins class="diff-chg">
+The
+algorithm
+states
+to
+set
+</ins>
+the
+<del class="diff-old">last
+entry
+</del>
+<ins class="diff-chg">property
+</ins>
+in
+<em>
+<del class="diff-old">array
+</del>
+<ins class="diff-chg">subject
+</ins>
+</em>
+<del class="diff-old">is
+not
+</del>
+<ins class="diff-chg">using
+the
+mapped
+values,
+but
+it
+really
+should
+merge,
+if
+the
+property
+already
+exists
+in
+</ins><em><ins class="diff-chg">
+subject
+</ins></em>.</p><p class="issue"><ins class="diff-chg">
+The
+algorithm
+should
+descend
+into
+@graph
+and
+create
+</ins>
+a
+<del class="diff-old">JSON
+Object
+with
+</del>
+<ins class="diff-chg">parallel
+flattened
+structure
+of
+subject
+to
+object
+within
+that
+</ins><code><ins class="diff-chg">
+@graph
+</ins></code><ins class="diff-chg">
+representation.
+Recursive
+</ins><code><ins class="diff-chg">
+@graph
+</ins></code><ins class="diff-chg">
+definitions
+are
+also
+flattened
+into
+the
+default
+graph.
+The
+algorithm
+should
+also
+take
+</ins>
+an
+<ins class="diff-new">option
+which
+descends
+into
+</ins>
+<code>
+<del class="diff-old">@id
+</del>
+<ins class="diff-chg">@graph
+</ins>
+</code>
+<del class="diff-old">having
+</del>
+<ins class="diff-chg">and
+flattens
+all
+definitions
+at
+the
+same
+level,
+effectively
+flatting
+default
+and
+named
+graphs
+into
+</ins>
+a
+<del class="diff-old">value
+of
+</del>
+<ins class="diff-chg">single
+default
+graph;
+this
+should
+be
+the
+default
+implementation
+for
+1.0.
+</ins></p></div><div id="remove-embed" class="section"><h4><span class="secno"><ins class="diff-chg">
+3.11.4
+</ins></span><ins class="diff-chg">
+Remove
+Embedded
+Definition
+</ins></h4><p><ins class="diff-chg">
+This
+algorithm
+replaces
+an
+already
+embedded
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">
+subject
+<del class="diff-old">:
+Create
+a
+new
+JSON
+Object
+</del>
+<ins class="diff-chg">definition
+</ins>
+</a>
+with
+<del class="diff-old">key/value
+pair
+of
+@id
+and
+</del>
+a
+<del class="diff-old">string
+representation
+</del>
+<a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">
+<ins class="diff-chg">subject
+reference
+</ins></a>.<ins class="diff-chg">
+It
+then
+recursively
+removes
+any
+entries
+in
+the
+</ins><a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds"><ins class="diff-chg">
+map
+</ins>
+of
+<ins class="diff-chg">embeds
+</ins></a><ins class="diff-chg">
+that
+had
+the
+removed
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">
+subject
+<del class="diff-old">and
+use
+</del>
+<ins class="diff-chg">definition
+</ins></a><ins class="diff-chg">
+in
+their
+parent
+chain.
+</ins></p><div class="issue"><ins class="diff-chg">
+About
+</ins>
+as
+<ins class="diff-new">clear
+as
+mud
+</ins></div><p></p><p><ins class="diff-new">
+The
+algorithm
+is
+invoked
+with
+a
+</ins><a class="tref internalDFN" title="framing_context" href="#dfn-framing_context"><ins class="diff-new">
+framing
+context
+</ins></a><ins class="diff-new">
+and
+subject
+id
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">id
+</ins>
+</em>.
+</p>
+<ol class="algorithm">
+<li>
+<del class="diff-old">Otherwise,
+set
+</del>
+<ins class="diff-chg">Find
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">embed
+</ins>
+</em>
+<del class="diff-old">to
+that
+value.
+</del>
+<ins class="diff-chg">from
+</ins><a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds"><ins class="diff-chg">
+map
+of
+embeds
+</ins></a><ins class="diff-chg">
+for
+</ins><em><ins class="diff-chg">
+id
+</ins></em>.
+</li>
+<li>
+<del class="diff-old">If
+predicate
+is
+http://www.w3.org/1999/02/22-rdf-syntax-ns#type
+:
+</del>
+<ins class="diff-chg">Let
+</ins><em><ins class="diff-chg">
+parent
+</ins></em><ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+be
+from
+</ins><em><ins class="diff-chg">
+embed
+</ins></em>.</li>
+<li>
+If
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">parent
+</ins>
+</em>
+<del class="diff-old">has
+an
+key/value
+pair
+of
+@type
+and
+</del>
+<ins class="diff-chg">is
+</ins>
+an
+<del class="diff-old">array
+,
+append
+</del>
+<ins class="diff-chg">array,
+replace
+</ins>
+the
+<del class="diff-old">string
+representation
+of
+</del>
+<a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">
+<ins class="diff-chg">subject
+definition
+</ins></a><ins class="diff-chg">
+that
+matches
+</ins><em><ins class="diff-chg">
+id
+</ins></em><ins class="diff-chg">
+with
+a
+</ins><a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference"><ins class="diff-chg">
+subject
+reference
+</ins></a>.<ins class="diff-chg">
+If
+parent
+is
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+</ins>
+object
+</a>,
+<ins class="diff-new">replace
+the
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-new">
+subject
+definition
+</ins>
+</a>
+<del class="diff-old">to
+</del>
+<ins class="diff-chg">for
+</ins><em><ins class="diff-chg">
+property
+</ins></em>
+that
+<del class="diff-old">array.
+</del>
+<ins class="diff-chg">matches
+</ins><em><ins class="diff-chg">
+id
+</ins></em><ins class="diff-chg">
+with
+a
+</ins><a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference"><ins class="diff-chg">
+subject
+reference
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+if
+</del>
+<ins class="diff-chg">Remove
+dependents
+for
+</ins>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">id
+</ins>
+</em>
+<del class="diff-old">has
+an
+key
+</del>
+<ins class="diff-chg">in
+</ins><a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds"><ins class="diff-chg">
+map
+</ins>
+of
+<ins class="diff-new">embeds
+</ins></a><ins class="diff-new">
+by
+scanning
+the
+map
+for
+entries
+with
+</ins><em><ins class="diff-new">
+parent
+</ins></em><ins class="diff-new">
+that
+have
+an
+</ins>
+<code>
+<del class="diff-old">@type
+,
+replace
+</del>
+<ins class="diff-chg">@id
+</ins></code><ins class="diff-chg">
+of
+</ins><em><ins class="diff-chg">
+id
+</ins></em>,<ins class="diff-chg">
+removing
+</ins>
+that
+<del class="diff-old">value
+with
+a
+new
+array
+containing
+</del>
+<ins class="diff-chg">definition
+from
+</ins>
+the
+<del class="diff-old">existing
+value
+</del>
+<ins class="diff-chg">map,
+</ins>
+and
+<ins class="diff-new">then
+removing
+the
+dependents
+for
+the
+</ins><em><ins class="diff-new">
+parent
+</ins></em><ins class="diff-new">
+id
+recursively
+by
+repeating
+this
+step.
+This
+step
+will
+terminate
+when
+there
+are
+no
+more
+embed
+entries
+containing
+the
+removed
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-new">
+subject
+definition
+</ins></a><ins class="diff-new">
+'s
+</ins><code><ins class="diff-new">
+@id
+</ins></code><ins class="diff-new">
+in
+their
+parent
+chain.
+</ins></li></ol></div><div id="embed-values" class="section"><h4><span class="secno"><ins class="diff-new">
+3.11.5
+</ins></span><ins class="diff-new">
+Embed
+Values
+</ins></h4><p><ins class="diff-new">
+This
+algorithm
+recursively
+embeds
+property
+values
+in
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-new">
+subject
+definition
+</ins></a><em><ins class="diff-new">
+output
+</ins></em>,<ins class="diff-new">
+given
+</ins>
+a
+<del class="diff-old">string
+representation
+of
+</del>
+<a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">
+<ins class="diff-chg">framing
+context
+</ins></a>,<ins class="diff-chg">
+input
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-chg">
+subject
+definition
+</ins></a>
+<em>
+<del class="diff-old">object
+</del>
+<ins class="diff-chg">element
+</ins></em>,<a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a>,<ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+output
+</ins>
+</em>.
+</p>
+<ol class="algorithm">
+<li>
+<del class="diff-old">Otherwise,
+</del>
+<ins class="diff-chg">For
+each
+</ins><em><ins class="diff-chg">
+item
+</ins></em><ins class="diff-chg">
+in
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+of
+</ins><em><ins class="diff-chg">
+element
+</ins></em>:<ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+item
+</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">
+with
+the
+key
+</ins><code><ins class="diff-chg">
+@list
+</ins></code>,<ins class="diff-chg">
+then
+</ins>
+create
+a
+new
+<del class="diff-old">entry
+in
+value
+</del>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>
+with
+a
+key
+<del class="diff-old">of
+</del>
+<code>
+<del class="diff-old">@type
+</del>
+<ins class="diff-chg">@list
+</ins>
+</code>
+and
+<del class="diff-old">value
+being
+</del>
+a
+<del class="diff-old">string
+representation
+</del>
+<ins class="diff-chg">value
+</ins>
+of
+<ins class="diff-new">an
+empty
+array
+and
+add
+it
+to
+</ins>
+<em>
+<del class="diff-old">object
+</del>
+<ins class="diff-chg">output
+</ins></em>,<ins class="diff-chg">
+appending
+if
+</ins><em><ins class="diff-chg">
+output
+</ins></em><ins class="diff-chg">
+is
+an
+array,
+and
+appending
+to
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+otherwise.
+Recursively
+call
+this
+algorithm
+passing
+</ins><em><ins class="diff-chg">
+item
+</ins></em><ins class="diff-chg">
+as
+</ins><em><ins class="diff-chg">
+element
+</ins></em>,<code><ins class="diff-chg">
+@list
+</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>,<ins class="diff-chg">
+and
+the
+new
+array
+as
+</ins><em><ins class="diff-chg">
+output
+</ins></em>.<ins class="diff-chg">
+Continue
+to
+the
+next
+</ins><em><ins class="diff-chg">
+item
+</ins>
+</em>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+let
+</del>
+<ins class="diff-chg">If
+</ins>
+<em>
+<del class="diff-old">key
+</del>
+<ins class="diff-chg">item
+</ins>
+</em>
+<del class="diff-old">by
+</del>
+<ins class="diff-chg">is
+a
+</ins><a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference"><ins class="diff-chg">
+subject
+reference
+</ins></a>:<ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds"><ins class="diff-chg">
+map
+of
+embeds
+</ins></a><ins class="diff-chg">
+does
+not
+contain
+an
+entry
+for
+</ins>
+the
+<del class="diff-old">string
+representation
+</del>
+<code>
+<ins class="diff-chg">@id
+</ins></code>
+of
+<em>
+<del class="diff-old">predicate
+</del>
+<ins class="diff-chg">item
+</ins></em>:<ol class="algorithm"><li><ins class="diff-chg">
+Initialize
+</ins><em><ins class="diff-chg">
+embed
+</ins></em><ins class="diff-chg">
+with
+</ins><em><ins class="diff-chg">
+output
+</ins></em><ins class="diff-chg">
+as
+</ins><em><ins class="diff-chg">
+parent
+</ins>
+</em>
+and
+<del class="diff-old">let
+</del>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+<ins class="diff-chg">active
+property
+</ins></a><ins class="diff-chg">
+as
+</ins>
+<em>
+<del class="diff-old">object
+representation
+</del>
+<ins class="diff-chg">property
+</ins>
+</em>
+<del class="diff-old">be
+</del>
+<ins class="diff-chg">and
+add
+to
+</ins><a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds"><ins class="diff-chg">
+map
+of
+embeds
+</ins></a>.</li><li><ins class="diff-chg">
+Initialize
+a
+new
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-chg">
+subject
+definition
+</ins></a>
+<em>
+<del class="diff-old">object
+</del>
+<ins class="diff-chg">o
+</ins>
+</em>
+<del class="diff-old">represented
+in
+expanded
+form
+</del>
+<ins class="diff-chg">to
+act
+</ins>
+as
+<del class="diff-old">described
+in
+Value
+Expansion
+</del>
+<ins class="diff-chg">the
+embedded
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-chg">
+subject
+definition
+</ins>
+</a>.
+</li>
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">For
+each
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+and
+</ins>
+<em>
+value
+</em>
+<del class="diff-old">has
+an
+key/value
+pair
+of
+</del>
+<ins class="diff-chg">in
+the
+expanded
+definition
+for
+</ins>
+<em>
+<del class="diff-old">key
+</del>
+<ins class="diff-chg">item
+</ins></em><ins class="diff-chg">
+in
+</ins><em><ins class="diff-chg">
+subjects
+</ins></em>:<ol class="algorithm"><li><ins class="diff-chg">
+Add
+</ins><em><ins class="diff-chg">
+property
+</ins>
+</em>
+and
+<del class="diff-old">an
+array
+,
+append
+</del>
+<ins class="diff-chg">a
+copy
+of
+</ins>
+<em>
+<del class="diff-old">object
+representation
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+to
+<del class="diff-old">that
+array.
+</del>
+<em>
+<ins class="diff-chg">o
+</ins></em><ins class="diff-chg">
+if
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+is
+a
+</ins><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-chg">
+keyword
+</ins></a>.
+</li>
+<li>
+Otherwise,
+<del class="diff-old">if
+</del>
+<ins class="diff-chg">recursively
+call
+this
+algorithm
+passing
+</ins>
+<em>
+value
+</em>
+<del class="diff-old">has
+an
+key
+of
+</del>
+<ins class="diff-chg">as
+</ins>
+<em>
+<del class="diff-old">key
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>,
+<del class="diff-old">replace
+that
+value
+with
+a
+new
+array
+containing
+the
+existing
+value
+</del>
+<em>
+<ins class="diff-chg">property
+</ins></em><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>
+and
+<em>
+<del class="diff-old">object
+representation
+</del>
+<ins class="diff-chg">o
+</ins></em><ins class="diff-chg">
+as
+</ins><em><ins class="diff-chg">
+output
+</ins>
+</em>.
+</li>
+</ol>
+</li>
+</ol>
+</li>
+<li>
+<del class="diff-old">Otherwise,
+create
+a
+new
+entry
+in
+value
+with
+a
+key
+of
+</del>
+<ins class="diff-chg">Set
+</ins>
+<em>
+<del class="diff-old">key
+</del>
+<ins class="diff-chg">item
+</ins>
+</em>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">to
+</ins>
+<em>
+<del class="diff-old">object
+representation
+</del>
+<ins class="diff-chg">o
+</ins>
+</em>.
+</li>
+</ol>
+</li>
+</ol>
+</li>
+<li>
+<del class="diff-old">Return
+</del>
+<ins class="diff-chg">If
+</ins>
+<em>
+<ins class="diff-new">output
+</ins></em><ins class="diff-new">
+is
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>,
+<ins class="diff-new">append
+a
+copy
+of
+</ins><em><ins class="diff-new">
+item
+</ins></em>,<ins class="diff-new">
+otherwise
+append
+a
+copy
+of
+</ins><em><ins class="diff-new">
+item
+</ins>
+</em>
+<del class="diff-old">as
+the
+normalized
+graph
+representation.
+</del>
+<ins class="diff-chg">to
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+in
+</ins><em><ins class="diff-chg">
+output
+</ins></em>.
+</li>
+</ol>
+</div>
+</div>
+</div>
+<div id="data-round-tripping" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">3.12
+</del>
+<ins class="diff-chg">4.
+</ins>
+</span>
+Data
+Round
+Tripping
+</h2>
+<p>
+When
+<del class="diff-old">normalizing
+</del>
+<ins class="diff-chg">coercing
+numbers
+to
+</ins><strong><ins class="diff-chg">
+xsd:integer
+</ins></strong><ins class="diff-chg">
+or
+</ins>
+<strong>
+xsd:double
+</strong>
+<del class="diff-old">values,
+</del>
+<ins class="diff-chg">as
+it,
+e.g.,
+happens
+during
+</ins><a href="#rdf-conversion"><ins class="diff-chg">
+RDF
+Conversion
+</ins></a>,
+implementers
+<em class="rfc2119" title="must">
+must
+</em>
+ensure
+that
+the
+<del class="diff-old">normalized
+value
+</del>
+<ins class="diff-chg">result
+</ins>
+is
+a
+<del class="diff-old">string.
+In
+order
+to
+generate
+</del>
+<ins class="diff-chg">canonical
+lexical
+representation
+in
+</ins>
+the
+<ins class="diff-new">form
+of
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>.
+<ins class="diff-new">A
+</ins><dfn title="canonical_lexical_representation" id="dfn-canonical_lexical_representation"><ins class="diff-new">
+canonical
+lexical
+representation
+</ins></dfn><ins class="diff-new">
+is
+a
+set
+of
+literals
+</ins>
+from
+<ins class="diff-new">among
+the
+valid
+set
+of
+literals
+for
+a
+datatype
+such
+that
+there
+is
+a
+one-to-one
+mapping
+between
+the
+canonical
+lexical
+representation
+and
+a
+value
+in
+the
+value
+space
+as
+defined
+in
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-XMLSCHEMA-2"><ins class="diff-new">
+XMLSCHEMA-2
+</ins></a></cite><ins class="diff-new">
+].
+In
+other
+words,
+every
+value
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+converted
+to
+a
+deterministic
+string
+representation.
+</ins></p><p><ins class="diff-new">
+The
+canonical
+lexical
+representation
+of
+an
+</ins><em><ins class="diff-new">
+integer
+</ins></em>,<ins class="diff-new">
+i.e.,
+</ins>
+a
+<ins class="diff-new">number
+without
+fractions
+or
+a
+number
+coerced
+to
+</ins>
+<strong>
+<ins class="diff-new">xsd:integer
+</ins></strong>,<ins class="diff-new">
+is
+a
+finite-length
+sequence
+of
+decimal
+digits
+(
+</ins><code><ins class="diff-new">
+0-9
+</ins></code><ins class="diff-new">
+)
+with
+an
+optional
+leading
+minus
+sign;
+leading
+zeroes
+are
+prohibited.
+To
+convert
+the
+number
+in
+JavaScript,
+implementers
+can
+use
+the
+following
+snippet
+of
+code:
+</ins></p><pre class="example"><ins class="diff-new">
+(value).toFixed(0).toString()
+</ins></pre><p><ins class="diff-new">
+The
+canonical
+lexical
+representation
+of
+a
+</ins><em>
+double
+<del class="diff-old">value,
+output
+equivalent
+</del>
+</em>,
+<ins class="diff-chg">i.e.,
+a
+number
+with
+fractions
+or
+a
+number
+coerced
+</ins>
+to
+<strong>
+<ins class="diff-new">xsd:double
+</ins></strong>,<ins class="diff-new">
+consists
+of
+a
+mantissa
+followed
+by
+</ins>
+the
+<ins class="diff-new">character
+&quot;E&quot;,
+followed
+by
+an
+exponent.
+The
+mantissa
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+a
+decimal
+number.
+The
+exponent
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+an
+integer.
+Leading
+zeroes
+and
+a
+preceding
+plus
+sign
+(
+</ins>
+<code>
+<del class="diff-old">printf(&quot;%1.6e&quot;,
+value)
+</del>
+<ins class="diff-chg">+
+</ins>
+</code>
+<del class="diff-old">function
+</del>
+<ins class="diff-chg">)
+are
+prohibited
+</ins>
+in
+<del class="diff-old">C
+</del>
+<ins class="diff-chg">the
+exponent.
+If
+the
+exponent
+is
+zero,
+it
+</ins>
+must
+be
+<del class="diff-old">used
+where
+&quot;%1.6e&quot;
+</del>
+<ins class="diff-chg">indicated
+by
+</ins><code><ins class="diff-chg">
+E0
+</ins></code>.<ins class="diff-chg">
+For
+the
+mantissa,
+the
+preceding
+optional
+plus
+sign
+</ins>
+is
+<ins class="diff-new">prohibited
+and
+</ins>
+the
+<del class="diff-old">string
+formatter
+</del>
+<ins class="diff-chg">decimal
+point
+is
+required.
+Leading
+</ins>
+and
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">trailing
+zeroes
+are
+prohibited
+subject
+to
+the
+following:
+number
+representations
+must
+be
+normalized
+such
+that
+there
+is
+a
+single
+digit
+which
+</ins>
+is
+<ins class="diff-new">non-zero
+to
+</ins>
+the
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">left
+of
+the
+decimal
+point
+and
+at
+least
+a
+single
+digit
+</ins>
+to
+<del class="diff-old">be
+converted.
+</del>
+<ins class="diff-chg">the
+right
+of
+the
+decimal
+point
+unless
+the
+value
+being
+represented
+is
+zero.
+The
+canonical
+representation
+for
+zero
+is
+</ins><code><ins class="diff-chg">
+0.0E0
+</ins></code>.
+To
+convert
+the
+<del class="diff-old">a
+double
+value
+</del>
+<ins class="diff-chg">number
+</ins>
+in
+JavaScript,
+implementers
+can
+use
+the
+following
+snippet
+of
+code:
+</p>
+<del class="diff-old">// the variable 'value' below is the JavaScript native double value that is to be converted
+(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/,
+'$10$2')
+</del>
+<pre class="example">
+<ins class="diff-chg">(value).toExponential().replace(/e\+?/,'E')
+</ins>
+</pre>
+<p>
+<strong>
+<ins class="diff-new">xsd:double
+</ins></strong><ins class="diff-new">
+'s
+value
+space
+is
+defined
+by
+the
+IEEE
+double-precision
+64-bit
+floating
+point
+type
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-IEEE-754-1985"><ins class="diff-new">
+IEEE-754-1985
+</ins></a></cite><ins class="diff-new">
+].
+</ins></p>
+<p class="note">
+When
+data
+<del class="diff-old">needs
+</del>
+<ins class="diff-chg">such
+as
+decimals
+need
+</ins>
+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.
+<ins class="diff-new">Authors
+should
+instead
+use
+the
+expanded
+object
+form
+to
+set
+the
+canonical
+lexical
+representation
+directly.
+</ins></p><p class="note"><ins class="diff-new">
+When
+JSON-native
+datatypes,
+like
+</ins><a class="tref internalDFN" title="number" href="#dfn-number"><ins class="diff-new">
+number
+</ins></a><ins class="diff-new">
+s,
+are
+type
+coerced,
+lossless
+data
+round-tripping
+can
+not
+be
+guaranted.
+Consider
+the
+following
+code
+example:
+</ins></p><pre class="example">var myObj1 = {<ins class="diff-new">
+               &quot;@context&quot;: {
+                 &quot;number&quot;: {
+                   &quot;@id&quot;: &quot;http://example.com/vocab#number&quot;,
+</ins>                   <span class="diff">&quot;@type&quot;: &quot;xsd:nonNegativeInteger&quot;</span><ins class="diff-new">
+                 }
+               },
+               &quot;number&quot; : <span class="diff">42</span>
+             };
+// Convert the JSON-LD document to RDF; this converts 42 to a string
+var jsonldText = jsonld.toRDF(myObj1, myRdfTripleCollector);
+// Convert the RDF triples back to a JavaScript object
+var
+myObj2
+=
+jsonld.fromRDF(myRdfTripleCollector.getTriples());
+</ins></pre><p><ins class="diff-new">
+At
+this
+point,
+</ins><code><ins class="diff-new">
+myObj1
+</ins></code><ins class="diff-new">
+and
+</ins><code><ins class="diff-new">
+myObj2
+</ins></code><ins class="diff-new">
+will
+have
+different
+values
+for
+the
+&quot;number&quot;
+property.
+</ins><code><ins class="diff-new">
+myObj1
+</ins></code><ins class="diff-new">
+will
+have
+the
+number
+</ins><code><ins class="diff-new">
+42
+</ins></code>,<ins class="diff-new">
+while
+</ins><code><ins class="diff-new">
+myObj2
+</ins></code><ins class="diff-new">
+have
+an
+object
+consisting
+of
+</ins><code><ins class="diff-new">
+@value
+</ins></code><ins class="diff-new">
+set
+to
+the
+string
+</ins><code><ins class="diff-new">
+&quot;42&quot;
+</ins></code><ins class="diff-new">
+and
+</ins><code><ins class="diff-new">
+@type
+</ins></code><ins class="diff-new">
+set
+to
+the
+expanded
+value
+of
+</ins><em><ins class="diff-new">
+xsd:nonNegativeInteger
+</ins></em>.
+</p>
+<p class="note">
+Some
+JSON
+serializers,
+such
+as
+PHP's
+native
+<del class="diff-old">implementation,
+backslash-escapes
+</del>
+<ins class="diff-chg">implementation
+in
+some
+versions,
+backslash-escape
+</ins>
+the
+forward
+slash
+character.
+For
+example,
+the
+value
+<code>
+http://example.com/
+</code>
+would
+be
+serialized
+as
+<code>
+http:\/\/example.com\/
+<del class="diff-old">in
+some
+versions
+of
+PHP.
+</del>
+</code>.
+This
+is
+problematic
+<del class="diff-old">when
+generating
+a
+byte
+stream
+for
+processes
+such
+</del>
+as
+<del class="diff-old">normalization.
+</del>
+<ins class="diff-chg">other
+JSON
+parsers
+might
+not
+understand
+those
+escaping
+characters.
+</ins>
+There
+is
+no
+need
+to
+backslash-escape
+<del class="diff-old">forward-slashes
+</del>
+<ins class="diff-chg">forward
+slashes
+</ins>
+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>
+<del class="diff-old">Round-tripping
+data
+can
+be
+problematic
+if
+we
+mix
+and
+match
+coercion
+rules
+with
+JSON-native
+datatypes,
+like
+integers.
+Consider
+the
+following
+code
+example:
+var myObj = { &quot;@context&quot; : {
+                &quot;number&quot; : {
+                  &quot;@id&quot;: &quot;http://example.com/vocab#number&quot;,
+                  &quot;@type&quot;: &quot;xsd:nonNegativeInteger&quot;
+                }
+              },
+              &quot;number&quot; : 42 };
+// Map the language-native object to JSON-LD
+var jsonldText = jsonld.normalize(myObj);
+// Convert the normalized object back to a JavaScript object
+var
+myObj2
+=
+jsonld.parse(jsonldText);
+At
+this
+point,
+myObj2
+and
+myObj
+will
+have
+different
+values
+for
+the
+&quot;number&quot;
+value.
+myObj
+will
+be
+the
+number
+42,
+while
+myObj2
+will
+be
+the
+string
+&quot;42&quot;.
+This
+type
+of
+data
+round-tripping
+error
+can
+bite
+developers.
+We
+are
+currently
+wondering
+if
+having
+a
+&quot;coercion
+validation&quot;
+phase
+in
+the
+parsing/normalization
+phases
+would
+be
+a
+good
+idea.
+It
+would
+prevent
+data
+round-tripping
+issues
+like
+the
+one
+mentioned
+above.
+</del>
+</div>
+<div id="rdf-conversion" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">3.13
+</del>
+<ins class="diff-chg">5.
+</ins>
+</span>
+RDF
+Conversion
+</h2>
+<p>
+A
+JSON-LD
+document
+<em class="rfc2119" title="may">
+may
+</em>
+be
+converted
+<del class="diff-old">to
+any
+</del>
+<ins class="diff-chg">between
+</ins>
+other
+RDF-compatible
+document
+<del class="diff-old">format
+</del>
+<ins class="diff-chg">formats
+</ins>
+using
+the
+<del class="diff-old">algorithm
+</del>
+<ins class="diff-chg">algorithms
+</ins>
+specified
+in
+this
+section.
+</p>
+<p>
+The
+JSON-LD
+Processing
+Model
+describes
+processing
+rules
+for
+extracting
+RDF
+from
+a
+JSON-LD
+<del class="diff-old">document.
+</del>
+<ins class="diff-chg">document,
+and
+for
+transforming
+an
+array
+of
+</ins><a href="#idl-def-Statement" class="idlType"><code><ins class="diff-chg">
+Statement
+</ins></code></a><ins class="diff-chg">
+retrieved
+by
+processing
+another
+serialization
+format
+into
+JSON-LD.
+</ins>
+Note
+that
+many
+uses
+of
+JSON-LD
+may
+not
+require
+generation
+of
+RDF.
+</p>
+<p>
+The
+processing
+<del class="diff-old">algorithm
+</del>
+<ins class="diff-chg">algorithms
+</ins>
+described
+in
+this
+section
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">are
+</ins>
+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
+<del class="diff-old">triples
+</del>
+<ins class="diff-chg">statements
+</ins>
+during
+the
+output
+process
+and
+are
+not
+required
+to
+implement
+the
+algorithm
+exactly
+as
+described.
+</p>
+<div class="informative section" id="overview">
+<h3>
+<span class="secno">
+<del class="diff-old">3.13.1
+</del>
+<ins class="diff-chg">5.1
+</ins>
+</span>
+Overview
+</h3>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+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.
+</p>
+<p>
+As
+with
+other
+grammars
+used
+for
+describing
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>,
+a
+key
+concept
+is
+that
+of
+a
+<dfn title="resource" id="dfn-resource">
+resource
+</dfn>.
+Resources
+may
+be
+of
+three
+basic
+types:
+<del class="diff-old">IRI
+</del>
+<a href="#idl-def-NamedNode" class="idlType">
+<code>
+<ins class="diff-chg">NamedNode
+</ins></code>
+<del class="diff-old">s,
+</del>
+</a>,
+<ins class="diff-chg">representing
+IRIs
+</ins>
+for
+describing
+externally
+named
+entities,
+<del class="diff-old">BNodes
+,
+</del>
+<a href="#idl-def-BlankNode" class="idlType">
+<code>
+<ins class="diff-chg">BlankNode
+</ins></code></a>,
+resources
+for
+which
+an
+external
+name
+does
+not
+exist,
+or
+is
+not
+known,
+and
+<del class="diff-old">Literals,
+</del>
+<a href="#idl-def-LiteralNode" class="idlType">
+<code>
+<ins class="diff-chg">LiteralNode
+</ins></code></a>,
+which
+describe
+terminal
+entities
+such
+as
+strings,
+dates
+and
+other
+representations
+having
+a
+lexical
+representation
+possibly
+including
+an
+explicit
+language
+or
+datatype.
+</p>
+<p>
+An
+Internationalized
+Resource
+Identifier
+(
+<dfn title="iri" id="dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</dfn>
+),
+as
+described
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC3987">
+RFC3987
+</a>
+</cite>
+],
+is
+a
+mechanism
+for
+representing
+unique
+identifiers
+on
+the
+web.
+In
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>,
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+is
+commonly
+used
+for
+expressing
+a
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>,
+a
+<a class="tref internalDFN" title="property" href="#dfn-property">
+property
+</a>
+or
+an
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>.
+</p>
+<p>
+Data
+described
+with
+JSON-LD
+may
+be
+considered
+to
+be
+the
+representation
+of
+a
+graph
+made
+up
+of
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>
+and
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+<a class="tref internalDFN" title="resource" href="#dfn-resource">
+resource
+</a>
+s
+related
+via
+a
+<a class="tref internalDFN" title="property" href="#dfn-property">
+property
+</a>
+<a class="tref internalDFN" title="resource" href="#dfn-resource">
+resource
+</a>.
+However,
+specific
+implementations
+may
+choose
+to
+operate
+on
+the
+document
+as
+a
+normal
+JSON
+description
+of
+objects
+having
+attributes.
+</p>
+</div>
+<div id="rdf-conversion-algorithm-terms" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">3.13.2
+</del>
+<ins class="diff-chg">5.2
+</ins>
+</span>
+RDF
+Conversion
+Algorithm
+Terms
+</h3>
+<dl>
+<dt>
+<del class="diff-old">default
+</del>
+<dfn title="graph_name" id="dfn-graph_name">
+graph
+<ins class="diff-new">name
+</ins>
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">the
+destination
+</del>
+<ins class="diff-chg">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">
+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">
+used
+to
+identify
+statements
+belonging
+to
+a
+</ins><em><ins class="diff-chg">
+named
+</ins>
+graph
+<del class="diff-old">for
+all
+triples
+generated
+by
+JSON-LD
+markup.
+</del>
+</em>.
+</dd>
+</dl>
+</div>
+<div id="convert-to-rdf-algorithm" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">3.13.3
+</del>
+<ins class="diff-chg">5.3
+</ins>
+</span>
+<ins class="diff-new">Convert
+to
+</ins>
+RDF
+<del class="diff-old">Conversion
+</del>
+Algorithm
+</h3>
+<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
+<del class="diff-old">default
+graph
+</del>
+<ins class="diff-chg">set
+of
+RDF
+</ins><a href="#idl-def-Statement" class="idlType"><code><ins class="diff-chg">
+Statement
+</ins></code>
+</a>
+<ins class="diff-new">s
+</ins>
+that
+the
+following
+algorithm
+generates:
+</p>
+<del class="diff-old">Create
+</del>
+<p>
+<ins class="diff-chg">The
+algorithm
+takes
+five
+input
+variables:
+</ins>
+a
+<del class="diff-old">new
+processor
+state
+with
+with
+the
+active
+context
+set
+</del>
+<em>
+<ins class="diff-chg">element
+</ins></em>
+to
+<del class="diff-old">the
+initial
+context
+and
+</del>
+<ins class="diff-chg">be
+converted,
+an
+</ins>
+<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">
+<ins class="diff-new">active
+property
+</ins>
+</a>
+and
+<a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">
+<ins class="diff-new">graph
+name
+</ins></a>.<ins class="diff-new">
+To
+begin,
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+<del class="diff-old">initialized
+</del>
+<ins class="diff-chg">and
+</ins><a class="tref internalDFN" title="graph_name" href="#dfn-graph_name"><ins class="diff-chg">
+graph
+name
+</ins></a><ins class="diff-chg">
+are
+set
+</ins>
+to
+<del class="diff-old">NULL.
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins></a>,<ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+is
+set
+to
+the
+result
+of
+performing
+the
+</ins><a href="#expansion-algorithm"><ins class="diff-chg">
+Expansion
+Algorithm
+</ins></a><ins class="diff-chg">
+on
+the
+</ins><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
+removes
+any
+existing
+context
+to
+allow
+the
+given
+context
+to
+be
+cleanly
+applied.
+</ins></p><ol class="algorithm">
+<li id="processing-step-associative">
+If
+<em>
+<ins class="diff-new">element
+</ins></em><ins class="diff-new">
+is
+</ins>
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+<del class="diff-old">is
+detected,
+</del>
+</a>,
+perform
+the
+following
+steps:
+<ol class="algorithm">
+<li>
+<del class="diff-old">If
+the
+JSON
+</del>
+<ins class="diff-chg">Set
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-chg">
+active
+</ins>
+object
+</a>
+<del class="diff-old">has
+a
+@context
+key,
+process
+the
+local
+context
+as
+described
+in
+Context
+.
+Create
+a
+copy
+of
+the
+current
+JSON
+object
+,
+changing
+keys
+that
+map
+</del>
+to
+<del class="diff-old">JSON-LD
+keyword
+s
+with
+those
+keyword
+s.
+Use
+the
+new
+JSON
+object
+in
+subsequent
+steps.
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins></a>.
+</li>
+<li>
+If
+<del class="diff-old">the
+JSON
+object
+</del>
+<em>
+<ins class="diff-chg">element
+</ins></em>
+has
+a
+<code>
+@value
+</code>
+<del class="diff-old">key,
+</del>
+<ins class="diff-chg">property,
+</ins>
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+a
+literal
+value
+as
+follows:
+<ol class="algorithm">
+<li>
+<del class="diff-old">as
+</del>
+<ins class="diff-chg">As
+</ins>
+a
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+if
+<del class="diff-old">the
+JSON
+object
+</del>
+<em>
+<ins class="diff-chg">element
+</ins></em>
+contains
+a
+<code>
+@type
+</code>
+<del class="diff-old">key
+</del>
+<ins class="diff-chg">property
+</ins>
+after
+performing
+<a href="#iri-expansion">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+</a>
+on
+the
+specified
+<code>
+@type
+</code>.
+</li>
+<li>
+<del class="diff-old">otherwise,
+</del>
+<ins class="diff-chg">Otherwise,
+</ins>
+as
+a
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>.
+If
+<del class="diff-old">the
+JSON
+object
+</del>
+<em>
+<ins class="diff-chg">element
+</ins></em>
+contains
+a
+<code>
+@language
+</code>
+<del class="diff-old">key,
+</del>
+<ins class="diff-chg">property,
+</ins>
+use
+it's
+value
+to
+set
+the
+language
+of
+the
+plain
+literal.
+</li>
+<del class="diff-old">If
+the
+neither
+the
+active
+subject
+nor
+the
+active
+property
+,
+generate
+a
+triple
+representing
+the
+active
+subject
+,
+the
+active
+property
+and
+the
+active
+object
+.
+Return
+the
+active
+object
+to
+the
+calling
+location.
+</del>
+</ol>
+</li>
+<li>
+If
+<del class="diff-old">the
+JSON
+object
+</del>
+<em>
+<ins class="diff-chg">element
+</ins></em>
+has
+a
+<code>
+@list
+</code>
+<del class="diff-old">key
+and
+</del>
+<ins class="diff-chg">property
+</ins>
+the
+value
+<del class="diff-old">is
+</del>
+<em class="rfc2119" title="must">
+<ins class="diff-chg">must
+</ins></em><ins class="diff-chg">
+be
+</ins>
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+<del class="diff-old">process
+the
+</del>
+</a>.
+<ins class="diff-chg">Process
+its
+</ins>
+value
+as
+a
+list
+as
+described
+in
+<a href="#list-conversion">
+List
+Conversion
+<del class="diff-old">.
+If
+</del>
+</a>
+<ins class="diff-chg">using
+</ins>
+the
+<del class="diff-old">JSON
+</del>
+<ins class="diff-chg">return
+value
+as
+the
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-chg">
+active
+</ins>
+object
+</a>
+<del class="diff-old">has
+a
+@id
+key:
+</del>
+</li>
+<li>
+If
+<del class="diff-old">the
+value
+is
+a
+string
+,
+set
+the
+</del>
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+<del class="diff-old">to
+the
+result
+of
+performing
+IRI
+Expansion
+.
+Generate
+</del>
+<ins class="diff-chg">is
+not
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>:<ol class="algorithm"><li><ins class="diff-chg">
+If
+nether
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-chg">
+active
+subject
+</ins></a><ins class="diff-chg">
+nor
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+are
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+generate
+</ins>
+a
+<del class="diff-old">triple
+</del>
+<a href="#idl-def-Statement" class="idlType">
+<code>
+<ins class="diff-chg">Statement
+</ins></code></a>
+representing
+<del class="diff-old">the
+</del>
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<del class="diff-old">the
+</del>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+<del class="diff-old">and
+the
+</del>
+</a>,
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>,
+<ins class="diff-new">and
+</ins><a class="tref internalDFN" title="graph_name" href="#dfn-graph_name"><ins class="diff-new">
+graph
+name
+</ins>
+</a>.
+<del class="diff-old">Set
+the
+active
+subject
+to
+the
+</del>
+</li>
+<li>
+<ins class="diff-chg">Return
+</ins>
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+</li>
+<del class="diff-old">Create
+</del>
+</ol>
+</li>
+<li id="processing-step-subject">
+<ins class="diff-chg">If
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+has
+</ins>
+a
+<del class="diff-old">new
+processor
+state
+copies
+of
+</del>
+<code>
+<ins class="diff-chg">@id
+</ins></code><ins class="diff-chg">
+property,
+</ins>
+the
+<del class="diff-old">active
+context
+</del>
+<ins class="diff-chg">value
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+be
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins>
+</a>,
+<ins class="diff-new">set
+the
+</ins>
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+<del class="diff-old">and
+active
+property
+.
+Process
+</del>
+<ins class="diff-chg">to
+</ins>
+the
+<ins class="diff-new">previously
+expanded
+</ins>
+value
+<del class="diff-old">starting
+at
+Step
+2
+.
+Proceed
+using
+the
+previous
+processor
+state
+.
+</del>
+<ins class="diff-chg">(either
+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">
+or
+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">
+).
+</ins>
+</li>
+<li>
+<del class="diff-old">If
+the
+JSON
+object
+</del>
+<ins class="diff-chg">Otherwise,
+if
+</ins><em><ins class="diff-chg">
+element
+</ins></em>
+does
+not
+have
+a
+<code>
+@id
+</code>
+<del class="diff-old">key,
+</del>
+<ins class="diff-chg">property,
+</ins>
+set
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+<del class="diff-old">object
+</del>
+<ins class="diff-chg">subject
+</ins>
+</a>
+to
+newly
+generated
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>.
+<del class="diff-old">Generate
+a
+triple
+representing
+the
+active
+subject
+,
+the
+active
+property
+and
+the
+active
+object
+.
+Set
+the
+active
+subject
+to
+the
+active
+object
+.
+</del>
+</li>
+<li>
+<del class="diff-old">For
+</del>
+<ins class="diff-chg">Process
+</ins>
+each
+<del class="diff-old">key
+</del>
+<em>
+<ins class="diff-chg">property
+</ins></em><ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+value
+</ins></em>
+in
+<del class="diff-old">the
+JSON
+object
+that
+has
+not
+already
+been
+processed,
+perform
+the
+following
+steps:
+</del>
+<em>
+<ins class="diff-chg">element
+</ins></em><ins class="diff-chg">
+as
+follows:
+</ins>
+<ol class="algorithm">
+<li>
+If
+<del class="diff-old">the
+key
+</del>
+<em>
+<ins class="diff-chg">property
+</ins></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,
+<del class="diff-old">set
+the
+</del>
+<ins class="diff-chg">if
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+is
+</ins><code><ins class="diff-chg">
+@graph
+</ins></code>,<ins class="diff-chg">
+process
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+algorithm
+recursively,
+using
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-chg">
+active
+subject
+</ins></a><ins class="diff-chg">
+as
+</ins><a class="tref internalDFN" title="graph_name" href="#dfn-graph_name"><ins class="diff-chg">
+graph
+name
+</ins></a><ins class="diff-chg">
+and
+null
+values
+for
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-chg">
+active
+subject
+</ins></a><ins class="diff-chg">
+and
+</ins>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+<ins class="diff-new">and
+then
+proceed
+</ins>
+to
+<del class="diff-old">the
+result
+of
+performing
+IRI
+Expansion
+on
+the
+key.
+</del>
+<ins class="diff-chg">next
+property.
+</ins>
+</li>
+<li>
+<del class="diff-old">If
+the
+active
+</del>
+<ins class="diff-chg">Otherwise,
+if
+</ins><em>
+property
+</em>
+is
+<del class="diff-old">the
+target
+of
+</del>
+a
+<del class="diff-old">@list
+coercion,
+and
+the
+value
+is
+an
+array
+</del>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+<ins class="diff-chg">keyword
+</ins>
+</a>,
+<del class="diff-old">process
+the
+value
+as
+a
+list
+as
+described
+in
+in
+List
+Conversion
+.
+</del>
+<ins class="diff-chg">skip
+this
+step.
+</ins>
+</li>
+<li>
+Otherwise,
+<del class="diff-old">create
+a
+new
+processor
+state
+</del>
+<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-new">to
+the
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+value
+of
+</ins><em><ins class="diff-new">
+property
+</ins></em>.</li><li><ins class="diff-new">
+Process
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+recursively
+using
+this
+algorithm,
+passing
+</ins>
+copies
+of
+<del class="diff-old">the
+active
+context
+,
+</del>
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+<del class="diff-old">and
+</del>
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+<del class="diff-old">process
+the
+value
+starting
+at
+Step
+2
+and
+proceed
+using
+the
+previous
+processor
+state
+</del>
+<a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">
+<ins class="diff-chg">graph
+name
+</ins>
+</a>.
+</li>
+</ol>
+</li>
+<li>
+<del class="diff-old">Return
+the
+</del>
+<ins class="diff-chg">Set
+</ins>
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+<del class="diff-old">the
+calling
+location.
+</del>
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+<ins class="diff-chg">active
+subject
+</ins></a>.
+</li>
+</ol>
+</li>
+<li>
+<del class="diff-old">If
+a
+regular
+</del>
+<ins class="diff-chg">Otherwise,
+if
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+is
+an
+</ins>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+<del class="diff-old">is
+detected,
+</del>
+</a>,
+process
+each
+value
+in
+the
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+<del class="diff-old">by
+doing
+the
+following
+returning
+the
+result
+of
+processing
+the
+last
+value
+in
+the
+array
+:
+Create
+a
+new
+processor
+state
+</del>
+<ins class="diff-chg">as
+follows,
+process
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+recursively
+using
+this
+algorithm,
+</ins>
+using
+copies
+of
+<del class="diff-old">the
+active
+context
+,
+</del>
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+<del class="diff-old">and
+</del>
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>,
+and
+<del class="diff-old">process
+the
+value
+starting
+at
+Step
+2
+then
+proceed
+using
+the
+previous
+processor
+state
+</del>
+<a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">
+<ins class="diff-chg">graph
+name
+</ins>
+</a>.
+</li>
+<del class="diff-old">If
+a
+string
+is
+detected:
+If
+the
+active
+property
+is
+the
+target
+of
+a
+@id
+coercion,
+set
+the
+active
+object
+by
+performing
+IRI
+Expansion
+on
+the
+string.
+</del>
+<li>
+Otherwise,
+if
+<del class="diff-old">the
+active
+property
+</del>
+<em>
+<ins class="diff-chg">element
+</ins></em>
+is
+<del class="diff-old">the
+target
+of
+coercion,
+set
+the
+active
+object
+by
+creating
+</del>
+a
+<del class="diff-old">typed
+literal
+using
+the
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+<del class="diff-old">and
+the
+coercion
+key
+as
+the
+datatype
+IRI
+.
+Otherwise,
+</del>
+</a>,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+a
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>
+value
+created
+from
+the
+string.
+<del class="diff-old">If
+the
+active
+context
+contains
+a
+language
+key
+with
+a
+non-
+null
+value,
+use
+it's
+value
+to
+set
+the
+language
+of
+the
+plain
+literal
+.
+</del>
+</li>
+<del class="diff-old">Generate
+</del>
+<li>
+<ins class="diff-chg">Otherwise,
+if
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+is
+</ins>
+a
+<del class="diff-old">triple
+representing
+the
+active
+subject
+</del>
+<a class="tref internalDFN" title="number" href="#dfn-number">
+<ins class="diff-chg">number
+</ins>
+</a>,
+<del class="diff-old">the
+active
+property
+and
+</del>
+<ins class="diff-chg">set
+</ins>
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+<del class="diff-old">.
+If
+a
+number
+</del>
+</a>
+<del class="diff-old">is
+detected,
+generate
+</del>
+<ins class="diff-chg">to
+</ins>
+a
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+using
+a
+string
+representation
+of
+the
+value
+with
+datatype
+set
+to
+either
+<code>
+xsd:integer
+</code>
+or
+<code>
+xsd:double
+</code>,
+depending
+on
+if
+the
+value
+contains
+a
+fractional
+and/or
+an
+exponential
+component.
+<del class="diff-old">Generate
+a
+triple
+using
+the
+active
+subject
+,
+active
+property
+and
+the
+generated
+typed
+literal.
+</del>
+</li>
+<li>
+Otherwise,
+if
+<em>
+<ins class="diff-new">element
+</ins></em><ins class="diff-new">
+is
+</ins>
+<strong>
+true
+</strong>
+or
+<strong>
+false
+<del class="diff-old">is
+detected,
+generate
+a
+triple
+using
+</del>
+</strong>,
+<ins class="diff-chg">set
+</ins>
+the
+<del class="diff-old">active
+subject
+,
+</del>
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">to
+</ins>
+a
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+<del class="diff-old">value
+</del>
+created
+from
+the
+string
+representation
+of
+the
+value
+with
+datatype
+set
+to
+<code>
+xsd:boolean
+</code>.
+</li>
+<li>
+<ins class="diff-new">If
+any
+of
+these
+steps
+created
+an
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a><ins class="diff-new">
+and
+neither
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a><ins class="diff-new">
+nor
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+are
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-new">
+null
+</ins></a>,<ins class="diff-new">
+generate
+a
+</ins><a href="#idl-def-Statement" class="idlType"><code><ins class="diff-new">
+Statement
+</ins></code></a><ins class="diff-new">
+using
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a>,<a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a>,<a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a><ins class="diff-new">
+and
+</ins><a class="tref internalDFN" title="graph_name" href="#dfn-graph_name"><ins class="diff-new">
+graph
+name
+</ins></a>.</li><li><ins class="diff-new">
+Return
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a>.</li>
+</ol>
+</div>
+<div id="list-conversion" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">3.13.4
+</del>
+<ins class="diff-chg">5.4
+</ins>
+</span>
+List
+Conversion
+</h3>
+<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" rel="biblioentry" 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
+<del class="diff-old">,
+and
+the
+active
+context
+</del>
+</a>
+and
+returns
+a
+value
+to
+be
+used
+as
+an
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+<del class="diff-old">.
+</del>
+</a>
+<ins class="diff-chg">in
+the
+calling
+location.
+</ins>
+</p>
+<div class="note">
+This
+algorithm
+does
+not
+support
+lists
+containing
+lists.
+</div>
+<ol class="algorithm">
+<li>
+If
+<em>
+array
+</em>
+is
+empty
+return
+<code>
+rdf:nil
+</code>.
+</li>
+<li>
+Otherwise,
+generate
+a
+<del class="diff-old">triple
+</del>
+<a href="#idl-def-Statement" class="idlType">
+<code>
+<ins class="diff-chg">Statement
+</ins></code></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
+<del class="diff-old">BNode
+</del>
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+<ins class="diff-chg">blank
+node
+</ins></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
+<del class="diff-old">the
+active
+context
+,
+</del>
+<em>
+first
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>
+</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
+<del class="diff-old">2
+</del>
+<ins class="diff-chg">1
+</ins>
+</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
+<del class="diff-old">BNode
+</del>
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+<ins class="diff-chg">blank
+node
+</ins></a>
+identified
+as
+<em>
+rest
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>
+</em>,
+otherwise
+use
+<code>
+rdf:nil
+</code>.
+</li>
+<li>
+Generate
+a
+new
+<del class="diff-old">triple
+</del>
+<a href="#idl-def-Statement" class="idlType">
+<code>
+<ins class="diff-chg">Statement
+</ins></code></a>
+using
+<em>
+first
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>
+</em>,
+<code>
+rdf:rest
+</code>
+and
+<em>
+rest
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>
+</em>.
+</li>
+<li>
+Set
+<em>
+first
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>
+</em>
+to
+<em>
+rest
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>
+</em>.
+</li>
+<li>
+Return
+<em>
+first
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>
+</em>.
+</li>
+</ol>
+</li>
+</ol>
+</div>
+<div id="convert-from-rdf-algorithm" class="section">
+<h3>
+<span class="secno">
+<ins class="diff-new">5.5
+</ins></span><ins class="diff-new">
+Convert
+from
+RDF
+Algorithm
+</ins></h3><p><ins class="diff-new">
+In
+some
+cases,
+data
+exists
+natively
+in
+Triples
+or
+Quads
+form;
+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
+</ins><a href="#idl-def-Statement" class="idlType"><code><ins class="diff-new">
+Statement
+</ins></code></a><ins class="diff-new">
+s
+into
+a
+JSON-LD
+document.
+</ins></p><p><ins class="diff-new">
+The
+conversion
+algorithm
+takes
+a
+single
+parameter
+</ins><em><ins class="diff-new">
+input
+</ins></em><ins class="diff-new">
+in
+the
+form
+of
+an
+array
+of
+</ins><a href="#idl-def-Statement" class="idlType"><code><ins class="diff-new">
+Statement
+</ins></code></a><ins class="diff-new">
+representations.
+</ins></p><ol class="algorithm"><li><ins class="diff-new">
+Construct
+a
+JSON
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-new">
+array
+</ins></a><em><ins class="diff-new">
+array
+</ins></em><ins class="diff-new">
+to
+serve
+as
+the
+output
+object.
+</ins></li><li><ins class="diff-new">
+Construct
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><em><ins class="diff-new">
+listMap
+</ins></em><ins class="diff-new">
+to
+map
+graph
+names
+and
+subjects
+to
+objects
+derived
+from
+statements
+having
+a
+property
+of
+</ins><code><ins class="diff-new">
+rdf:first
+</ins></code>.</li><li><ins class="diff-new">
+Construct
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><em><ins class="diff-new">
+restMap
+</ins></em><ins class="diff-new">
+to
+map
+graph
+names
+and
+subjects
+to
+objects
+derived
+from
+statements
+having
+a
+property
+of
+</ins><code><ins class="diff-new">
+rdf:rest
+</ins></code>.</li><li><ins class="diff-new">
+Construct
+a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><em><ins class="diff-new">
+subjectMap
+</ins></em><ins class="diff-new">
+to
+map
+graph
+names
+and
+subjects
+to
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+instances
+contained
+in
+</ins><em><ins class="diff-new">
+array
+</ins></em>.</li><li><ins class="diff-new">
+For
+each
+statement
+in
+</ins><em><ins class="diff-new">
+input
+</ins></em>:<ol class="algorithm"><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+property
+</ins></em><ins class="diff-new">
+is
+</ins><code><ins class="diff-new">
+rdf:first
+</ins></code>,<ins class="diff-new">
+create
+a
+new
+entry
+in
+</ins><em><ins class="diff-new">
+listMap
+</ins></em><ins class="diff-new">
+with
+for
+</ins><em><ins class="diff-new">
+name
+</ins></em><ins class="diff-new">
+and
+</ins><em><ins class="diff-new">
+subject
+</ins></em><ins class="diff-new">
+and
+an
+array
+value
+containing
+</ins><em><ins class="diff-new">
+object
+</ins></em><ins class="diff-new">
+representation
+and
+skip
+to
+the
+next
+statement.
+</ins></li><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+property
+</ins></em><ins class="diff-new">
+is
+</ins><code><ins class="diff-new">
+rdf:rest
+</ins></code>,<ins class="diff-new">
+and
+</ins><em><ins class="diff-new">
+object
+</ins></em><ins class="diff-new">
+is
+a
+</ins><a href="#idl-def-BlankNode" class="idlType"><code><ins class="diff-new">
+BlankNode
+</ins></code></a>,<ins class="diff-new">
+create
+a
+new
+entry
+in
+</ins><em><ins class="diff-new">
+restMap
+</ins></em><ins class="diff-new">
+to
+map
+</ins><em><ins class="diff-new">
+name
+</ins></em><ins class="diff-new">
+and
+</ins><em><ins class="diff-new">
+subject
+</ins></em><ins class="diff-new">
+to
+a
+value
+being
+the
+result
+of
+</ins><a href="#iri-expansion"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr><ins class="diff-new">
+expansion
+</ins></a><ins class="diff-new">
+on
+</ins><em><ins class="diff-new">
+object
+</ins></em><ins class="diff-new">
+and
+skip
+to
+the
+next
+statement.
+</ins></li><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+name
+</ins></em><ins class="diff-new">
+is
+not
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-new">
+null
+</ins></a>:<ol class="algorithm"><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+subjectMap
+</ins></em><ins class="diff-new">
+does
+not
+have
+an
+entry
+for
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-new">
+null
+</ins></a><ins class="diff-new">
+as
+name
+and
+</ins><em><ins class="diff-new">
+name
+</ins></em><ins class="diff-new">
+as
+subject:
+</ins><ol class="algorithm"><li><ins class="diff-new">
+Create
+a
+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">
+with
+key/value
+pair
+of
+</ins><code><ins class="diff-new">
+@id
+</ins></code><ins class="diff-new">
+and
+a
+string
+representation
+of
+</ins><em><ins class="diff-new">
+name
+</ins></em><ins class="diff-new">
+and
+use
+as
+</ins><em><ins class="diff-new">
+value
+</ins></em>.</li><li><ins class="diff-new">
+Save
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+in
+</ins><em><ins class="diff-new">
+subjectMap
+</ins></em><ins class="diff-new">
+and
+append
+to
+</ins><em><ins class="diff-new">
+array
+</ins></em>.</li></ol></li><li><ins class="diff-new">
+Otherwise,
+use
+that
+entry
+as
+</ins><em><ins class="diff-new">
+value
+</ins></em>.</li><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+does
+not
+have
+an
+entry
+for
+</ins><code><ins class="diff-new">
+@graph
+</ins></code>,<ins class="diff-new">
+initialize
+it
+as
+a
+new
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-new">
+array
+</ins></a><em><ins class="diff-new">
+ary
+</ins></em>.</li><li><ins class="diff-new">
+Otherwise,
+let
+</ins><em><ins class="diff-new">
+ary
+</ins></em><ins class="diff-new">
+be
+that
+array.
+</ins></li><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+subjectMap
+</ins></em><ins class="diff-new">
+does
+not
+have
+an
+entry
+for
+</ins><code><ins class="diff-new">
+name
+</ins></code><ins class="diff-new">
+and
+</ins><em><ins class="diff-new">
+subject
+</ins></em>:<ol class="algorithm"><li><ins class="diff-new">
+Create
+a
+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">
+with
+key/value
+pair
+of
+</ins><code><ins class="diff-new">
+@id
+</ins></code><ins class="diff-new">
+and
+a
+string
+representation
+of
+</ins><em><ins class="diff-new">
+subject
+</ins></em><ins class="diff-new">
+and
+use
+as
+</ins><em><ins class="diff-new">
+value
+</ins></em>.</li><li><ins class="diff-new">
+Save
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+in
+</ins><em><ins class="diff-new">
+subjectMap
+</ins></em><ins class="diff-new">
+and
+append
+to
+</ins><em><ins class="diff-new">
+ary
+</ins></em>.</li></ol></li><li><ins class="diff-new">
+Otherwise,
+use
+that
+entry
+as
+</ins><em><ins class="diff-new">
+value
+</ins></em>.</li></ol></li><li><ins class="diff-new">
+Otherwise,
+if
+</ins><em><ins class="diff-new">
+subjectMap
+</ins></em><ins class="diff-new">
+does
+not
+have
+an
+entry
+for
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-new">
+null
+</ins></a><ins class="diff-new">
+as
+name
+and
+</ins><em><ins class="diff-new">
+subject
+</ins></em>:<ol class="algorithm"><li><ins class="diff-new">
+Create
+a
+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">
+with
+key/value
+pair
+of
+</ins><code><ins class="diff-new">
+@id
+</ins></code><ins class="diff-new">
+and
+a
+string
+representation
+of
+</ins><em><ins class="diff-new">
+subject
+</ins></em><ins class="diff-new">
+and
+use
+as
+</ins><em><ins class="diff-new">
+value
+</ins></em>.</li><li><ins class="diff-new">
+Save
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+in
+</ins><em><ins class="diff-new">
+subjectMap
+</ins></em><ins class="diff-new">
+and
+append
+to
+</ins><em><ins class="diff-new">
+array
+</ins></em>.</li></ol></li><li><ins class="diff-new">
+Otherwise,
+use
+that
+entry
+as
+</ins><em><ins class="diff-new">
+value
+</ins></em>.</li><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+property
+</ins></em><ins class="diff-new">
+is
+</ins><code><ins class="diff-new">
+rdf:type
+</ins></code>:<ol class="algorithm"><li><ins class="diff-new">
+Append
+the
+string
+representation
+of
+</ins><em><ins class="diff-new">
+object
+</ins></em><ins class="diff-new">
+to
+the
+array
+value
+for
+the
+key
+</ins><code><ins class="diff-new">
+@type
+</ins></code>,<ins class="diff-new">
+creating
+an
+entry
+in
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+if
+necessary.
+</ins></li></ol></li><li><ins class="diff-new">
+Otherwise,
+if
+</ins><em><ins class="diff-new">
+object
+</ins></em><ins class="diff-new">
+is
+</ins><code><ins class="diff-new">
+rdf:nil
+</ins></code>:<ol class="algorithm"><li><ins class="diff-new">
+Let
+</ins><em><ins class="diff-new">
+key
+</ins></em><ins class="diff-new">
+be
+the
+string
+representation
+of
+</ins><em><ins class="diff-new">
+property
+</ins></em>.</li><li><ins class="diff-new">
+Set
+the
+value
+for
+</ins><em><ins class="diff-new">
+key
+</ins></em><ins class="diff-new">
+in
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+to
+an
+empty
+</ins><code><ins class="diff-new">
+@list
+</ins></code><ins class="diff-new">
+representation:
+</ins><code><ins class="diff-new">
+{&quot;@list&quot;:
+[]}
+</ins></code>.</li></ol></li><li><ins class="diff-new">
+Otherwise,
+</ins><ol class="algorithm"><li><ins class="diff-new">
+Let
+</ins><em><ins class="diff-new">
+key
+</ins></em><ins class="diff-new">
+be
+the
+string
+representation
+of
+</ins><em><ins class="diff-new">
+property
+</ins></em><ins class="diff-new">
+and
+let
+</ins><em><ins class="diff-new">
+object
+representation
+</ins></em><ins class="diff-new">
+be
+</ins><em><ins class="diff-new">
+object
+</ins></em><ins class="diff-new">
+represented
+in
+expanded
+form
+as
+described
+in
+</ins><a href="#value-expansion"><ins class="diff-new">
+Value
+Expansion
+</ins></a>.</li><li><ins class="diff-new">
+Append
+</ins><em><ins class="diff-new">
+object
+representation
+</ins></em><ins class="diff-new">
+to
+the
+array
+value
+for
+</ins><em><ins class="diff-new">
+key
+</ins></em>,<ins class="diff-new">
+creating
+an
+entry
+in
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+if
+necessary.
+</ins></li></ol></li></ol></li><li><ins class="diff-new">
+For
+each
+</ins><em><ins class="diff-new">
+name
+</ins></em>,<em><ins class="diff-new">
+map
+</ins></em><ins class="diff-new">
+in
+</ins><em><ins class="diff-new">
+restMap
+</ins></em>:<ol class="algorithm"><li><ins class="diff-new">
+For
+each
+key/value
+</ins><em><ins class="diff-new">
+prev
+</ins></em>,<em><ins class="diff-new">
+rest
+</ins></em><ins class="diff-new">
+entry
+in
+</ins><em><ins class="diff-new">
+map
+</ins></em>,<ins class="diff-new">
+append
+to
+the
+</ins><em><ins class="diff-new">
+listMap
+</ins></em><ins class="diff-new">
+value
+identified
+by
+</ins><em><ins class="diff-new">
+name
+</ins></em><ins class="diff-new">
+and
+</ins><em><ins class="diff-new">
+prev
+</ins></em><ins class="diff-new">
+the
+</ins><em><ins class="diff-new">
+listMap
+</ins></em><ins class="diff-new">
+value
+identified
+by
+</ins><em><ins class="diff-new">
+name
+</ins></em><ins class="diff-new">
+and
+</ins><em><ins class="diff-new">
+rest
+</ins></em>.</li></ol></li><li><ins class="diff-new">
+For
+each
+</ins><em><ins class="diff-new">
+name
+</ins></em>,<em><ins class="diff-new">
+map
+</ins></em><ins class="diff-new">
+in
+</ins><em><ins class="diff-new">
+listMap
+</ins></em>:<ol class="algorithm"><li><ins class="diff-new">
+For
+each
+key/value
+</ins><em><ins class="diff-new">
+node
+</ins></em>,<em><ins class="diff-new">
+list
+</ins></em>,<ins class="diff-new">
+in
+</ins><em><ins class="diff-new">
+map
+</ins></em><ins class="diff-new">
+where
+</ins><em><ins class="diff-new">
+list
+</ins></em><ins class="diff-new">
+exists
+as
+a
+value
+of
+an
+object
+in
+</ins><em><ins class="diff-new">
+array
+</ins></em>,<ins class="diff-new">
+replace
+the
+object
+value
+with
+</ins><em><ins class="diff-new">
+list
+</ins></em>.</li></ol></li><li><ins class="diff-new">
+Return
+array
+as
+the
+graph
+representation
+in
+expanded
+form.
+</ins></li></ol></div>
+</div>
+<div class="appendix informative section" id="iana-considerations">
+<h2>
+<span class="secno">
+<ins class="diff-new">A.
+</ins></span><ins class="diff-new">
+IANA
+Considerations
+</ins></h2><p><em><ins class="diff-new">
+This
+section
+is
+non-normative.
+</ins></em></p><p><ins class="diff-new">
+This
+section
+is
+included
+merely
+for
+standards
+community
+review
+and
+will
+be
+submitted
+to
+the
+Internet
+Engineering
+Steering
+Group
+if
+this
+specification
+becomes
+a
+W3C
+Recommendation.
+</ins></p><dl><dt><ins class="diff-new">
+Type
+name:
+</ins></dt><dd><ins class="diff-new">
+application
+</ins></dd><dt><ins class="diff-new">
+Subtype
+name:
+</ins></dt><dd><ins class="diff-new">
+ld-frame+json
+</ins></dd><dt><ins class="diff-new">
+Required
+parameters:
+</ins></dt><dd><ins class="diff-new">
+None
+</ins></dd><dt><ins class="diff-new">
+Optional
+parameters:
+</ins></dt><dd><ins class="diff-new">
+None
+</ins></dd><dt><ins class="diff-new">
+Encoding
+considerations:
+</ins></dt><dd><ins class="diff-new">
+The
+same
+as
+the
+</ins><code><ins class="diff-new">
+application/json
+</ins></code><ins class="diff-new">
+MIME
+media
+type.
+</ins></dd><dt><ins class="diff-new">
+Security
+considerations:
+</ins></dt><dd><ins class="diff-new">
+Since
+a
+JSON-LD
+frame
+is
+intended
+to
+specify
+a
+deterministic
+layout
+for
+a
+JSON-LD
+graph,
+the
+serialization
+</ins><em class="rfc2119" title="should not"><ins class="diff-new">
+should
+not
+</ins></em><ins class="diff-new">
+be
+passed
+through
+a
+code
+execution
+mechanism
+such
+as
+JavaScript's
+</ins><code><ins class="diff-new">
+eval()
+</ins></code><ins class="diff-new">
+function.
+It
+is
+</ins><em class="rfc2119" title="recommended"><ins class="diff-new">
+recommended
+</ins></em><ins class="diff-new">
+that
+a
+conforming
+parser
+does
+not
+attempt
+to
+directly
+evaluate
+the
+JSON-LD
+frame
+and
+instead
+purely
+parse
+the
+input
+into
+a
+language-native
+data
+structure.
+</ins></dd><dt><ins class="diff-new">
+Interoperability
+considerations:
+</ins></dt><dd><ins class="diff-new">
+Not
+Applicable
+</ins></dd><dt><ins class="diff-new">
+Published
+specification:
+</ins></dt><dd><ins class="diff-new">
+The
+</ins><a href="http://json-ld.org/spec/latest/"><ins class="diff-new">
+JSON-LD
+</ins></a><ins class="diff-new">
+specification.
+</ins></dd><dt><ins class="diff-new">
+Applications
+that
+use
+this
+media
+type:
+</ins></dt><dd><ins class="diff-new">
+Any
+programming
+environment
+that
+requires
+the
+exchange
+of
+directed
+graphs.
+Implementations
+of
+JSON-LD
+have
+been
+created
+for
+JavaScript,
+Python,
+Ruby,
+PHP
+and
+C++.
+</ins></dd><dt><ins class="diff-new">
+Additional
+information:
+</ins></dt><dd><dl><dt><ins class="diff-new">
+Magic
+number(s):
+</ins></dt><dd><ins class="diff-new">
+Not
+Applicable
+</ins></dd><dt><ins class="diff-new">
+File
+extension(s):
+</ins></dt><dd>.jsonldf</dd><dt><ins class="diff-new">
+Macintosh
+file
+type
+code(s):
+</ins></dt><dd><ins class="diff-new">
+TEXT
+</ins></dd></dl></dd><dt><ins class="diff-new">
+Person
+&amp;
+email
+address
+to
+contact
+for
+further
+information:
+</ins></dt><dd><ins class="diff-new">
+Manu
+Sporny
+&lt;msporny@digitalbazaar.com&gt;
+</ins></dd><dt><ins class="diff-new">
+Intended
+usage:
+</ins></dt><dd><ins class="diff-new">
+Common
+</ins></dd><dt><ins class="diff-new">
+Restrictions
+on
+usage:
+</ins></dt><dd><ins class="diff-new">
+None
+</ins></dd><dt><ins class="diff-new">
+Author(s):
+</ins></dt><dd><ins class="diff-new">
+Manu
+Sporny,
+Gregg
+Kellogg,
+Markus
+Lanthaler,
+Dave
+Longley
+</ins></dd><dt><ins class="diff-new">
+Change
+controller:
+</ins></dt><dd><ins class="diff-new">
+W3C
+</ins></dd></dl></div><div id="appendix-b" class="appendix section"><h2><span class="secno"><ins class="diff-new">
+B.
+</ins></span><ins class="diff-new">
+Initial
+Context
+</ins></h2><p><ins class="diff-new">
+The
+</ins><a class="tref internalDFN" title="initial_context" href="#dfn-initial_context"><ins class="diff-new">
+initial
+context
+</ins></a><ins class="diff-new">
+is
+defined
+with
+the
+following
+default
+entries:
+</ins></p><pre class="example">{<ins class="diff-new">
+  &quot;@context&quot;: {
+    &quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&quot;: { &quot;@type&quot;: &quot;@id&quot;}
+  }
+}
+</ins></pre><p><ins class="diff-new">
+Processors
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+act
+as
+if
+the
+initial
+context
+is
+defined
+in
+the
+outer-most
+level
+when
+processing
+JSON-LD
+documents.
+</ins></p><p class="issue"><ins class="diff-new">
+Should
+we
+define
+other
+default
+prefixes?
+</ins></p>
+</div>
+<div class="appendix section" id="acknowledgements">
+<h2>
+<span class="secno">
+<del class="diff-old">A.
+</del>
+<ins class="diff-chg">C.
+</ins>
+</span>
+Acknowledgements
+</h2>
+<p>
+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,
+Dave
+Lehn
+and
+Mike
+Johnson
+who
+reviewed,
+provided
+feedback,
+and
+performed
+several
+implementations
+of
+the
+specification,
+and
+Ian
+Davis,
+who
+created
+RDF/JSON.
+Thanks
+also
+to
+Nathan
+Rixham,
+Bradley
+P.
+Allen,
+Kingsley
+Idehen,
+Glenn
+McDonald,
+Alexandre
+Passant,
+Danny
+Ayers,
+Ted
+Thibodeau
+Jr.,
+Olivier
+Grisel,
+Niklas
+Lindström,
+Markus
+Lanthaler,
+and
+Richard
+Cyganiak
+for
+their
+input
+on
+the
+specification.
+</p>
+</div>
+<del class="diff-old">B.
+Initial
+Context
+The
+initial
+context
+is
+defined
+with
+the
+following
+default
+entries:
+{
+  &quot;@context&quot;: {
+    &quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&quot;: { &quot;@type&quot;: &quot;@id&quot;}
+  }
+}
+Processors
+must
+act
+as
+if
+the
+initial
+context
+is
+defined
+in
+the
+outer-most
+level
+when
+processing
+JSON-LD
+documents.
+Should
+we
+define
+other
+default
+prefixes?
+</del>
+<div id="references" class="appendix section">
+<h2>
+<span class="secno">
+<del class="diff-old">C.
+</del>
+<ins class="diff-chg">D.
+</ins>
+</span>
+References
+</h2>
+<div id="normative-references" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">C.1
+</del>
+<ins class="diff-chg">D.1
+</ins>
+</span>
+Normative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-BCP47">
+<ins class="diff-new">[BCP47]
+</ins></dt><dd><ins class="diff-new">
+A.
+Phillips,
+M.
+Davis.
+</ins><a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite><ins class="diff-new">
+Tags
+for
+Identifying
+Languages
+</ins></cite></a><ins class="diff-new">
+September
+2009.
+IETF
+Best
+Current
+Practice.
+URL:
+</ins><a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><ins class="diff-new">
+http://tools.ietf.org/rfc/bcp/bcp47.txt
+</ins></a></dd><dt id="bib-IEEE-754-1985"><ins class="diff-new">
+[IEEE-754-1985]
+</ins></dt><dd><ins class="diff-new">
+IEEE.
+</ins><cite><ins class="diff-new">
+IEEE
+Standard
+for
+Binary
+Floating-Point
+Arithmetic.
+</ins></cite><ins class="diff-new">
+See
+</ins><a href="http://standards.ieee.org/reading/ieee/std_public/description/busarch/754-1985_desc.html"><ins class="diff-new">
+http://standards.ieee.org/reading/ieee/std_public/description/busarch/754-1985_desc.html
+</ins></a></dd><dt id="bib-IRI"><ins class="diff-new">
+[IRI]
+</ins></dt><dd><ins class="diff-new">
+M.
+Duerst,
+M.
+Suignard.
+</ins><a href="http://www.ietf.org/rfc/rfc3987.txt"><cite><ins class="diff-new">
+Internationalized
+Resource
+Identifiers
+(IRI).
+</ins></cite></a><ins class="diff-new">
+January
+2005.
+Internet
+RFC
+3987.
+URL:
+</ins><a href="http://www.ietf.org/rfc/rfc3986.txt"><ins class="diff-new">
+http://www.ietf.org/rfc/rfc3987.txt
+</ins></a></dd>
+<dt id="bib-JSON-LD">
+[JSON-LD]
+</dt>
+<dd>
+Manu
+Sporny,
+Gregg
+<del class="diff-old">Kellogg.
+</del>
+<ins class="diff-chg">Kellogg,
+Markus
+Lanthaler.
+</ins>
+<a href="http://json-ld.org/spec/latest/json-ld-syntax/">
+<cite>
+The
+JSON-LD
+Syntax
+</cite>
+</a>
+Latest.
+W3C
+Editor's
+Draft.
+URL:
+<a href="http://json-ld.org/spec/latest/json-ld-syntax/">
+http://json-ld.org/spec/latest/json-ld-syntax/
+</a>
+</dd>
+<dt id="bib-JSON-POINTER">
+[JSON-POINTER]
+</dt>
+<dd>
+P.
+Bryan,
+Ed.
+<cite>
+<a href="http://www.ietf.org/id/draft-pbryan-zyp-json-pointer-01.txt">
+JSON
+Pointer
+</a>
+</cite>
+Latest.
+IETF
+Draft.
+URL:
+<a href="http://www.ietf.org/id/draft-pbryan-zyp-json-pointer-01.txt">
+http://www.ietf.org/id/draft-pbryan-zyp-json-pointer-01.txt
+</a>
+</dd>
+<dt id="bib-RDF-CONCEPTS">
+[RDF-CONCEPTS]
+</dt>
+<dd>
+Graham
+Klyne;
+Jeremy
+J.
+Carroll.
+<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
+<cite>
+Resource
+Description
+Framework
+(RDF):
+Concepts
+and
+Abstract
+Syntax.
+</cite>
+</a>
+10
+February
+2004.
+W3C
+Recommendation.
+URL:
+<del class="diff-old">&lt;a href="http://w
+</del>
+<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
+<ins class="diff-chg">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
+</ins></a></dd><dt id="bib-RDF-SCHEMA"><ins class="diff-chg">
+[RDF-SCHEMA]
+</ins></dt><dd><ins class="diff-chg">
+Dan
+Brickley;
+Ramanathan
+V.
+Guha.
+</ins><a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210"><cite><ins class="diff-chg">
+RDF
+Vocabulary
+Description
+Language
+1.0:
+RDF
+Schema.
+</ins></cite></a><ins class="diff-chg">
+10
+February
+2004.
+W3C
+Recommendation.
+URL:
+</ins><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-RFC3986"><ins class="diff-chg">
+[RFC3986]
+</ins></dt><dd><ins class="diff-chg">
+T.
+Berners-Lee;
+R.
+Fielding;
+L.
+Masinter.
+</ins><a href="http://www.ietf.org/rfc/rfc3986.txt"><cite><ins class="diff-chg">
+Uniform
+Resource
+Identifier
+(URI):
+Generic
+Syntax.
+</ins></cite></a><ins class="diff-chg">
+January
+2005.
+Internet
+RFC
+3986.
+URL:
+</ins><a href="http://www.ietf.org/rfc/rfc3986.txt"><ins class="diff-chg">
+http://www.ietf.org/rfc/rfc3986.txt
+</ins></a></dd><dt id="bib-RFC3987"><ins class="diff-chg">
+[RFC3987]
+</ins></dt><dd><ins class="diff-chg">
+M.
+Dürst;
+M.
+Suignard.
+</ins><a href="http://www.ietf.org/rfc/rfc3987.txt"><cite><ins class="diff-chg">
+Internationalized
+Resource
+Identifiers
+(IRIs).
+</ins></cite></a><ins class="diff-chg">
+January
+2005.
+Internet
+RFC
+3987.
+URL:
+</ins><a href="http://www.ietf.org/rfc/rfc3987.txt"><ins class="diff-chg">
+http://www.ietf.org/rfc/rfc3987.txt
+</ins></a></dd><dt id="bib-RFC4627"><ins class="diff-chg">
+[RFC4627]
+</ins></dt><dd><ins class="diff-chg">
+D.
+Crockford.
+</ins><a href="http://www.ietf.org/rfc/rfc4627.txt"><cite><ins class="diff-chg">
+The
+application/json
+Media
+Type
+for
+JavaScript
+Object
+Notation
+(JSON)
+</ins></cite></a><ins class="diff-chg">
+July
+2006.
+Internet
+RFC
+4627.
+URL:
+</ins><a href="http://www.ietf.org/rfc/rfc4627.txt"><ins class="diff-chg">
+http://www.ietf.org/rfc/rfc4627.txt
+</ins></a></dd><dt id="bib-WEBIDL"><ins class="diff-chg">
+[WEBIDL]
+</ins></dt><dd><ins class="diff-chg">
+Cameron
+McCormack.
+</ins><a href="http://www.w3.org/TR/2011/WD-WebIDL-20110927/"><cite><ins class="diff-chg">
+Web
+IDL.
+</ins></cite></a><ins class="diff-chg">
+27
+September
+2011.
+W3C
+Working
+Draft.
+(Work
+in
+progress.)
+URL:
+</ins><a href="http://www.w3.org/TR/2011/WD-WebIDL-20110927/"><ins class="diff-chg">
+http://www.w3.org/TR/2011/WD-WebIDL-20110927/
+</ins></a></dd><dt id="bib-XMLSCHEMA-2"><ins class="diff-chg">
+[XMLSCHEMA-2]
+</ins></dt><dd><ins class="diff-chg">
+Paul
+V.
+Biron;
+Ashok
+Malhotra.
+</ins><a href="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/"><cite><ins class="diff-chg">
+XML
+Schema
+Part
+2:
+Datatypes
+Second
+Edition.
+</ins></cite></a><ins class="diff-chg">
+28
+October
+2004.
+W3C
+Recommendation.
+URL:
+</ins><a href="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/"><ins class="diff-chg">
+http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/
+</ins></a></dd></dl></div><div id="informative-references" class="section"><h3><span class="secno"><ins class="diff-chg">
+D.2
+</ins></span><ins class="diff-chg">
+Informative
+references
+</ins></h3><dl class="bibliography"><dt id="bib-ECMA-262"><ins class="diff-chg">
+[ECMA-262]
+</ins></dt><dd><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><cite><ins class="diff-chg">
+ECMAScript
+Language
+Specification.
+</ins></cite></a><ins class="diff-chg">
+December
+1999.
+URL:
+</ins><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><ins class="diff-chg">
+http://www.ecma-international.org/publications/standards/Ecma-262.htm
+</ins></a></dd><dt id="bib-MICRODATA"><ins class="diff-chg">
+[MICRODATA]
+</ins></dt><dd><ins class="diff-chg">
+Ian
+Hickson;
+et
+al.
+</ins><a href="http://www.w3.org/TR/microdata/"><cite><ins class="diff-chg">
+Microdata
+</ins></cite></a><ins class="diff-chg">
+04
+March
+2010.
+W3C
+Working
+Draft.
+URL:
+</ins><a href="http://www.w3.org/TR/microdata/"><ins class="diff-chg">
+http://www.w3.org/TR/microdata/
+</ins></a></dd><dt id="bib-MICROFORMATS"><ins class="diff-chg">
+[MICROFORMATS]
+</ins></dt><dd><a href="http://microformats.org"><cite><ins class="diff-chg">
+Microformats
+</ins></cite></a>.<ins class="diff-chg">
+URL:
+</ins><a href="http://microformats.org"><ins class="diff-chg">
+http://microformats.org
+</ins></a></dd><dt id="bib-RDFA-CORE"><ins class="diff-chg">
+[RDFA-CORE]
+</ins></dt><dd><ins class="diff-chg">
+Shane
+McCarron;
+et
+al.
+</ins><a href="http://www.w3.org/TR/2012/CR-rdfa-core-20120313/"><cite><ins class="diff-chg">
+RDFa
+Core
+1.1:
+Syntax
+and
+processing
+rules
+for
+embedding
+RDF
+through
+attributes.
+</ins></cite></a><ins class="diff-chg">
+13
+March
+2012.
+W3C
+Candidate
+Recommendation.
+URL:
+</ins><a href="http://www.w3.org/TR/2012/CR-rdfa-core-20120313/"><ins class="diff-chg">
+http://www.w3.org/TR/2012/CR-rdfa-core-20120313/
+</ins>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-api/20120426/index.html	Thu Apr 26 13:04:54 2012 +0200
@@ -0,0 +1,2546 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>The JSON-LD API 1.0</title>
+<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
+
+<!--
+  === 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>
+.diff { font-weight:bold; color:#0a3; }
+ol.algorithm.update { margin-left: 2em; }
+ol.algorithm.update>li { list-style-type: none; }
+ol.algorithm.update>li>span.list-number {
+  display:block;
+  float: left;
+  margin-left: -3.5em;
+}
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- 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;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- 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 {
+    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 {
+    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%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- 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;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+    }
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">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, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
+
+<body style="display: inherit;"><div class="head"><p></p><h1 id="title" class="title">The JSON-LD API 1.0</h1><h2 id="subtitle">An Application Programming Interface for the JSON-LD Syntax</h2><h2 id="unofficial-draft-26-april-2012">Unofficial Draft 26 April 2012</h2><dl><dt>Editors:</dt><dd><a href="http://manu.sporny.org/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, <a href="http://kellogg-assoc.com/">Kellogg Associates</a></dd>
+<dd><a href="http://digitalbazaar.com/">Dave Longley</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dd><a href="http://www.markus-lanthaler.com/">Markus Lanthaler</a>, <a href="http://www.tugraz.at/">Graz University of Technology</a></dd>
+<dt>Authors:</dt><dd><a href="http://digitalbazaar.com/">Dave Longley</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, <a href="http://kellogg-assoc.com/">Kellogg Associates</a></dd>
+<dd><a href="http://www.markus-lanthaler.com/">Markus Lanthaler</a>, <a href="http://www.tugraz.at/">Graz University of Technology</a></dd>
+</dl><p>This document is also available in this non-normative format: <a href="diff-20120112.html">diff to previous version</a>.</p><p class="copyright">This document is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/" class="subfoot">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
+<div id="abstract" class="introductory section"><h2>Abstract</h2>
+<p>
+JSON [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] has proven to be a highly useful object serialization and
+messaging format. JSON-LD [<cite><a class="bibref" rel="biblioentry" 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.
+</p>
+</div><div class="introductory section" id="sotd"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
+<p>This document is an experimental work in progress.</p>
+
+<!--  <p>
+This document has been reviewed by W3C Members, by software
+developers, and by other W3C groups and interested parties, and is
+endorsed by the Director as a W3C Recommendation. It is a stable
+document and may be used as reference material or cited from another
+document. W3C's role in making the Recommendation is to draw attention
+to the specification and to promote its widespread deployment. This
+enhances the functionality and interoperability of the Web.
+</p>  -->
+
+</div><div id="toc" class="section"><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><li class="tocline"><a href="#linked-data" class="tocxref"><span class="secno">1.2 </span>Linked Data</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.3 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#the-application-programming-interface" class="tocxref"><span class="secno">2. </span>The Application Programming Interface</a><ul class="toc"><li class="tocline"><a href="#jsonldprocessor" class="tocxref"><span class="secno">2.1 </span>JsonLdProcessor</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">2.1.1 </span>Methods</a></li></ul></li><li class="tocline"><a href="#callbacks" class="tocxref"><span class="secno">2.2 </span>Callbacks</a><ul class="toc"><li class="tocline"><a href="#jsonldcallback" class="tocxref"><span class="secno">2.2.1 </span>JsonLdCallback</a><ul class="toc"><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">2.2.1.1 </span>Methods</a></li></ul></li><li class="tocline"><a href="#statementcallback" class="tocxref"><span class="secno">2.2.2 </span>StatementCallback</a><ul class="toc"><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">2.2.2.1 </span>Methods</a></li></ul></li></ul></li><li class="tocline"><a href="#data-structures" class="tocxref"><span class="secno">2.3 </span>Data Structures</a><ul class="toc"><li class="tocline"><a href="#url" class="tocxref"><span class="secno">2.3.1 </span>URL</a></li><li class="tocline"><a href="#jsonldoptions" class="tocxref"><span class="secno">2.3.2 </span>JsonLdOptions</a></li><li class="tocline"><a href="#statement" class="tocxref"><span class="secno">2.3.3 </span>Statement</a><ul class="toc"><li class="tocline"><a href="#attributes" class="tocxref"><span class="secno">2.3.3.1 </span>Attributes</a></li></ul></li><li class="tocline"><a href="#node" class="tocxref"><span class="secno">2.3.4 </span>Node</a><ul class="toc"><li class="tocline"><a href="#attributes-1" class="tocxref"><span class="secno">2.3.4.1 </span>Attributes</a></li></ul></li><li class="tocline"><a href="#namednode" class="tocxref"><span class="secno">2.3.5 </span>NamedNode</a><ul class="toc"><li class="tocline"><a href="#attributes-2" class="tocxref"><span class="secno">2.3.5.1 </span>Attributes</a></li></ul></li><li class="tocline"><a href="#blank-node" class="tocxref"><span class="secno">2.3.6 </span>Blank Node</a><ul class="toc"><li class="tocline"><a href="#attributes-3" class="tocxref"><span class="secno">2.3.6.1 </span>Attributes</a></li></ul></li><li class="tocline"><a href="#literalnode" class="tocxref"><span class="secno">2.3.7 </span>LiteralNode</a><ul class="toc"><li class="tocline"><a href="#attributes-4" class="tocxref"><span class="secno">2.3.7.1 </span>Attributes</a></li></ul></li></ul></li></ul></li><li class="tocline"><a href="#algorithms" class="tocxref"><span class="secno">3. </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#syntax-tokens-and-keywords" class="tocxref"><span class="secno">3.1 </span>Syntax Tokens and Keywords</a></li><li class="tocline"><a href="#algorithm-terms" class="tocxref"><span class="secno">3.2 </span>Algorithm Terms</a></li><li class="tocline"><a href="#context-processing" class="tocxref"><span class="secno">3.3 </span>Context Processing</a></li><li class="tocline"><a href="#iri-expansion" class="tocxref"><span class="secno">3.4 </span><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion</a></li><li class="tocline"><a href="#iri-compaction" class="tocxref"><span class="secno">3.5 </span><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction</a><ul class="toc"><li class="tocline"><a href="#iri-compaction-algorithm" class="tocxref"><span class="secno">3.5.1 </span><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction Algorithm</a></li><li class="tocline"><a href="#term-rank-algorithm" class="tocxref"><span class="secno">3.5.2 </span>Term Rank Algorithm</a></li></ul></li><li class="tocline"><a href="#value-expansion" class="tocxref"><span class="secno">3.6 </span>Value Expansion</a></li><li class="tocline"><a href="#value-compaction" class="tocxref"><span class="secno">3.7 </span>Value Compaction</a></li><li class="tocline"><a href="#generate-blank-node-identifier" class="tocxref"><span class="secno">3.8 </span>Generate Blank Node Identifier</a></li><li class="tocline"><a href="#expansion" class="tocxref"><span class="secno">3.9 </span>Expansion</a><ul class="toc"><li class="tocline"><a href="#expansion-algorithm" class="tocxref"><span class="secno">3.9.1 </span>Expansion Algorithm</a></li></ul></li><li class="tocline"><a href="#compaction" class="tocxref"><span class="secno">3.10 </span>Compaction</a><ul class="toc"><li class="tocline"><a href="#compaction-algorithm" class="tocxref"><span class="secno">3.10.1 </span>Compaction Algorithm</a></li></ul></li><li class="tocline"><a href="#framing" class="tocxref"><span class="secno">3.11 </span>Framing</a><ul class="toc"><li class="tocline"><a href="#framing-algorithm-terms" class="tocxref"><span class="secno">3.11.1 </span>Framing Algorithm Terms</a></li><li class="tocline"><a href="#framing-algorithm" class="tocxref"><span class="secno">3.11.2 </span>Framing Algorithm</a></li><li class="tocline"><a href="#subject-flattening" class="tocxref"><span class="secno">3.11.3 </span>Subject Flattening</a></li><li class="tocline"><a href="#remove-embed" class="tocxref"><span class="secno">3.11.4 </span>Remove Embedded Definition</a></li><li class="tocline"><a href="#embed-values" class="tocxref"><span class="secno">3.11.5 </span>Embed Values</a></li></ul></li></ul></li><li class="tocline"><a href="#data-round-tripping" class="tocxref"><span class="secno">4. </span>Data Round Tripping</a></li><li class="tocline"><a href="#rdf-conversion" class="tocxref"><span class="secno">5. </span>RDF Conversion</a><ul class="toc"><li class="tocline"><a href="#overview" class="tocxref"><span class="secno">5.1 </span>Overview</a></li><li class="tocline"><a href="#rdf-conversion-algorithm-terms" class="tocxref"><span class="secno">5.2 </span>RDF Conversion Algorithm Terms</a></li><li class="tocline"><a href="#convert-to-rdf-algorithm" class="tocxref"><span class="secno">5.3 </span>Convert to RDF Algorithm</a></li><li class="tocline"><a href="#list-conversion" class="tocxref"><span class="secno">5.4 </span>List Conversion</a></li><li class="tocline"><a href="#convert-from-rdf-algorithm" class="tocxref"><span class="secno">5.5 </span>Convert from RDF Algorithm</a></li></ul></li><li class="tocline"><a href="#iana-considerations" class="tocxref"><span class="secno">A. </span>IANA Considerations</a></li><li class="tocline"><a href="#appendix-b" class="tocxref"><span class="secno">B. </span>Initial Context</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">C. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">D. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">D.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">D.2 </span>Informative references</a></li></ul></li></ul></div>
+
+
+
+<div id="introduction" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">1. </span>Introduction</h2>
+
+<p>
+JSON, as specified in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>], is a simple language for representing
+data on the Web. Linked Data is a technique for creating a graph of interlinked data across
+different
+documents or Web sites. Data entities are described using <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>s,
+which are typically dereferencable and thus may be used to find more
+information about an entity, creating a &quot;Web of Knowledge&quot;. JSON-LD is intended to be a simple
+publishing method for expressing not only Linked Data in JSON, but also for adding
+semantics to existing JSON.
+</p>
+
+<p>
+JSON-LD is designed as a light-weight syntax that can be used to express
+Linked Data. It is primarily intended to be a way to use Linked Data
+in Javascript and other Web-based programming environments. It is also
+useful when building interoperable Web services and when storing Linked
+Data in JSON-based document storage engines. It is practical and designed
+to be as simple as possible, utilizing the large number of JSON parsers
+and libraries available today. It is designed to be able to
+express key-value pairs, RDF data, RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>] data, Microformats
+[<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] data, and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. That is, it supports
+every major Web-based structured data model in use today.
+</p>
+
+<p>
+The syntax does not necessarily require applications to change their JSON, but
+allows to easily add meaning by adding context in a way that is either in-band or
+out-of-band. The syntax is designed to not disturb already deployed systems
+running on JSON, but provide a smooth upgrade path from JSON to JSON with
+added semantics. Finally, the format is intended to be easy to parse, efficient to
+generate, convertible to RDF in one pass, and require a very small memory footprint
+in order to operate.
+</p>
+
+<div id="how-to-read-this-document" class="section">
+<h3><span class="secno">1.1 </span>How to Read this Document</h3>
+
+<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>Authors that want a very detailed view of how JSON-LD processors
+  operate.</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" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>]. You must also understand the
+JSON-LD Syntax [<cite><a class="bibref" rel="biblioentry" 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" rel="biblioentry" href="#bib-ECMA-262">ECMA-262</a></cite>] and
+WebIDL [<cite><a class="bibref" rel="biblioentry" 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" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
+
+<p>
+  Examples may contain references to existing vocabularies and use <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es to refer to vocabularies. The following is a list of all vocabularies and their <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> abbreviations, as used in this document:
+</p>
+<ul>
+  <li>The <a href="http://purl.org/dc/terms/">Dublin Core</a>
+  vocabulary (abbreviation: <code>dc</code>, e.g., <code>dc:title</code>)</li>
+  <li>The <a href="http://xmlns.com/foaf/0.1/">Friend of a Friend</a>
+  vocabulary (abbreviation: <code>foaf</code>, e.g., <code>foaf:knows</code>)</li>
+  <li>The <a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#">RDF</a>
+  vocabulary (abbreviation: <code>rdf</code>, e.g., <code>rdf:type</code>)</li>
+  <li>The <a href="http://www.w3.org/2001/XMLSchema#">XSD</a>
+  vocabulary (abbreviation: <code>xsd</code>, e.g., <code>xsd:integer</code>)</li>
+</ul>
+
+<p>
+  JSON [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] defines several terms which are used throughout this document:
+  </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 name/value pairs (or members). A name is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>. A single colon comes after
+      each name, separating the name from the value. A single comma separates a value
+      from a following name. The names within an object <em class="rfc2119" title="should">should</em> be unique.
+    </dd>
+    <dt><dfn title="array" id="dfn-array">array</dfn></dt>
+    <dd>
+      An array is an ordered collection of values. An array structure is represented as square brackets surrounding zero or more values (or elements). Elements are separated by commas.  Within JSON-LD, array order is not preserved by default, unless
+      specific markup is provided. This is because the basic data model of JSON-LD is a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a>, which is inherently unordered.
+    </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. A
+      character is represented as a single character string.
+    </dd>
+    <dt><dfn title="number" id="dfn-number">number</dfn></dt>
+    <dd>
+      A number is 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>
+      Boolean values.
+    </dd>
+    <dt><dfn title="null" id="dfn-null">null</dfn></dt><dd>
+      The use of the <a class="tref internalDFN" title="null" href="#dfn-null">null</a> value within JSON-LD is used to ignore or reset values.
+    </dd>
+    <dt><dfn title="subject_definition" id="dfn-subject_definition">subject definition</dfn></dt><dd>
+      A <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> used to represent a <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> and one or more properties
+      of that subject. A <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> is a subject definition if it does not contain they keys
+      <code>@value</code>, <code>@list</code> or <code>@set</code> and it has one or more keys other than <code>@id</code>.</dd>
+    <dt><dfn title="subject_reference" id="dfn-subject_reference">subject reference</dfn></dt><dd>
+      A <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> used to reference a subject having only the <code>@id</code> key.</dd>
+  </dl>
+<p></p>
+</div>
+
+<div id="linked-data" class="section">
+<h3><span class="secno">1.2 </span>Linked Data</h3>
+<p>
+The following definition for <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a> is the one that will
+be used for this specification.
+</p>
+<ol>
+  <li><dfn title="linked_data" id="dfn-linked_data">Linked Data</dfn> is a set of documents, each containing a representation of a linked data graph.</li>
+  <li>A <dfn title="linked_data_graph" id="dfn-linked_data_graph">linked data graph</dfn> is an unordered labeled directed graph, where nodes are <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s or <a class="tref internalDFN" title="object" href="#dfn-object">object</a>s, and edges are properties.</li>
+  <li>A <dfn title="subject" id="dfn-subject">subject</dfn> is any node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> with at least one outgoing edge.</li>
+  <li>A <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</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> (an Internationalized Resource Identifier as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>]).</li>
+  <li>An <dfn title="object" id="dfn-object">object</dfn> is a node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> with at least one incoming edge.</li>
+  <li>An <a class="tref internalDFN" title="object" href="#dfn-object">object</a> <em class="rfc2119" title="may">may</em> be labeled with an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.</li>
+  <li>An object <em class="rfc2119" title="may">may</em> be a <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> and <a class="tref internalDFN" title="object" href="#dfn-object">object</a> at the same time.</li>
+  <li>A <dfn title="property" id="dfn-property">property</dfn> is an edge of the <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a>.</li>
+  <li>A <a class="tref internalDFN" title="property" href="#dfn-property">property</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>An <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> that is a label in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> <em class="rfc2119" title="should">should</em> be dereferencable to a <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a> document describing the labeled <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>, <a class="tref internalDFN" title="object" href="#dfn-object">object</a> or <a class="tref internalDFN" title="property" href="#dfn-property">property</a>.</li>
+  <li>A <dfn title="literal" id="dfn-literal">literal</dfn> is an <a class="tref internalDFN" title="object" href="#dfn-object">object</a> with a label that is not an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a></li>
+</ol>
+
+<p>
+Note that the definition for <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a> above is silent on the
+topic of unlabeled nodes. Unlabeled nodes are not considered
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a>. However, this specification allows for the expression
+of unlabled nodes, as most graph-based data sets on the Web contain a number
+of associated nodes that are not named and thus are not directly
+de-referenceable.
+</p>
+</div>
+
+<div id="contributing" class="section">
+  <h3><span class="secno">1.3 </span>Contributing</h3>
+
+  <p>There are a number of ways that one may participate in the development of
+    this specification:</p>
+
+  <ul>
+    <li>Technical discussion typically occurs on the public 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 teleconferences</a> are held
+      on Tuesdays at 1500UTC on the second and fourth week of each month.</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>.</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>
+
+</div>
+
+</div>
+
+<div id="the-application-programming-interface" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">2. </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>
+
+  <div id="jsonldprocessor" class="section">
+    <h3><span class="secno">2.1 </span>JsonLdProcessor</h3>
+    <pre class="idl"><span id="idl-def-JsonLdProcessor" class="idlInterface">[<span class="extAttr">NoInterfaceObject</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-or-object---or-URL-input-JsonLdCallback-callback-JsonLdOptions-options">expand</a></span> (<span class="idlParam"><span class="idlParamType"><a>object or object[] or URL</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-or-object---or-URL-input-object-or-URL-context-JsonLdCallback-callback-JsonLdOptions-options">compact</a></span> (<span class="idlParam"><span class="idlParamType"><a>object or object[] or URL</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType"><a>object or URL</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-frame-void-object-or-object---or-URL-input-object-or-URL-frame-JsonLdCallback-callback-JsonLdOptions-options">frame</a></span> (<span class="idlParam"><span class="idlParamType"><a>object or object[] or URL</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType"><a>object or URL</a></span> <span class="idlParamName">frame</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-fromRDF-void-StatementArray-input-JsonLdCallback-callback-JsonLdOptions-options">fromRDF</a></span> (<span class="idlParam"><span class="idlParamType"><a href="#idl-def-Statement" class="idlType"><code>Statement</code></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-toRDF-void-object-or-object---or-URL-input-ObjectOrURL-context-StatementCallback-callback-JsonLdOptions-options">toRDF</a></span> (<span class="idlParam"><span class="idlParamType"><a>object or object[] or URL</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType"><a>ObjectOrURL</a>?</span> <span class="idlParamName">context</span></span>, <span class="idlParam"><span class="idlParamType"><a href="#idl-def-StatementCallback" class="idlType"><code>StatementCallback</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><div id="methods" class="section"><h4><span class="secno">2.1.1 </span>Methods</h4><dl class="methods"><dt id="widl-JsonLdProcessor-compact-void-object-or-object---or-URL-input-object-or-URL-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>. The
+        <code>input</code> <em class="rfc2119" title="must">must</em> be copied, compacted and returned if there are
+        no errors. If the compaction fails, an appropirate exception <em class="rfc2119" title="must">must</em> be
+        thrown.
+
+
+
+
+
+
+      <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 or object[] or URL</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 or URL</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="prmNullFalse">✘</td><td class="prmOptTrue">✔</td><td class="prmDesc">A set of options that <em class="rfc2119" title="may">may</em> affect the expansion algorithm such as, e.g., 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 <code>optimize</code>,
+            which if set will cause 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-or-object---or-URL-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>. The
+        <code>input</code> <em class="rfc2119" title="must">must</em> be copied, expanded and returned if there are
+        no errors. If the expansion fails, an appropriate exception <em class="rfc2119" title="must">must</em> be thrown.
+
+
+
+
+
+
+      <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 or object[] or URL</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="prmNullFalse">✘</td><td class="prmOptTrue">✔</td><td class="prmDesc">A set of options that <em class="rfc2119" title="may">may</em> affect the expansion algorithm such as, e.g., 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-frame-void-object-or-object---or-URL-input-object-or-URL-frame-JsonLdCallback-callback-JsonLdOptions-options"><code>frame</code></dt><dd>
+        <a href="#framing">Frames</a> the given <code>input</code> using the
+        <code>frame</code> according to the steps in the
+        <a href="#framing-algorithm">Framing Algorithm</a>. The <code>input</code>
+        is used to build the framed output and is returned if there are no errors.
+        If there are no matches for the frame, <a class="tref internalDFN" title="null" href="#dfn-null">null</a> <em class="rfc2119" title="must">must</em> be
+        returned. Exceptions <em class="rfc2119" title="must">must</em> be thrown if there are errors.
+
+
+
+
+
+
+      <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 or object[] or URL</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 framing 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 frame.</td></tr><tr><td class="prmName">frame</td><td class="prmType"><code><a>object or URL</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The frame to use when re-arranging the data of <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="prmNullFalse">✘</td><td class="prmOptTrue">✔</td><td class="prmDesc">A set of options that <em class="rfc2119" title="may">may</em> affect the framing algorithm such as, e.g., 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-fromRDF-void-StatementArray-input-JsonLdCallback-callback-JsonLdOptions-options"><code>fromRDF</code></dt><dd>Creates a JSON-LD document given an set of <a href="#idl-def-Statement" class="idlType"><code>Statement</code></a>s.
+
+      <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 href="#idl-def-Statement" class="idlType"><code>Statement</code></a>[]</code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">An array of RDF statements.</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="prmNullFalse">✘</td><td class="prmOptTrue">✔</td><td class="prmDesc">A set of options that will affect the algorithm. This includes <code>notType</code>,
+            which if set to <a class="tref internalDFN" title="true" href="#dfn-true">true</a> causes the resulting document to use <code>rdf:type</code>
+            as a property, instead of <code>@type</code>.</td></tr></table><div><em>Return type: </em><code><a>void</a></code></div></dd><dt id="widl-JsonLdProcessor-toRDF-void-object-or-object---or-URL-input-ObjectOrURL-context-StatementCallback-callback-JsonLdOptions-options"><code>toRDF</code></dt><dd>
+        Processes the <code>input</code> according to the
+        <a href="#convert-to-rdf-algorithm">Convert to RDF Algorithm</a>, calling
+        the provided <code>callback</code> for each <a href="#idl-def-Statement" class="idlType"><code>Statement</code></a> generated.
+
+
+
+
+
+
+      <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 or object[] or URL</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 convert to RDF 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 convert to RDF.</td></tr><tr><td class="prmName">context</td><td class="prmType"><code><a>ObjectOrURL</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">An external context to use additionally to the context embedded in
+            <code>input</code> when expanding the <code>input</code>.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-StatementCallback" class="idlType"><code>StatementCallback</code></a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A callback that is called when a <a href="#idl-def-Statement" class="idlType"><code>Statement</code></a> is created from processing
+            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="prmNullFalse">✘</td><td class="prmOptTrue">✔</td><td class="prmDesc">A set of options that <em class="rfc2119" title="may">may</em> affect the conversion to RDF such as, e.g.,
+            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></div>
+
+  </div>
+
+  <div id="callbacks" class="section">
+    <h3><span class="secno">2.2 </span>Callbacks</h3>
+  <div id="jsonldcallback" class="section">
+    <h4><span class="secno">2.2.1 </span>JsonLdCallback</h4>
+    <p>The <a href="#idl-def-JsonLdCallback" class="idlType"><code>JsonLdCallback</code></a> is used to return a processed JSON-LD representation
+      as the result of processing an API method.</p>
+
+    <pre class="idl"><span id="idl-def-JsonLdCallback" class="idlInterface">[<span class="extAttr">NoInterfaceObject Callback</span>]
+interface <span class="idlInterfaceID">JsonLdCallback</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JsonLdCallback-jsonLd-void-ObjectOrObjectArray-jsonld">jsonLd</a></span> (<span class="idlParam"><span class="idlParamType"><a>ObjectOrObjectArray</a></span> <span class="idlParamName">jsonld</span></span>);</span>
+};</span>
+</pre><div id="methods-1" class="section"><h5><span class="secno">2.2.1.1 </span>Methods</h5><dl class="methods"><dt id="widl-JsonLdCallback-jsonLd-void-ObjectOrObjectArray-jsonld"><code>jsonLd</code></dt><dd>This callback is invoked when processing is complete.
+
+      <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>ObjectOrObjectArray</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The processed JSON-LD document.</td></tr></table><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
+  </div>
+  <div id="statementcallback" class="section">
+    <h4><span class="secno">2.2.2 </span>StatementCallback</h4>
+    <p>The <a href="#idl-def-StatementCallback" class="idlType"><code>StatementCallback</code></a> is called whenever the processor generates a
+    statement during the <code>statement()</code> call.</p>
+
+    <pre class="idl"><span id="idl-def-StatementCallback" class="idlInterface">[<span class="extAttr">NoInterfaceObject Callback</span>]
+interface <span class="idlInterfaceID">StatementCallback</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-StatementCallback-statement-void-Statement-statement">statement</a></span> (<span class="idlParam"><span class="idlParamType"><a href="#idl-def-Statement" class="idlType"><code>Statement</code></a></span> <span class="idlParamName">statement</span></span>);</span>
+};</span>
+</pre><div id="methods-2" class="section"><h5><span class="secno">2.2.2.1 </span>Methods</h5><dl class="methods"><dt id="widl-StatementCallback-statement-void-Statement-statement"><code>statement</code></dt><dd>This callback is invoked whenever a statement is generated by the processor.
+
+      <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">statement</td><td class="prmType"><code><a href="#idl-def-Statement" class="idlType"><code>Statement</code></a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The statement.</td></tr></table><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
+  </div>
+  </div>
+
+  <div id="data-structures" class="section">
+    <h3><span class="secno">2.3 </span>Data Structures</h3>
+    <p>This section describes datatype definitions used within the JSON-LD API.</p>
+
+    <div id="url" class="section">
+    <h4><span class="secno">2.3.1 </span>URL</h4>
+    <p>The <a href="#idl-def-URL" class="idlType"><code>URL</code></a> datatype is a string representation of an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.</p>
+    <pre class="idl"><span id="idl-def-URL" class="idlTypedef">typedef <span class="idlTypedefType"><a>DOMString</a></span> <span class="idlTypedefID">URL</span>;</span></pre><div class="idlTypedefDesc">
+      This datatype indicates that the <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> is interpreted as a Universal Resource
+      Locator
+      identifying a document, which when parsed as JSON yields either a <code>JSON object</code>
+      or <code>array</code>.
+    </div>
+    </div>
+
+    <div id="jsonldoptions" class="section">
+    <h4><span class="secno">2.3.2 </span>JsonLdOptions</h4>
+    <p>The <a>JsonLdOptiones</a> type is used to convery a set of options to an interface method.</p>
+    <pre class="idl"><span id="idl-def-JsonLdOptions" class="idlTypedef">typedef <span class="idlTypedefType"><a>object</a></span> <span class="idlTypedefID">JsonLdOptions</span>;</span></pre><div class="idlTypedefDesc">
+      <dt><a href="#idl-def-URL" class="idlType"><code>URL</code></a> base</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 href="#idl-def-URL" class="idlType"><code>URL</code></a> or if it is a <code>object</code> or <code>object[]</code>.</dd>
+      <dt>boolean optimize</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>boolean noType</dt>
+      <dd>If set to <code>true</code>, the JSON-LD processor will not use the
+        <code>@type</code> property when generating the output, and will use the
+        expanded <code>rdf:type</code> <abbr title="Internationalized Resource Identifier">IRI</abbr> as the property instead of <code>@type</code>.</dd>
+    </div>
+    </div>
+
+    <p>The following data structures are used for representing data about
+      RDF statements (triples or quads). They are used for normalization, <a>fromRDF</a>,
+      and from <a>toRDF</a> interfaces.
+    </p>
+
+    <div id="statement" class="section">
+    <h4><span class="secno">2.3.3 </span>Statement</h4>
+    <p>The <a href="#idl-def-Statement" class="idlType"><code>Statement</code></a> interface represents an RDF Statement.</p>
+    <pre class="idl"><span id="idl-def-Statement" class="idlInterface">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">Statement</span> {
+<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a href="#idl-def-Node" class="idlType"><code>Node</code></a></span>  <span class="idlAttrName"><a href="#widl-Statement-subject">subject</a></span>;</span>
+<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a href="#idl-def-Node" class="idlType"><code>Node</code></a></span>  <span class="idlAttrName"><a href="#widl-Statement-property">property</a></span>;</span>
+<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a href="#idl-def-Node" class="idlType"><code>Node</code></a></span>  <span class="idlAttrName"><a href="#widl-Statement-object">object</a></span>;</span>
+<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a href="#idl-def-Node" class="idlType"><code>Node</code></a>?</span> <span class="idlAttrName"><a href="#widl-Statement-name">name</a></span>;</span>
+};</span>
+</pre><div id="attributes" class="section"><h5><span class="secno">2.3.3.1 </span>Attributes</h5><dl class="attributes"><dt id="widl-Statement-name"><code>name</code> of type <span class="idlAttrType"><a href="#idl-def-Node" class="idlType"><code>Node</code></a></span>, readonly, nullable</dt><dd>The name associated with the <a href="#idl-def-Statement" class="idlType"><code>Statement</code></a> identifying
+        it as a member of a named graph. If the attribute is present,
+        it indicates that this statement is a member of a <em>named graph</em>
+        associated with <em>name</em>. If it is missing, the statement
+        is a member of the <em>default graph</em>.</dd><dt id="widl-Statement-object"><code>object</code> of type <span class="idlAttrType"><a href="#idl-def-Node" class="idlType"><code>Node</code></a></span>, readonly</dt><dd>The object associated with the <a href="#idl-def-Statement" class="idlType"><code>Statement</code></a>.</dd><dt id="widl-Statement-property"><code>property</code> of type <span class="idlAttrType"><a href="#idl-def-Node" class="idlType"><code>Node</code></a></span>, readonly</dt><dd>The property associated with the <a href="#idl-def-Statement" class="idlType"><code>Statement</code></a>.</dd><dt id="widl-Statement-subject"><code>subject</code> of type <span class="idlAttrType"><a href="#idl-def-Node" class="idlType"><code>Node</code></a></span>, readonly</dt><dd>The subject associated with the <a href="#idl-def-Statement" class="idlType"><code>Statement</code></a>.</dd></dl></div>
+    </div>
+
+    <div id="node" class="section">
+    <h4><span class="secno">2.3.4 </span>Node</h4>
+    <p><a href="#idl-def-Node" class="idlType"><code>Node</code></a> is the base class of <a href="#idl-def-NamedNode" class="idlType"><code>NamedNode</code></a>,
+    <a href="#idl-def-BlankNode" class="idlType"><code>BlankNode</code></a>, and <a href="#idl-def-LiteralNode" class="idlType"><code>LiteralNode</code></a>.</p>
+    <pre class="idl"><span id="idl-def-Node" class="idlInterface">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">Node</span> {
+<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Node-nominalValue">nominalValue</a></span>;</span>
+<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Node-interfaceName">interfaceName</a></span>;</span>
+};</span>
+</pre><div id="attributes-1" class="section"><h5><span class="secno">2.3.4.1 </span>Attributes</h5><dl class="attributes"><dt id="widl-Node-interfaceName"><code>interfaceName</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt><dd>
+        <p>Provides access to the string name of the current interface,
+        normally one of <code>&quot;<abbr title="Internationalized Resource Identifier">IRI</abbr>&quot;</code>, <code>&quot;BlankNode&quot;</code> or <code>&quot;LiteralNode&quot;</code>.</p>
+        <p>This method serves to disambiguate instances of <a href="#idl-def-Node" class="idlType"><code>Node</code></a> which
+        are otherwise identical, such as <a href="#idl-def-NamedNode" class="idlType"><code>NamedNode</code></a> and <a href="#idl-def-BlankNode" class="idlType"><code>BlankNode</code></a>.</p>
+      </dd><dt id="widl-Node-nominalValue"><code>nominalValue</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt><dd>
+        <p>The <code>nominalValue</code> of an <a href="#idl-def-Node" class="idlType"><code>Node</code></a> is refined by
+        each interface which extends <a href="#idl-def-Node" class="idlType"><code>Node</code></a>.</p>
+      </dd></dl></div>
+    </div>
+
+    <div id="namednode" class="section">
+    <h4><span class="secno">2.3.5 </span>NamedNode</h4>
+    <p>A node identified by an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>. NamedNodes are defined by International
+    Resource Identifier [<cite><a class="bibref" rel="biblioentry" href="#bib-IRI">IRI</a></cite>].</p>
+    <pre class="idl"><span id="idl-def-NamedNode" class="idlInterface">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">NamedNode</span> : <span class="idlSuperclass"><a href="#idl-def-Node" class="idlType"><code>Node</code></a></span> {
+<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-NamedNode-nominalValue">nominalValue</a></span>;</span>
+};</span>
+</pre><div id="attributes-2" class="section"><h5><span class="secno">2.3.5.1 </span>Attributes</h5><dl class="attributes"><dt id="widl-NamedNode-nominalValue"><code>nominalValue</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt><dd>The <abbr title="Internationalized Resource Identifier">IRI</abbr> identifier of the node.</dd></dl></div>
+    </div>
+
+    <div id="blank-node" class="section">
+    <h4><span class="secno">2.3.6 </span>Blank Node</h4>
+
+    <p>A <a href="#idl-def-BlankNode" class="idlType"><code>BlankNode</code></a> is a reference to an unnamed resource
+      (one for which an <abbr title="Internationalized Resource Identifier">IRI</abbr> is not known), and may be used in a <a href="#idl-def-Statement" class="idlType"><code>Statement</code></a>
+      as a unique reference to that unnamed resource.</p>
+
+    <pre class="idl"><span id="idl-def-BlankNode" class="idlInterface">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">BlankNode</span> : <span class="idlSuperclass"><a href="#idl-def-Node" class="idlType"><code>Node</code></a></span> {
+<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-BlankNode-nominalValue">nominalValue</a></span>;</span>
+};</span>
+</pre><div id="attributes-3" class="section"><h5><span class="secno">2.3.6.1 </span>Attributes</h5><dl class="attributes"><dt id="widl-BlankNode-nominalValue"><code>nominalValue</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt><dd>The temporary identifier of the <a href="#idl-def-BlankNode" class="idlType"><code>BlankNode</code></a>.
+        The nominalValue <em class="rfc2119" title="must not">must not</em> be relied upon in any way between two
+        separate processing runs of the same document.</dd></dl></div>
+
+    <p class="note">Developers and authors must not assume that the
+    nominalValue of a <a href="#idl-def-BlankNode" class="idlType"><code>BlankNode</code></a> will remain the same between two
+    processing runs. <a href="#idl-def-BlankNode" class="idlType"><code>BlankNode</code></a> nominalValues are only valid for the
+    most recent processing run on the document. <a href="#idl-def-BlankNode" class="idlType"><code>BlankNode</code></a>s
+    nominalValues will often be generated differently by different processors.</p>
+
+    <p class="note">Implementers <em class="rfc2119" title="must">must</em> ensure that <a href="#idl-def-BlankNode" class="idlType"><code>BlankNode</code></a> nominalValues are unique
+    within the current environment, two <a href="#idl-def-BlankNode" class="idlType"><code>BlankNode</code></a>s are considered equal if, and only if,
+    their nominalValues are strictly equal.</p>
+    </div>
+
+    <div id="literalnode" class="section">
+      <h4><span class="secno">2.3.7 </span>LiteralNode</h4>
+      <p>LiteralNodes represent values such as numbers, dates and strings in
+        RDF data. A <a href="#idl-def-LiteralNode" class="idlType"><code>LiteralNode</code></a> is comprised of three attributes:
+      </p>
+
+      <ul>
+        <li>a lexical representation of the <code>nominalValue</code></li>
+        <li>an optional <code>language</code> represented by a string token</li>
+        <li>an optional <code>datatype</code> specified by a <a href="#idl-def-NamedNode" class="idlType"><code>NamedNode</code></a></li>
+      </ul>
+
+      <p>LiteralNodes representing plain text in a natural language may have a
+        <code>language</code> attribute specified by a text string token, as specified in
+        [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>], normalized to lowercase
+        (e.g., <code>'en'</code>, <code>'fr'</code>, <code>'en-gb'</code>).
+        They may also have a datatype attribute such as <code>xsd:string</code>.
+      </p>
+
+      <p>LiteralNodes representing values with a specific datatype, such as
+        the integer 72, may have a <code>datatype</code> attribute specified in the form
+        of a <a href="#idl-def-NamedNode" class="idlType"><code>NamedNode</code></a> (e.g.,
+        <code>&lt;http://www.w3.org/2001/XMLSchema#integer&gt;</code>).</p>
+
+      <pre class="idl"><span id="idl-def-LiteralNode" class="idlInterface">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">LiteralNode</span> : <span class="idlSuperclass"><a href="#idl-def-Node" class="idlType"><code>Node</code></a></span> {
+<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>DOMString</a></span>  <span class="idlAttrName"><a href="#widl-LiteralNode-nominalValue">nominalValue</a></span>;</span>
+<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>DOMString</a>?</span> <span class="idlAttrName"><a href="#widl-LiteralNode-language">language</a></span>;</span>
+<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a href="#idl-def-NamedNode" class="idlType"><code>NamedNode</code></a>?</span> <span class="idlAttrName"><a href="#widl-LiteralNode-datatype">datatype</a></span>;</span>
+};</span>
+</pre><div id="attributes-4" class="section"><h5><span class="secno">2.3.7.1 </span>Attributes</h5><dl class="attributes"><dt id="widl-LiteralNode-datatype"><code>datatype</code> of type <span class="idlAttrType"><a href="#idl-def-NamedNode" class="idlType"><code>NamedNode</code></a></span>, readonly, nullable</dt><dd>An optional datatype identified by a NamedNode.</dd><dt id="widl-LiteralNode-language"><code>language</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly, nullable</dt><dd>An optional language string as defined in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>], normalized to lowercase.</dd><dt id="widl-LiteralNode-nominalValue"><code>nominalValue</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt><dd>The lexical representation of the LiteralNodes value.</dd></dl></div>
+    </div>
+  </div>
+
+</div>
+
+<div id="algorithms" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">3. </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>
+
+<div id="syntax-tokens-and-keywords" class="section">
+  <h3><span class="secno">3.1 </span>Syntax Tokens and Keywords</h3>
+
+  <p>JSON-LD specifies a number of syntax tokens and <dfn title="keyword" id="dfn-keyword">keyword</dfn>s that are using
+  in all algorithms described in this section:</p>
+
+  <dl>
+  <dt><code>@context</code></dt><dd>Used to set the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</dd>
+  <dt><code>@id</code></dt><dd>Sets the active subject.</dd>
+  <dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
+  <dt><code>@type</code></dt><dd>Used to set the type of the active subject or the datatype of a literal.</dd>
+  <dt><code>@value</code></dt><dd>Used to specify the value of a literal.</dd>
+  <dt><code>@container</code></dt><dd>Used to set the container of a particular value.</dd>
+  <dt><code>@list</code></dt><dd>Used to express an ordered set of data.</dd>
+  <dt><code>@set</code></dt><dd>Used to express an unordered set of data.</dd>
+  <dt><code>@graph</code></dt><dd>Used to explicitly express a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</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>
+  <dt><code>@default</code></dt><dd>Used in <a href="#framing">Framing</a> to set the defeault value for
+    an output property when the framed <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a> does not include such a property.</dd>
+  <dt><code>@explicit</code></dt><dd>Used in <a href="#framing">Framing</a> to override the
+    value of <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> within a specific frame.</dd>
+  <dt><code>@omitDefault</code></dt><dd>Used in <a href="#framing">Framing</a> to override the
+    value of <a class="tref internalDFN" title="omit_default_flag" href="#dfn-omit_default_flag">omit default flag</a> within a specific frame.</dd>
+  <dt><code>@embed</code></dt><dd>Used in <a href="#framing">Framing</a> to override the
+    value of <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> within a specific frame.</dd>
+  <dt><code>@null</code></dt><dd>&gt;Used in <a href="#framing">Framing</a> when a value of <a class="tref internalDFN" title="null" href="#dfn-null">null</a>
+    should be returned, which would otherwise be removed when <a href="#compaction">Compacting</a>.</dd>
+  </dl>
+
+  <p>All JSON-LD tokens and keywords are case-sensitive.</p>
+</div>
+
+<div id="algorithm-terms" class="section">
+  <h3><span class="secno">3.2 </span>Algorithm Terms</h3>
+  <dl>
+    <dt><dfn title="initial_context" id="dfn-initial_context">initial context</dfn></dt>
+    <dd>
+      a context that is specified to the algorithm before processing begins. The contents of the
+      initial context is defined in <a href="#appendix-b">Appendix B</a>.
+    </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 coercion 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="blank_node" id="dfn-blank_node">blank node</dfn></dt>
+    <dd>
+      a blank node is a <a class="tref internalDFN" title="resource" href="#dfn-resource">resource</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="literal" href="#dfn-literal">literal</a>.
+      Blank nodes may be named or unnamed and often take on the role of a variable that may represent
+      either 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="literal" href="#dfn-literal">literal</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 <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> and <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="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="prefix" id="dfn-prefix">prefix</dfn></dt><dd>
+      A <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> is a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> that expands to a vocabulary base <abbr title="Internationalized Resource Identifier">IRI</abbr>. It
+      is typically used along with a <em>suffix</em> to form a <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> to create an <abbr title="Internationalized Resource Identifier">IRI</abbr>
+      within a vocabulary.
+    </dd>
+    <dt><dfn title="plain_literal" id="dfn-plain_literal">plain literal</dfn></dt><dd>
+      A <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> is a <a class="tref internalDFN" title="literal" href="#dfn-literal">literal</a> without a datatype, possibly including
+      a language.
+    </dd>
+    <dt><dfn title="typed_literal" id="dfn-typed_literal">typed literal</dfn></dt><dd>
+      A <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> is a <a class="tref internalDFN" title="literal" href="#dfn-literal">literal</a> with an associated <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>
+      which indicates the literal's datatype.
+    </dd>
+  </dl>
+</div>
+
+<div id="context-processing" class="section">
+  <h3 id="context"><span class="secno">3.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>.
+    Processing begins by pushing a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> onto the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> stack and
+    initializing the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> with the <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a>.
+    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>.</p>
+  <p>The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is used for expanding properties and values of a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> (or elements
+    of a list (see <span a="#list-processing">List Processing</span>)) using a <dfn title="term_mapping" id="dfn-term_mapping">term mapping</dfn>.
+    It is also used to maintain
+    <dfn title="coercion_mapping" id="dfn-coercion_mapping">coercion mapping</dfn>s from terms to datatypes, <dfn title="language_mapping" id="dfn-language_mapping">language mapping</dfn>s from terms to language codes,
+    and <dfn title="list_mapping" id="dfn-list_mapping">list mapping</dfn>s and <dfn title="set_mapping" id="dfn-set_mapping">set mapping</dfn>s for terms. Processors <em class="rfc2119" title="must">must</em> use the
+    lexical form of the property when creating a mapping, as lookup is performed on lexical representations, not
+    expanded <abbr title="Internationalized Resource Identifier">IRI</abbr> representations.</p>
+  <p>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>
+    property 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.
+    When processing a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>, special processing rules apply:</p>
+  <ol class="algorithm">
+    <li>Create a new, empty <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</li>
+    <li>Let <em>context</em> be the value of <code>@context</code>
+      <ol class="algorithm">
+        <li id="process-context">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>
+          to the <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a>.</li>
+        <li>If <em>context</em> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, process each element as <em>context</em> in order
+          by starting at <a href="#process-context">Step 2.1</a>.</li>
+        <li>If <em>context</em> is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, it <em class="rfc2119" title="must">must</em> have a lexical form of <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>.
+          <ol class="algorithm">
+            <li>Dereference <em>context</em>.</li>
+            <li>If the resulting document is a JSON document, extract the top-level <code>@context</code>
+              element using the JSON Pointer &quot;/@context&quot; as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-JSON-POINTER">JSON-POINTER</a></cite>]. Set <em>context</em>
+              to the extracted content and process it by starting at <a href="#process-context">Step 2.1</a>.</li>
+          </ol>
+        </li>
+        <li>If <em>context</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>If <em>context</em> has a <code>@language</code> property, it <em class="rfc2119" title="must">must</em> have a value of a
+              simple <a class="tref internalDFN" title="string" href="#dfn-string">string</a> or <a class="tref internalDFN" title="null" href="#dfn-null">null</a>. Add the language to the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</li>
+            <li id="object-context">Otherwise, for each property in <em>context</em> perform the following steps:
+              <ol class="algorithm">
+                <li>If the property's value is a simple <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, determine the <abbr title="Internationalized Resource Identifier">IRI</abbr> mapping value by
+                  performing <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion</a> on the associated value. If the result of the <abbr title="Internationalized Resource Identifier">IRI</abbr>
+                  mapping is an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>, merge the property into the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>
+                  <a class="tref internalDFN" title="term_mapping" href="#dfn-term_mapping">term mapping</a>, unless the property is a JSON-LD <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>, in which
+                  case throw an exception.</li>
+                <li>Otherwise, if the property's value is <a class="tref internalDFN" title="null" href="#dfn-null">null</a> remove mapping, coercion,
+                  container and language information associated with property from the
+                  <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</li>
+                <li>Otherwise, the <em>property</em>'s <em>value</em> <em class="rfc2119" title="must">must</em> be a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>.
+                  <ol class="algorithm">
+                    <li>If the <em>property</em> is a JSON-LD <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> and the value has
+                      <code>@id</code>, <code>@language</code> or <code>@type</code> properties, throw an exception.
+                      <div class="issue">Undecided if <code>@type</code> or <code>@graph</code> can take a
+                        <code>@container</code> with <code>@set</code>.
+                      </div>
+                    </li>
+                    <li>If the <em>property</em> has the form of <a class="tref internalDFN" title="term" href="#dfn-term">term</a>, it's <em>value</em> <em class="rfc2119" title="must">must</em> have an
+                      <code>@id</code> property with a string value which <em class="rfc2119" title="must">must</em> have the form of a <a class="tref internalDFN" title="term" href="#dfn-term">term</a>,
+                      <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="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>. Determine the <abbr title="Internationalized Resource Identifier">IRI</abbr> mapping
+                      by performing <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion</a> on the associated value.
+                      If the result of the <abbr title="Internationalized Resource Identifier">IRI</abbr> mapping is an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>, merge the
+                      <em>property</em> into the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> <a class="tref internalDFN" title="term_mapping" href="#dfn-term_mapping">term mapping</a>.</li>
+                    <li>If the <em>property</em> has the form of of a <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="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>,
+                      the <em>value</em> <em class="rfc2119" title="may">may</em> have a <code>@id</code> property with a string value which <em class="rfc2119" title="must">must</em> have the
+                      form of a <a class="tref internalDFN" title="term" href="#dfn-term">term</a>, <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a>, or absolute <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.
+                      Determine the <abbr title="Internationalized Resource Identifier">IRI</abbr> mapping by performing <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion</a> on the associated
+                      value. If the result of the <abbr title="Internationalized Resource Identifier">IRI</abbr> mapping is an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>, merge the
+                      <em>property</em> into the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> <a class="tref internalDFN" title="term_mapping" href="#dfn-term_mapping">term mapping</a>.</li>
+                    <li>If the <em>value</em> has a <code>@type</code> property, it's value <em class="rfc2119" title="must">must</em> have the form of a <a class="tref internalDFN" title="term" href="#dfn-term">term</a>,
+                      <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a>, <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>, or the <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> <code>@id</code>.
+                      Determine the <abbr title="Internationalized Resource Identifier">IRI</abbr> by performing <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion</a> on the associated value.
+                      If the result of the <abbr title="Internationalized Resource Identifier">IRI</abbr> mapping is an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a> or <code>@id</code>, merge into the
+                      <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> <a class="tref internalDFN" title="coercion_mapping" href="#dfn-coercion_mapping">coercion mapping</a> using the lexical value of the <em>property</em>.</li>
+                    <li>If the <em>value</em> has a <code>@container</code> property, it's value <em class="rfc2119" title="must">must</em> be <code>@list</code> or
+                      <code>@set</code>. Merge the <a class="tref internalDFN" title="list_mapping" href="#dfn-list_mapping">list mapping</a> or <a class="tref internalDFN" title="set_mapping" href="#dfn-set_mapping">set mapping</a> into the
+                      <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> using the lexical value of the <em>property</em>.</li>
+                    <li>If the <em>value</em> has a <code>@language</code> property but no <code>@type</code> property, the value of the
+                      <code>@language</code> property <em class="rfc2119" title="must">must</em> be a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> or <a class="tref internalDFN" title="null" href="#dfn-null">null</a>.
+                      Merge the <a class="tref internalDFN" title="language_mapping" href="#dfn-language_mapping">language mapping</a> into the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> using the lexical value of the
+                      <em>property</em>.</li>
+                  </ol>
+                </li>
+                <li>Merge the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</li>
+                <li>Repeat <a href="#object-context">Step 2.4.2</a> until no entries are added to the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local
+                  context</a>.</li>
+              </ol>
+            </li>
+          </ol>
+        </li>
+      </ol>
+    </li>
+  </ol>
+
+  <p class="note">It can be difficult to distinguish between a <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> and an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>,
+    as a <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> may seem to be a valid <abbr title="Internationalized Resource Identifier">IRI</abbr> <em>scheme</em>. When performing repeated <abbr title="Internationalized Resource Identifier">IRI</abbr> expansion,
+    a term used as a prefix may not have a valid mapping due to dependencies in resolving term definitions. By
+    continuing <a href="#object-context">Step 2.3.2</a> until no changes are made, mappings to IRIs created
+    using an undefined term prefix will eventually resolve to <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>s.</p>
+
+  <p class="issue"><a href="https://github.com/json-ld/json-ld.org/issues/43">Issue 43</a>
+    concerns performing <abbr title="Internationalized Resource Identifier">IRI</abbr> expansion in the key position of a context definition.</p>
+</div>
+
+<div id="iri-expansion" class="section">
+  <h3><span class="secno">3.4 </span><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion</h3>
+  <p>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 a value representing an <abbr title="Internationalized Resource Identifier">IRI</abbr> into an actual <abbr title="Internationalized Resource Identifier">IRI</abbr>.</p>
+  <p><a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>s 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>, 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>.</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" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>] containing a <em>scheme</em> along with
+    <em>path</em> and optional <em>query</em> and fragment 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 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.</p>
+
+  <p>The algorithm for generating an <abbr title="Internationalized Resource Identifier">IRI</abbr> is:
+    </p><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="term" href="#dfn-term">term</a> mapping for the value using
+        a case-sensitive comparison, use the mapped value as an <abbr title="Internationalized Resource Identifier">IRI</abbr>.</li>
+      <li>Otherwise, split the value into a <em>prefix</em> and <em>suffix</em> from the first occurrence of ':'.</li>
+      <li>If the prefix is a '_' (underscore), the value represents a named <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a>.</li>
+      <li>If the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> contains a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> mapping for <em>prefix</em> using
+        a case-sensitive comparison, and <em>suffix</em> does not does not begin with '//'
+        (i.e., it does not match a <em>hier-part</em> including
+        <em>authority</em> (as defined in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3986">RFC3986</a></cite>]), generate an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>
+        by prepending the mapped prefix to the (possibly empty) suffix using textual concatenation. Note that an empty
+        suffix and no suffix (meaning the value contains no ':' string at all) are treated equivalently.</li>
+      <li>Otherwise, use the value directly as an <abbr title="Internationalized Resource Identifier">IRI</abbr>.</li>
+    </ol>
+  <p></p>
+  <p class="note">
+    Previous versions of this specification used <code>@base</code> and <code>@vocab</code> to define <abbr title="Internationalized Resource Identifier">IRI</abbr> prefixes
+    used to resolve <a class="tref internalDFN" title="relative_iri" href="#dfn-relative_iri">relative IRIs</a>. It was determined that this added too much complexity, but the issue
+    can be re-examined in the future based on community input.
+  </p>
+</div>
+
+<div id="iri-compaction" class="section">
+  <h3><span class="secno">3.5 </span><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction</h3>
+  <p>Some keys and values are expressed using <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>s. This section defines an
+    algorithm for transforming an <abbr title="Internationalized Resource Identifier">IRI</abbr> (<em>iri</em>) 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> using the
+    <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s specified in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> using an optional <em>value</em>.</p>
+
+<div id="iri-compaction-algorithm" class="section">
+  <h4><span class="secno">3.5.1 </span><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction Algorithm</h4>
+  <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>Create an empty list of terms <em>terms</em> that will be populated with
+        <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s that are ranked according to how closely they match
+        <em>value</em>. Initialize <em>highest rank</em> to <code>0</code>,
+        and set a flag <em>list container</em> to <code>false</code>.</li>
+      <li>For each <em>term</em> in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>:
+        <ol class="algorithm">
+          <li>If the <em>term</em>'s <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> is not a complete match against
+            <em>iri</em>, continue to the next <em>term</em>.</li>
+          <li>If <em>value</em> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> containing only the property <code>@list</code>:
+            <ol class="algorithm">
+              <li>If <em>term</em> has a <code>@container</code> set to <code>@set</code>, continue
+                to the next <em>term</em>.</li>
+              <li>If <em>list container</em> is <code>true</code> and <em>term</em> does not have a
+                <code>container</code> set to <code>@list</code>, continue to the next <em>term</em>.</li>
+            </ol>
+          </li>
+          <li>Otherwise, if <em>term</em> has a <code>container</code> set to <code>@list</code>,
+            continue to the next <em>term</em>.</li>
+          <li>Set <em>rank</em> to the <a class="tref internalDFN" title="term_rank" href="#dfn-term_rank">term rank</a> of <em>value</em> by passing
+            passing <em>term</em>, <em>value</em>, and <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to
+            the <a href="#term-rank-algorithm">Term Rank Algorithm</a>.</li>
+          <li>If <em>rank</em> is greater than <code>0</code>:
+            <ol class="algorithm">
+              <li>If <em>term</em> has a <code>container</code> set to <code>@set</code>, then add
+                <code>1</code> to <em>rank</em>.</li>
+              <li>If <em>value</em> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> containing only the property <code>@list</code>
+                and <em>list container</em> is <code>false</code> and <em>term</em> has a <code>container</code>
+                set to <code>@list</code>, then set <em>list container</em> to <code>true</code>, clear
+                <em>terms</em>, set <em>highest rank</em> to <em>rank</em>, and add <em>term</em> to <em>terms</em>.</li>
+              <li>Otherwise, if <em>rank</em> is greater than or equal to <em>highest rank</em>:
+                <ol class="algorithm">
+                  <li>If <em>rank</em> is greater than <em>highest rank</em>, clear <em>terms</em> and set
+                    <em>highest rank</em> to <em>rank</em>.</li>
+                  <li>Add <em>term</em> to <em>terms</em>.</li>
+                </ol>
+              </li>
+            </ol>
+          </li>
+        </ol>
+      </li>
+      <li>If <em>terms</em> is empty, add a <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> representation of <em>iri</em>
+        for each <a class="tref internalDFN" title="term" href="#dfn-term">term</a> in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> which
+        maps to an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> which is a prefix for <em>iri</em> where
+        the resulting <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> is not a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> in the
+        <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. The resulting <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a> is the
+        <a class="tref internalDFN" title="term" href="#dfn-term">term</a> associated with the partially
+        matched <abbr title="Internationalized Resource Identifier">IRI</abbr> in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> concatenated with a
+        colon (:) character and the unmatched part of <em>iri</em>.</li>
+      <li>If <em>terms</em> is empty, return <em>iri</em>.</li>
+      <li>Return the shortest and lexicographically least value in <em>terms</em>.</li>
+    </ol>
+  <p></p>
+</div>
+
+<div id="term-rank-algorithm" class="section">
+<h4><span class="secno">3.5.2 </span>Term Rank Algorithm</h4>
+<p>When selecting among multiple possible terms for a given property, it may be that multiple
+  <a class="tref internalDFN" title="term" href="#dfn-term">terms</a> are defined with the same <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>, but differ in <code>@type</code>, <code>@container</code>
+  or <code>@language</code>. The purpose of this algorithm is to take an <a class="tref internalDFN" title="term" href="#dfn-term">term</a>
+  and a value and give it a <dfn title="term_rank" id="dfn-term_rank">term rank</dfn>. The selection can then be based, partly, on
+  the term having the highest <a class="tref internalDFN" title="term_rank" href="#dfn-term_rank">term rank</a>.</p>
+<p>Given a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> <em>term</em>, <em>value</em>, and <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>
+  determine the <a class="tref internalDFN" title="term_rank" href="#dfn-term_rank">term rank</a> using the following steps:</p>
+<ol class="algorithm">
+  <li>If <em>value</em> is <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, <a class="tref internalDFN" title="term_rank" href="#dfn-term_rank">term rank</a> is <code>3</code>.</li>
+  <li>Otherwise, if <em>value</em> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> containing only the property <code>@list</code>:
+    <ol class="algorithm">
+      <li>If the <code>@list</code> property is an empty array, if <em>term</em> has <code>@container</code>
+        set to <code>@list</code>, <a class="tref internalDFN" title="term_rank" href="#dfn-term_rank">term rank</a> is <code>1</code>, otherwise <code>0</code>.</li>
+      <li>Otherwise, return the sum of the <a class="tref internalDFN" title="term_rank" href="#dfn-term_rank">term rank</a>s for every entry in the list.</li>
+    </ol>
+  </li>
+  <li>Otherwise, if <em>value</em> is <a class="tref internalDFN" title="true" href="#dfn-true">true</a>, <a class="tref internalDFN" title="false" href="#dfn-false">false</a>, or
+    a <a class="tref internalDFN" title="number" href="#dfn-number">number</a>, if <em>term</em> has a
+    <code>@type</code> coercion to <code>xsd:boolean</code>,
+    <code>xsd:integer</code>, or <code>xsd:double</code> respectively,
+    <a class="tref internalDFN" title="term_rank" href="#dfn-term_rank">term rank</a> is <code>3</code>, otherwise if <em>term</em> has no <code>@type</code> or
+    <code>@language</code> it is <code>2</code>, otherwise <code>1</code>.</li>
+  <li>Otherwise, if <em>value</em> is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, it represents a string value
+    with no <code>@language</code>. If <em>term</em> has <code>@language</code> <a class="tref internalDFN" title="null" href="#dfn-null">null</a>,
+    or <em>term</em> has no <code>@type</code> or <code>@language</code> and the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>
+    has no <code>@language</code>, <a class="tref internalDFN" title="term_rank" href="#dfn-term_rank">term rank</a> is <code>3</code>, otherwise <code>0</code>.</li>
+  <li>Otherwise, <em>value</em> <em class="rfc2119" title="must">must</em> be a <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a>, <a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">subject reference</a>,
+    or a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> having a <code>@value</code>.
+    <ol class="algorithm">
+      <li>If <em>value</em> has an <code>@value</code> property, it must have either a <code>@type</code>
+        or a <code>@language</code>:
+        <ol class="algorithm">
+          <li>If <em>value</em> has a <code>@type</code> property matching a
+            <code>@type</code> coercion for <em>term</em>, <a class="tref internalDFN" title="term_rank" href="#dfn-term_rank">term rank</a>
+            is <code>3</code>, otherwise if <em>term</em> has no <code>@type</code>
+            coersion and no <code>@language</code>, <a class="tref internalDFN" title="term_rank" href="#dfn-term_rank">term rank</a> is
+            <code>1</code>, otherwise <code>0</code>.</li>
+          <li>Otherwise, if <em>value</em> has a <code>@language</code> property matching a
+            <code>@language</code> definition for <em>term</em> (or
+            <em>term</em> has no <code>@type</code> or <code>@language</code> definition and
+            <code>@language</code> in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> matches the
+            <em>value</em> <code>@language</code>), <a class="tref internalDFN" title="term_rank" href="#dfn-term_rank">term rank</a> is
+            <code>3</code>, otherwise if <em>term</em> has no <code>@type</code>
+            coersion and no <code>@language</code>, <a class="tref internalDFN" title="term_rank" href="#dfn-term_rank">term rank</a> is
+            <code>1</code>, otherwise <code>0</code>.</li>
+        </ol>
+      </li>
+      <li>Otherwise, if <em>term</em> has <code>@type</code> coerced to <code>@id</code>,
+        <a class="tref internalDFN" title="term_rank" href="#dfn-term_rank">term rank</a> is <code>3</code>, otherwise
+        if <em>term</em> has no <code>@type</code> coersion and no <code>@language</code>,
+        <a class="tref internalDFN" title="term_rank" href="#dfn-term_rank">term rank</a> is <code>1</code>, otherwise <code>0</code>.</li>
+    </ol>
+  </li>
+  <li>Return <a class="tref internalDFN" title="term_rank" href="#dfn-term_rank">term rank</a>.</li>
+</ol>
+</div>
+
+</div>
+
+<div id="value-expansion" class="section">
+  <h3><span class="secno">3.6 </span>Value Expansion</h3>
+  <p>Some values in JSON-LD can be expressed in a compact form. These values
+    are required to be expanded at times when processing JSON-LD documents.</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 <a class="tref internalDFN" title="number" href="#dfn-number">number</a> and the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of typed literal
+      coercion to <code>xsd:integer</code> or <code>xsd:double</code>, expand the value into an object with
+      two key-value pairs. The first key-value pair will be <code>@value</code> and the string representation of
+      <em>value</em> as defined in the section <a href="#data-round-tripping">Data Round Tripping</a>. The second
+      key-value pair will be <code>@type</code> and the associated coercion datatype expanded according to the
+      <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion</a> rules.</li>
+    <li>Otherwise, if <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is <code>@graph</code>, or the target of an <code>@id</code> coercion, expand the value
+      into an object with a key-value pair where the key is <code>@id</code> and the value is the expanded
+      <abbr title="Internationalized Resource Identifier">IRI</abbr> according to the <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion</a> rules.</li>
+    <li>Otherwise, if <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of typed literal coercion,
+      expand <em>value</em> into an object with key-value pairs. The first key-value pair will be <code>@value</code>
+      and the unexpanded <em>value</em>. The second key-value pair will be <code>@type</code> and the associated coercion
+      datatype expanded according to the <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion</a> rules.</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> is not the target of
+      typed literal coercion but target of language tagging, expand <em>value</em> into an object with two
+      key-value pairs. The first key-value pair will be <code>@value</code> and the unexpanded <em>value</em>.
+      The second key-value pair will be <code>@language</code> and value of the language tagging from the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</li>
+    <li>Otherwise, <em>value</em> is already expanded.</li>
+  </ol>
+</div>
+
+<div id="value-compaction" class="section">
+  <h3><span class="secno">3.7 </span>Value Compaction</h3>
+  <p>Some values, such as IRIs and typed literals, may be expressed in an
+    expanded form in JSON-LD. These values are required to be compacted at
+    times when processing JSON-LD documents.
+  </p>
+
+  <p>The algorithm for compacting an expanded value <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 the value may be expressed as <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="number" href="#dfn-number">number</a>,
+      the value is the native representation of the <code>@value</code> value.</li>
+    <li>If <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is <code>@graph</code>, the compacted value is the
+      value associated with the <code>@id</code> key, processed according to
+      the <a href="#iri-compaction"><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction</a> steps.</li>
+    <li>Otherwise, if the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> contains a coercion target for the
+      key that matches the expression of the value, compact the value using the
+      following steps:
+      <ol class="algorithm">
+        <li>If the coercion target is an <code>@id</code>, the compacted
+          value is the value associated with the <code>@id</code> key,
+          processed according to the
+          <a href="#iri-compaction"><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction</a> steps.</li>
+        <li>If the coercion target is a typed literal, the compacted
+          value is the value associated with the <code>@value</code> key.</li>
+      </ol>
+    </li>
+    <li>Otherwise, if <em>value</em> contains an <code>@id</code> key, the compacted value is <em>value</em> with
+      the value of <code>@id</code> processed according to the
+      <a href="#iri-compaction"><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction</a> steps.</li>
+    <li>Otherwise, if the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> contains a <code>@language</code>, which
+      matches the <code>@language</code> of the value, or the value has only a <code>@value</code> key, the compacted
+      value is the value associated with the <code>@value</code> key.</li>
+    <li>Otherwise, if the value contains a <code>@type</code> key, the compacted value
+      is <em>value</em> with the <code>@type</code> value processed according to the
+      <a href="#iri-compaction"><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction</a> steps.</li>
+    <li>Otherwise, the value is not modified.</li>
+  </ol>
+</div>
+
+<div id="generate-blank-node-identifier" class="section">
+<h3><span class="secno">3.8 </span>Generate Blank Node Identifier</h3>
+<p>This algorithm is used by the <a href="#framing-algorithm">Framing Algorithm</a> and
+  <a href="#convert-from-rdf-algorithm">Convert From RDF Algorithm</a> to deterministicly name
+  <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a> identifiers. It uses a <em>identifier map</em> and <em>prefix</em>
+  and takes a possibly <a class="tref internalDFN" title="null" href="#dfn-null">null</a> identifier and returns a new identifier based on <em>prefix</em>.</p>
+<p>The variable <em>next identifier</em> is initialized to <em>prefix</em> appended with <code>0</code>.</p>
+
+<ol class="algorithm">
+  <li>If the old identifier is not null and is in <em>identifier map</em> return the mapped identifier.</li>
+  <li>Otherwise, if old identifier is not null, create a new entry in <em>identifier map</em> initialized
+    to the current value of <em>next identifier</em>. Increment <em>next identifier</em> by adding one
+    to the integer suffix. Return the mapped identifier.</li>
+  <li>Otherwise, increment <em>next identifier</em> by adding one to the integer suffix and return its
+    original value.</li>
+</ol>
+</div>
+
+<div id="expansion" class="section">
+<h3><span class="secno">3.9 </span>Expansion</h3>
+
+<p>Expansion is the process of taking a JSON-LD document and applying a
+  context such that all <abbr title="Internationalized Resource Identifier">IRI</abbr>, 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 <a href="#framing">Framing</a>.</p>
+
+<p>For example, assume the following JSON-LD input document:</p>
+
+<pre class="example">{
+   &quot;@context&quot;:
+   {
+      &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+      &quot;homepage&quot;: {
+        &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+        &quot;@type&quot;, &quot;@id&quot;
+      }
+   },
+   &quot;name&quot;: &quot;Manu Sporny&quot;,
+   &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;
+}</pre>
+
+<p>Running the JSON-LD Expansion algorithm against the JSON-LD input document
+  provided above would result in the following output:</p>
+
+<pre class="example">{
+   &quot;http://xmlns.com/foaf/0.1/name&quot;: &quot;Manu Sporny&quot;,
+   &quot;http://xmlns.com/foaf/0.1/homepage&quot;: {
+      &quot;@id&quot;: &quot;http://manu.sporny.org/&quot;
+   }
+}</pre>
+
+<div id="expansion-algorithm" class="section">
+<h4><span class="secno">3.9.1 </span>Expansion Algorithm</h4>
+
+<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 <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial
+  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 <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>, process each entry in <em>element</em> 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>.
+    If has a <code>@container</code> set to <code>@list</code> and any entry in <em>element</em> is an
+    <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, or is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> containing a <code>@list</code> property,
+    throw an exception, as lists of lists are not allowed.
+    If the expanded entry is null, drop it. If it's an array, merge it's entries with <em>element</em>'s entries.</li>
+  <li>Otherwise, if <em>element</em> is an object
+    <ol class="algorithm">
+      <li>If <em>element</em> has a <code>@context</code> property, 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>
+        property.</li>
+      <li>Then, proceed and process each <em>property</em> and <em>value</em> in <em>element</em> as follows:
+        <ol class="algorithm">
+          <li>Remove <em>property</em> from <em>element</em>, expand
+            <em>property</em> according to the steps outlined in <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion</a>.
+            Set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> to the original un-expanded <em>property</em> if
+            <em>property</em> is not a <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>.</li>
+          <li>If <em>property</em> does not expand to a keyword or 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 property from <em>element</em>.</li>
+          <li>If <em>value</em> is <a class="tref internalDFN" title="null" href="#dfn-null">null</a> and <em>property</em> is not <code>@value</code>, continue with the next
+            property from <em>element</em>.</li>
+          <li>If the <em>property</em> is <code>@id</code> the <em>value</em> <em class="rfc2119" title="must">must</em> be a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>.
+            Expand the <em>value</em> according to <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion</a>.</li>
+          <li>Otherwise, if the <em>property</em> is <code>@type</code>:
+            <ol class="algorithm">
+              <li>If <em>value</em> is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, expand according to <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion</a>.</li>
+              <li>Otherwise, if <em>value</em> is a <a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">subject reference</a>, the expanded value
+                is the result of performing <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion</a> on the value of <code>@id</code>.</li>
+              <li>Otherwise, if <em>value</em> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON Object</a>, it must be empty (used for
+                <a href="#framing">Framing</a>).</li>
+              <li>Otherwise, if <em>value</em> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, all elements must be either a
+                <a class="tref internalDFN" title="string" href="#dfn-string">string</a> or <a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">subject reference</a>. Expand <em>value</em> for each
+                of it's entries using the previous three steps.</li>
+            </ol>
+          </li>
+          <li>Otherwise, if the <em>property</em> is <code>@value</code> or <code>@language</code> the <em>value</em> <em class="rfc2119" title="must not">must not</em> be a
+            <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> or an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.</li>
+          <li>Otherwise, if the <em>property</em> is <code>@list</code>, <code>@set</code>, or <code>@graph</code>, expand <em>value</em>
+            recursively using this algorithm, passing copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> and <em>active property</em>. If the expanded
+            <em>value</em> is not an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, convert it to an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.
+            If <em>property</em> is <code>@list</code> and any entry in <em>value</em> is a
+            <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> containing an <code>@list</code> property, throw an exception, as
+            lists of lists are not supported.</li>
+          <li>Otherwise, expand <em>value</em> 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>property</em> is not a keyword
+            and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> has a <code>@container</code> <code>@list</code>
+            and the expanded <em>value</em> is not <a class="tref internalDFN" title="null" href="#dfn-null">null</a>,
+            convert <em>value</em> to an <a class="tref internalDFN" title="object" href="#dfn-object">object</a> with an <code>@list</code> property whose value is
+            set to <em>value</em> (unless <em>value</em> is already in that form).</li>
+          <li>Convert <em>value</em> to <a class="tref internalDFN" title="array" href="#dfn-array">array</a> form unless <em>value</em> is <a class="tref internalDFN" title="null" href="#dfn-null">null</a> or <em>property</em> is
+            <code>@id</code>, <code>@type</code>, <code>@value</code>, or <code>@language</code>.</li>
+          <li>If <em>value</em> is not <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, either merge <em>value</em> into an existing <em>property</em> property of
+            <em>element</em> or create a new <em>property</em> property with <em>value</em> as value.</li>
+        </ol>
+      </li>
+      <li>If the processed <em>element</em> has an <code>@value</code> property
+        <ol class="algorithm">
+          <li><em>element</em> <em class="rfc2119" title="must not">must not</em> have more than one other property, which can either be <code>@language</code> or <code>@type</code>
+            with a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> value.</li>
+          <li>if <code>@value</code> is the only property or the value of <code>@value</code> equals <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, replace
+            <em>element</em> with the value of <code>@value</code>.</li>
+        </ol>
+      </li>
+      <li>Otherwise, if <em>element</em> has an <code>@type</code> property and it's value is not in the form of an
+        <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, convert it to an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.</li>
+      <li>If <em>element</em> has an <code>@set</code> or <code>@list</code> property, it <em class="rfc2119" title="must">must</em> be the only property.
+        Set <em>element</em> to the value of <code>@set</code>; leave <code>@list</code> untouched.</li>
+      <li>If <em>element</em> has just a <code>@language</code> property, set <em>element</em> to <a class="tref internalDFN" title="null" href="#dfn-null">null</a>.</li>
+    </ol>
+  </li>
+  <li>Otherwise, expand <em>element</em> according to the <a href="#value-expansion">Value Expansion</a> rules,
+    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>
+</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>
+  property, <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>
+
+</div>
+
+</div>
+
+<div id="compaction" class="section">
+<h3><span class="secno">3.10 </span>Compaction</h3>
+
+<p>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>
+
+<pre class="example">{
+  &quot;http://xmlns.com/foaf/0.1/name&quot;: &quot;Manu Sporny&quot;,
+  &quot;http://xmlns.com/foaf/0.1/homepage&quot;: {
+    &quot;@id&quot;: &quot;http://manu.sporny.org/&quot;
+  }
+}</pre>
+
+<p>Additionally, assume the following developer-supplied JSON-LD context:</p>
+
+<pre class="example">{
+  &quot;@context&quot;: {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;homepage&quot;: {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  }
+}</pre>
+
+<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>
+
+<pre class="example">{
+  &quot;@context&quot;: {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;homepage&quot;: {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  },
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;
+}</pre>
+
+<p>The compaction algorithm also enables the developer to map any expanded
+  format into an application-specific compacted format. 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.</p>
+
+<div id="compaction-algorithm" class="section">
+<h4><span class="secno">3.10.1 </span>Compaction Algorithm</h4>
+
+<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 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="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>. This removes any existing
+  context to allow the given <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to be cleanly applied.</p>
+
+<ol class="algorithm">
+  <li>If <em>element</em> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, process each entry 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> and the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.
+    If <em>element</em> has a single item, the compacted value is that item; otherwise the compacted value
+    is <em>element</em>.</li>
+  <li>Otherwise, if <em>element</em> is an object:
+    <ol class="algorithm">
+      <li>If <em>element</em> has an <code>@value</code> property or element is a <a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">subject reference</a>,
+        return the result of performing
+        <a href="#value-compaction">Value Compaction</a> on <em>element</em> using <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
+      <li>Otherwise, if the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> has a <code>@container</code> mapping to <code>@list</code>
+        and <em>element</em> has a corresponding <code>@list</code> property, recursively compact that
+        property's value passing a copy of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> and the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> ensuring
+        that the result is an array and removing <a class="tref internalDFN" title="null" href="#dfn-null">null</a> values. Return either the
+        result as an array, as an object with a key of <code>@list</code> (or appropriate alias from
+        <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>).</li>
+      <li>Otherwise, construct <em>output</em> as a new <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> used for returning the result
+        of compacting <em>element</em>. For each <em>property</em> and <em>value</em> in <em>element:</em>
+        <ol class="algorithm">
+          <li>If <em>property</em> is <code>@id</code> or <code>@type</code>
+            <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"><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction</a> on <em>property</em>.</li>
+              <li>If <em>value</em> is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, the compacted <em>value</em> is the result of performing
+                <a href="#iri-compaction"><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction</a> on <em>value</em>.</li>
+              <li>Otherwise, <em>value</em> <em class="rfc2119" title="must">must</em> be an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>. Perform <a href="#iri-compaction"><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction</a>
+                on every entry of <em>value</em>. If <em>value</em> contains just one entry, <em>value</em> is set to that entry.</li>
+              <li>Add <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the expanded <em>value</em> to <em>output</em>.</li>
+            </ol>
+          </li>
+          <li>Otherwise, <em>value</em> <em class="rfc2119" title="must">must</em> be an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.</li>
+          <li>If <em>value</em> is empty:
+            <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"><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction</a> on <em>property</em>.</li>
+              <li>Create an entry in <em>output</em> for <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and <em>value</em>.</li>
+            </ol>
+          </li>
+          <li>For each <em>item</em> in <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"><abbr title="Internationalized Resource Identifier">IRI</abbr> Compaction</a>
+                for <em>property</em> and <em>item</em> using the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</li>
+              <li>Compact <em>item</em> by recursively performing this algorithm passing a copy of
+                the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> and the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
+              <li>If an entry already exists in <em>output</em> for <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>, convert it
+                to an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> if necessary, and append the compacted <em>value</em>.</li>
+              <li>Otherwise, if the compacted <em>value</em> is not an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+                has a <code>@container</code> mapping to <code>@set</code>,
+                create an entry in <em>output</em> for <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and <em>value</em> as an
+                <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.</li>
+              <li>Otherwise, create an entry in <em>output</em> for <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and <em>value</em>.</li>
+            </ol>
+          </li>
+        </ol>
+      </li>
+    </ol>
+  </li>
+  <li>Otherwise, return <em>element</em> as the compacted <em>element</em>.
+    <div class="issue">Perhaps this should also call <a href="#value-compaction">Value Compaction</a> on
+      native types and strings, which could consolodate potential transformation in one place.</div>
+  </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>, put <em>element</em> into the
+  <code>@graph</code> property of a new <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> and then set <em>element</em> to that <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>.
+  Finally, add a <code>@context</code> property to <em>element</em> and set it to the initially passed <em>context</em>.</p>
+
+</div>
+
+</div>
+
+<div id="framing" class="section">
+<h3><span class="secno">3.11 </span>Framing</h3>
+
+<p>JSON-LD Framing allows developers to query by example and
+  force a specific tree layout to a JSON-LD document.</p>
+
+<p>A JSON-LD document is a representation of a directed graph. A single
+  directed graph can have many different serializations, each expressing
+  exactly the same information. Developers typically work with trees, represented as
+  <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>s. While mapping a graph to
+  a tree can be done, the layout of the end result must be specified in advance.
+  A <dfn title="frame" id="dfn-frame">Frame</dfn> can be used by a developer on a JSON-LD document to
+  specify a deterministic layout for a graph.</p>
+
+<p>Framing is the process of taking a JSON-LD document, which expresses a
+  graph of information, and applying a specific graph layout
+  (called a <a class="tref internalDFN" title="frame" href="#dfn-frame">Frame</a>).</p>
+
+<p>Framing makes use of the <a href="#subject-flattening">Subject Flattening</a> algorithm
+  to place each object defined in the JSON-LD document into a flat list of objects, allowing
+  them to be operated upon by the framing algorithm.</p>
+
+<div id="framing-algorithm-terms" class="section">
+<h4><span class="secno">3.11.1 </span>Framing Algorithm Terms</h4>
+
+<dl>
+  <dt><dfn title="input_frame" id="dfn-input_frame">input frame</dfn></dt>
+  <dd>the initial <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> provided to the framing algorithm.</dd>
+  <dt><dfn title="framing_context" id="dfn-framing_context">framing context</dfn></dt>
+  <dd>a context containing a <a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds">map of embeds</a>, the
+    <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a>, the
+    <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> and the
+    <a class="tref internalDFN" title="omit_default_flag" href="#dfn-omit_default_flag">omit default flag</a>.</dd>
+  <dt><dfn title="map_of_embeds" id="dfn-map_of_embeds">map of embeds</dfn></dt>
+  <dd>a map that tracks if a subject is to be embedded in the output of the
+    <a href="#framing-algorithm">Framing Algorithm</a>; it maps a subject
+    <code>@id</code> to a parent <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> and property
+    or parent array.</dd>
+  <dt><dfn title="object_embed_flag" id="dfn-object_embed_flag">object embed flag</dfn></dt>
+  <dd>a flag specifying that objects should be directly embedded in the output,
+    instead of being referred to by their <abbr title="Internationalized Resource Identifier">IRI</abbr>.</dd>
+  <dt><dfn title="explicit_inclusion_flag" id="dfn-explicit_inclusion_flag">explicit inclusion flag</dfn></dt>
+  <dd>a flag specifying that for properties to be included in the output, they
+    must be explicitly declared in the <a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">framing context</a>.</dd>
+  <dt><dfn title="omit_default_flag" id="dfn-omit_default_flag">omit default flag</dfn></dt>
+  <dd>a flag specifying that properties that are missing from the
+    <a class="tref internalDFN" title="json-ld_input" href="#dfn-json-ld_input">JSON-LD input</a>, but present in the <a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">input frame</a>
+    should be omitted from the output.</dd>
+  <dt><dfn title="map_of_flattened_subjects" id="dfn-map_of_flattened_subjects">map of flattened subjects</dfn></dt>
+  <dd>a map of subjects that is the result of the
+    <a href="#subject-flattening">Subject Flattening Algorithm</a>.</dd>
+</dl>
+</div>
+
+<div id="framing-algorithm" class="section">
+<h4><span class="secno">3.11.2 </span>Framing Algorithm</h4>
+
+<p class="issue">This algorithm is a work in progress. Presently, it only works
+  for documents without named graphs.</p>
+
+<p>The framing algorithm takes an <a class="tref internalDFN" title="json-ld_input" href="#dfn-json-ld_input">JSON-LD input</a> (<strong>expanded input</strong>)
+  and an <a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">input frame</a> (<strong>expanded frame</strong>) that have been expanded
+  according to the <a href="#expansion-algorithm">Expansion Algorithm</a>, and a number of
+  options and produces <a class="tref internalDFN" title="json-ld_output" href="#dfn-json-ld_output">JSON-LD output</a>.</p>
+
+<p>Create <a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">framing context</a> using <a class="tref internalDFN" title="null" href="#dfn-null">null</a> for the <a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds">map of embeds</a>,
+    the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> set to <a class="tref internalDFN" title="true" href="#dfn-true">true</a>, the
+    <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> set to <a class="tref internalDFN" title="false" href="#dfn-false">false</a>, and the
+    <a class="tref internalDFN" title="omit_default_flag" href="#dfn-omit_default_flag">omit default flag</a> set to <a class="tref internalDFN" title="false" href="#dfn-false">false</a> along with <a class="tref internalDFN" title="map_of_flattened_subjects" href="#dfn-map_of_flattened_subjects">map of flattened subjects</a>
+    set to the result of performing <a href="#subject-flattening">Subject Flattening</a> on
+    <strong>expanded input</strong>. Also create <em>results</em> as an empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.</p>
+
+<p>Invoke the recursive algorithm using <a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">framing context</a> (<em>state</em>),
+  the <a class="tref internalDFN" title="map_of_flattened_subjects" href="#dfn-map_of_flattened_subjects">map of flattened subjects</a> (<em>subjects</em>),
+  <strong>expanded frame</strong> (<em>frame</em>), <em>result</em> as <em>parent</em>, and
+  <a class="tref internalDFN" title="null" href="#dfn-null">null</a> as <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</p>
+
+<p>The following series of steps is the recursive
+  portion of the framing algorithm:</p>
+
+<ol class="algorithm">
+  <li>Validate <em>frame</em>.</li>
+  <li>Create a set of matched subjects by filtering <em>subjects</em> checking
+    the <a class="tref internalDFN" title="map_of_flattened_subjects" href="#dfn-map_of_flattened_subjects">map of flattened subjects</a> against <em>frame</em>:
+    <ol class="algorithm">
+      <li>If <em>frame</em> has a <code>@type</code> property containing
+        one or more <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a> match any <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a>
+        with a <code>@type</code> property including any of those <a class="tref internalDFN" title="iri" href="#dfn-iri">IRIs</a>.</li>
+      <li>Otherwise, if <em>frame</em> has a <code>@type</code> property only
+        a empty <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>, matches any <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a>
+        with a <code>@type</code> property, regardless of the actual values.</li>
+      <li>Otherwise, match if the <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a> contains all of the
+        non-<a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> properties in <em>frame</em>.</li>
+    </ol>
+  </li>
+  <li>Get values for <em>embedOn</em> and <em>explicitOn</em> by looking in <em>frame</em>
+    for the keys <code>@embed</code> and <code>@explicit</code> using the current values
+    for <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> and <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> from <em>state</em> if not found.</li>
+  <li>For each <em>id</em> and <em>subject</em> from the set of matched subjects, ordered by <em>id</em>:
+    <ol class="algorithm">
+      <li>If the <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>, set the <a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds">map of embeds</a> in
+        <em>state</em> to an empty map.</li>
+      <li>Initialize <em>output</em> with <code>@id</code> and <em>id</em>.</li>
+      <li>Initialize <em>embed</em> with <em>parent</em> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> to
+        <em>property</em>.</li>
+      <li>If <em>embedOn</em> is <a class="tref internalDFN" title="true" href="#dfn-true">true</a>, and <em>id</em> is in <a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds">map of embeds</a>
+        from <em>state</em>:
+        <ol class="algorithm">
+          <li>Set <em>existing</em> to the value of <em>id</em> in <a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds">map of embeds</a>
+            and set <em>embedOn</em> to <a class="tref internalDFN" title="false" href="#dfn-false">false</a>.</li>
+          <li>If <em>existing</em> has a <em>parent</em> which is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> containing a
+            <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> with <code>@id</code> equal to <em>id</em>, <em>element</em> has
+            already been embedded and can be overwritten, so set <em>embedOn</em> to <a class="tref internalDFN" title="true" href="#dfn-true">true</a>.</li>
+          <li>Otherwise, <em>existing</em> has a <em>parent</em> which is a <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a>.
+            Set <em>embedOn</em> to <a class="tref internalDFN" title="true" href="#dfn-true">true</a> if any of the items in <em>parent</em> <em>property</em>
+            is a <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a>
+            or <a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">subject reference</a> for <em>id</em> because the embed can be overwritten.
+          </li>
+          <li>If <em>embedOn</em> is <a class="tref internalDFN" title="true" href="#dfn-true">true</a>, <em>existing</em> is already embedded but
+            can be overwritten, so <a href="#remove-embed">Remove Embedded Definition</a> for <em>id</em>.
+          </li>
+        </ol>
+      </li>
+      <li>If <em>embedOn</em> is <a class="tref internalDFN" title="false" href="#dfn-false">false</a>, add <em>output</em> to <em>parent</em>
+        by either appending to <em>parent</em> if it is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, or appending
+        to <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> in <em>parent</em> otherwise.</li>
+      <li>Otherwise:
+        <ol class="algorithm">
+          <li>Add <em>embed</em> to <a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds">map of embeds</a> for <em>id</em>.</li>
+          <li>Process each <em>property</em> and <em>value</em> in the matched <em>subject</em>, ordered
+            by <em>property</em>:
+            <ol class="algorithm">
+              <li>If <em>property</em> is a <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>, add <em>property</em> and a copy of <em>value</em>
+                to <em>output</em> and continue with the next property from <em>subject</em>.</li>
+              <li>If <em>property</em> is not in <em>frame</em>:
+                <ol class="algorithm">
+                  <li>If <em>explicitOn</em> is <a class="tref internalDFN" title="false" href="#dfn-false">false</a>, <a href="#embed-values">Embed values</a>
+                    from <em>subject</em> in <em>output</em> using <em>subject</em> as <em>element</em> and
+                    <em>property</em> as <em>active property</em>.</li>
+                  <li>Continue to next property.</li>
+                </ol>
+              </li>
+              <li id="frm-process-prop-item">Process each <em>item</em> from <em>value</em> as follows:
+                <ol class="algorithm">
+                  <li>If <em>item</em> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> with the key <code>@list</code>, then
+                    create a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> named <em>list</em> with the key <code>@list</code> and
+                    the value of an empty array. Append <em>list</em> to <em>property</em> in
+                    <em>output</em>. Process each <em>listitem</em> in the <code>@list</code> array as follows:
+                    <ol class="algorithm">
+                      <li>If <em>listitem</em> is a <a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">subject reference</a>
+                        process <em>listitem</em> recursively using this algorithm passing a new map of
+                        <em>subjects</em> that contains the <code>@id</code> of <em>listitem</em> as the key
+                        and the <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a> from the original <a class="tref internalDFN" title="map_of_flattened_subjects" href="#dfn-map_of_flattened_subjects">map of flattened subjects</a>
+                        as the value. Pass the first value from
+                        <em>frame</em> for <em>property</em> as <em>frame</em>, <em>list</em>
+                        as <em>parent</em>, and <code>@list</code> as <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
+                      <li>Otherwise, append a copy of <em>listitem</em> to <code>@list</code> in <em>list</em>.</li>
+                    </ol>
+                  </li>
+                  <li>If <em>item</em> is a <a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">subject reference</a>
+                    process <em>item</em> recursively using this algorithm passing a new map as
+                    <em>subjects</em> that contains the <code>@id</code> of <em>item</em> as the key and
+                    the <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a> from the original <a class="tref internalDFN" title="map_of_flattened_subjects" href="#dfn-map_of_flattened_subjects">map of flattened subjects</a>
+                    as the value. Pass the first value from
+                    <em>frame</em> for <em>property</em> as <em>frame</em>, <em>output</em>
+                    as <em>parent</em>, and <em>property</em> as <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.
+                  <div class="issue">Passing a <a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">subject reference</a> doesn't work if this map
+                    is used recursively. Presently pass <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a> from original
+                    <a class="tref internalDFN" title="map_of_flattened_subjects" href="#dfn-map_of_flattened_subjects">map of flattened subjects</a>.</div></li>
+                  <li>Otherwise, append a copy of <em>item</em> to <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> in
+                    <em>output</em>.</li>
+                </ol>
+              </li>
+            </ol>
+          </li>
+          <li>Process each <em>property</em> and <em>value</em> in <em>frame</em>,
+            where <em>property</em> is not a <em>keyword</em>, ordered by <em>property</em>:
+            <ol class="algorithm">
+              <li>Set <em>property frame</em> to the first item in <em>value</em> or a newly created
+                <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> if <em>value</em> is empty.</li>
+              <li>Skip to the next property in <em>frame</em> if <em>property</em> is in <em>output</em>
+                or if <em>property frame</em> contains
+                <code>@omitDefault</code> which is <a class="tref internalDFN" title="true" href="#dfn-true">true</a> or if it does not contain
+                <code>@omitDefault</code> but the value of <a class="tref internalDFN" title="omit_default_flag" href="#dfn-omit_default_flag">omit default flag</a>
+                <a class="tref internalDFN" title="true" href="#dfn-true">true</a>.</li>
+              <li>Set the value of <em>property</em> in <em>output</em> to a new <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>
+                with a property <code>@preserve</code> and a value that is a copy of the value
+                of <code>@default</code> in <em>frame</em> if it exists, or the string
+                <code>@null</code> otherwise.</li>
+            </ol>
+          </li>
+          <li>Add <em>output</em> to <em>parent</em>.
+            If <em>parent</em> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, append <em>output</em>, otherwise
+            append <em>output</em> to <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> in <em>parent</em>.</li>
+        </ol>
+      </li>
+    </ol>
+  </li>
+</ol>
+
+<p>At the completion of the recursive algorithm, <em>results</em> will contain the top-level
+  <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a>s.</p>
+<p>The final two steps of the framing algorithm require
+  <em>results</em> to be compacted according to the
+  <a href="#compaction-algorithm">Compaction Algorithm</a> by using the
+  context provided in the <a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">input frame</a>. If the frame has no context, compaction
+  is performed with an empty context (not a null context). The compaction result <em class="rfc2119" title="must">must</em> use
+  the <code>@graph</code> keyword at the top-level, even if the context is empty or if there
+  is only one element to put in the <code>@graph</code> array. Subsequently, replace all key-value
+  pairs where the key is <code>@preserve</code> with the value from the key-pair. If the value
+  from the key-pair is <code>@null</code>, replace the value with <a class="tref internalDFN" title="null" href="#dfn-null">null</a>. If,
+  after replacement, an array contains only the value <a class="tref internalDFN" title="null" href="#dfn-null">null</a> remove the value, leaving
+  an empty array. The resulting value is the final <a class="tref internalDFN" title="json-ld_output" href="#dfn-json-ld_output">JSON-LD output</a>.</p>
+
+<p class="issue">The algorithm needs to be updated to consider <code>@graph</code>.
+  For 1.0, this might not require anything, as the default implementation of <a href="#subject-flattening">Subject Flattening</a> should flatten everything
+  into a single graph.</p>
+
+</div>
+
+<div id="subject-flattening" class="section">
+<h4><span class="secno">3.11.3 </span>Subject Flattening</h4>
+<p>Subject Flattening takes as input an expanded JSON-LD document, and results in a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>
+  <em>subjects</em> with a mapping from each object represented in the document to a single entry within
+  the input document, assigning <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a> identifiers to objects without a @id, or with an @id that
+  references a blank node identifier.</p>
+
+<p>The algorithm operates on the initially empty <em>subjects</em> and takes as input the
+  current document <em>element</em>.</p>
+
+<ol class="algorithm">
+  <li>If <em>element</em> is an array, process each entry in element recursively, using this algorithm.</li>
+  <li>Otherwise, if element is a JSON object:
+    <ol class="algorithm">
+      <li>If element is a <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a> or <a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">subject reference</a>:
+        <ol class="algorithm">
+          <li>If the property <cide>@id</cide> is not an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>, return a
+            <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a> identifer using <a href="#generate-blank-node-identifier">Generate Blank Node Identifier</a> as
+            <em>name</em>, otherwise use the value of the @id property as
+            <em>name</em>.</li>
+          <li>Unless <em>subjects</em> as an entry for <em>name</em> create a new entry in
+            <em>subjects</em> initialized using a new <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>
+            with <code>@id</code> set to <em>name</em> as <em>subject</em>.
+            Otherwise, use that existing entrpy as <em>subject</em>.</li>
+          <li>For each <em>property</em> and <em>value</em> in <em>element</em> other than <code>@id</code>:
+            <ol class="algorithm">
+              <li>If <em>property</em> is a keyword, copy <code>property</code> and <code>value</code>
+                to <code>subject</code>.</li>
+              <li>Otherwise, if value is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>, it <em class="rfc2119" title="must">must</em> only have the key <code>@list.</code>
+                Create a new <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> containing
+                <code>@list</code> and an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> created by
+                performing this algorithm recursively on each item in the list
+                and add to <em>subject</em> along with <em>property</em>.</li>
+              <li>Otherwise, value <em class="rfc2119" title="must">must</em> be an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>. Add property to <em>subject</em>
+                and an array value created by performing this algorithm
+                recursively on each item in the array.</li>
+            </ol>
+          </li>
+          <li>Return a new <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> created as a <a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">subject reference</a> to <em>name</em>.</li>
+        </ol>
+      </li>
+      <li>Otherwise, return <em>element</em>.</li>
+    </ol>
+  </li>
+  <li>Otherwise, return <em>element</em>.</li>
+</ol>
+
+<p class="issue">The algorithm states to set the property in <em>subject</em> using the mapped values,
+  but it really should merge, if the property already exists in <em>subject</em>.</p>
+
+<p class="issue">The algorithm should descend into @graph and create a parallel flattened structure
+  of subject to object within that <code>@graph</code> representation. Recursive <code>@graph</code>
+  definitions are also flattened into the default graph. The algorithm should also
+  take an option which descends into <code>@graph</code> and flattens all definitions at the same level,
+  effectively flatting default and named graphs into a single default graph; this
+  should be the default implementation for 1.0.</p>
+</div>
+
+<div id="remove-embed" class="section">
+<h4><span class="secno">3.11.4 </span>Remove Embedded Definition</h4>
+<p>This algorithm replaces an already embedded <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a> with a
+  <a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">subject reference</a>. It then recursively removes any entries in the
+  <a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds">map of embeds</a> that had the removed <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a> in
+  their parent chain.
+  </p><div class="issue">About as clear as mud</div><p></p>
+<p>The algorithm is invoked with a <a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">framing context</a> and subject id <em>id</em>.</p>
+<ol class="algorithm">
+  <li>Find <em>embed</em> from <a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds">map of embeds</a> for <em>id</em>.</li>
+  <li>Let <em>parent</em> and <em>property</em> be from <em>embed</em>.</li>
+  <li>If <em>parent</em> is an array, replace the <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a> that matches
+    <em>id</em> with a <a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">subject reference</a>. If parent is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>,
+    replace the <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a> for <em>property</em> that matches <em>id</em>
+    with a <a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">subject reference</a>.</li>
+  <li>Remove dependents for <em>id</em> in <a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds">map of embeds</a>
+    by scanning the map for entries with <em>parent</em> that have an <code>@id</code> of <em>id</em>,
+    removing that definition from the map, and then removing the dependents for the <em>parent</em> id
+    recursively by repeating this step. This step will terminate when there are no more embed
+    entries containing the removed <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a>'s <code>@id</code> in their
+    parent chain.</li>
+</ol>
+</div>
+
+<div id="embed-values" class="section">
+<h4><span class="secno">3.11.5 </span>Embed Values</h4>
+<p>This algorithm recursively embeds property values in <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a> <em>output</em>, given a
+  <a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">framing context</a>, input <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a> <em>element</em>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>,
+  and <em>output</em>.</p>
+<ol class="algorithm">
+  <li>For each <em>item</em> in <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> of <em>element</em>:
+    <ol class="algorithm">
+      <li>If <em>item</em> is a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> with the key <code>@list</code>,
+        then create a new <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> with a key <code>@list</code> and
+        a value of an empty array and add it to <em>output</em>, appending if <em>output</em>
+        is an array, and appending to <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> otherwise. Recursively call this
+        algorithm passing <em>item</em> as <em>element</em>, <code>@list</code> as <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>,
+        and the new array as <em>output</em>. Continue to the next <em>item</em>.</li>
+      <li>If <em>item</em> is a <a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">subject reference</a>:
+        <ol class="algorithm">
+          <li>If <a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds">map of embeds</a> does not contain an entry for the <code>@id</code> of <em>item</em>:
+            <ol class="algorithm">
+              <li>Initialize <em>embed</em> with <em>output</em> as <em>parent</em> and
+                <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> as <em>property</em>
+                and add to <a class="tref internalDFN" title="map_of_embeds" href="#dfn-map_of_embeds">map of embeds</a>.</li>
+              <li>Initialize a new <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a> <em>o</em> to act as the
+                embedded <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a>.</li>
+              <li>For each <em>property</em> and <em>value</em> in the expanded definition for
+                <em>item</em> in <em>subjects</em>:
+                <ol class="algorithm">
+                  <li>Add <em>property</em> and a copy of <em>value</em> to <em>o</em> if <em>property</em>
+                    is a <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>.</li>
+                  <li>Otherwise, recursively call this algorithm passing <em>value</em> as <em>element</em>,
+                    <em>property</em> as <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and <em>o</em> as <em>output</em>.</li>
+                </ol>
+              </li>
+            </ol>
+          </li>
+          <li>Set <em>item</em> to <em>o</em>.</li>
+        </ol>
+      </li>
+    </ol>
+  </li>
+  <li>If <em>output</em> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, append a copy of <em>item</em>, otherwise
+    append a copy of <em>item</em> to <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> in <em>output</em>.</li>
+</ol>
+</div>
+</div>
+
+</div>
+
+<div id="data-round-tripping" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">4. </span>Data Round Tripping</h2>
+
+<p>When coercing numbers to <strong>xsd:integer</strong> or <strong>xsd:double</strong>
+  as it, e.g., happens during <a href="#rdf-conversion">RDF Conversion</a>, implementers <em class="rfc2119" title="must">must</em>
+  ensure that the result is a canonical lexical representation in the form of a
+  <a class="tref internalDFN" title="string" href="#dfn-string">string</a>. A <dfn title="canonical_lexical_representation" id="dfn-canonical_lexical_representation">canonical lexical representation</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 canonical lexical representation and a value in the value space as defined in
+  [<cite><a class="bibref" rel="biblioentry" href="#bib-XMLSCHEMA-2">XMLSCHEMA-2</a></cite>]. In other words, every value <em class="rfc2119" title="must">must</em> be converted to a deterministic string
+  representation.</p>
+<p>The canonical lexical representation 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>
+<pre class="example">(value).toFixed(0).toString()</pre>
+<p>The canonical lexical representation 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 &quot;E&quot;, 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>.
+  To convert the number in JavaScript, implementers can use the following snippet of code:</p>
+<pre class="example">(value).toExponential().replace(/e\+?/,'E')</pre>
+<p><strong>xsd:double</strong>'s value space is defined by the IEEE double-precision 64-bit
+floating point type [<cite><a class="bibref" rel="biblioentry" href="#bib-IEEE-754-1985">IEEE-754-1985</a></cite>].</p>
+
+<p class="note">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 representation directly.</p>
+
+<p class="note">When JSON-native datatypes, like <a class="tref internalDFN" title="number" href="#dfn-number">number</a>s, are type coerced, lossless
+data round-tripping can not be guaranted. Consider the following code example:</p>
+
+<pre class="example">var myObj1 = {
+               &quot;@context&quot;: {
+                 &quot;number&quot;: {
+                   &quot;@id&quot;: &quot;http://example.com/vocab#number&quot;,
+                   <span class="diff">&quot;@type&quot;: &quot;xsd:nonNegativeInteger&quot;</span>
+                 }
+               },
+               &quot;number&quot; : <span class="diff">42</span>
+             };
+
+// Convert the JSON-LD document to RDF; this converts 42 to a string
+var jsonldText = jsonld.toRDF(myObj1, myRdfTripleCollector);
+
+// Convert the RDF triples back to a JavaScript object
+var myObj2 = jsonld.fromRDF(myRdfTripleCollector.getTriples());</pre>
+
+<p>At this point, <code>myObj1</code> and <code>myObj2</code> will have different
+  values for the &quot;number&quot; property. <code>myObj1</code> will have the number
+  <code>42</code>, while <code>myObj2</code> have an object consisting of
+  <code>@value</code> set to the string <code>&quot;42&quot;</code> and <code>@type</code>
+  set to the expanded value of <em>xsd:nonNegativeInteger</em>.</p>
+
+<p class="note">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>
+
+</div>
+
+<div id="rdf-conversion" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">5. </span>RDF Conversion</h2>
+
+<p>A JSON-LD document <em class="rfc2119" title="may">may</em> be converted between other RDF-compatible document
+  formats using the algorithms specified in this section.</p>
+
+<p>The JSON-LD Processing Model describes processing rules for extracting RDF
+  from a JSON-LD document, and for transforming an array of <a href="#idl-def-Statement" class="idlType"><code>Statement</code></a> retrieved by processing
+  another serialization format into JSON-LD. 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 statements during the output process and are not required to
+  implement the algorithm exactly as described.</p>
+
+<div class="informative section" id="overview">
+  <h3><span class="secno">5.1 </span>Overview</h3><p><em>This section is non-normative.</em></p>
+  <p>
+    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.
+  </p>
+  <p>
+    As with other grammars used for describing <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a>, a key concept is that of
+    a <dfn title="resource" id="dfn-resource">resource</dfn>. Resources may be of three basic types: <a href="#idl-def-NamedNode" class="idlType"><code>NamedNode</code></a>, representing
+    IRIs for describing
+    externally named entities, <a href="#idl-def-BlankNode" class="idlType"><code>BlankNode</code></a>, resources for which an external name does not
+    exist, or is not known, and <a href="#idl-def-LiteralNode" class="idlType"><code>LiteralNode</code></a>, which describe terminal entities such as strings,
+    dates and other representations having a lexical representation possibly including
+    an explicit language or datatype.
+  </p>
+  <p>An Internationalized Resource Identifier
+    (<dfn title="iri" id="dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></dfn>),
+    as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>], is a mechanism for representing unique
+    identifiers on the web. In <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a>, an <abbr title="Internationalized Resource Identifier">IRI</abbr> is commonly
+    used for expressing a <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>, a <a class="tref internalDFN" title="property" href="#dfn-property">property</a> or an
+    <a class="tref internalDFN" title="object" href="#dfn-object">object</a>.</p>
+  <p>Data described with JSON-LD may be considered to be the representation of a graph made
+    up of <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> and <a class="tref internalDFN" title="object" href="#dfn-object">object</a> <a class="tref internalDFN" title="resource" href="#dfn-resource">resource</a>s related via a
+    <a class="tref internalDFN" title="property" href="#dfn-property">property</a> <a class="tref internalDFN" title="resource" href="#dfn-resource">resource</a>.
+    However, specific implementations may choose to operate on the document as a normal
+    JSON description of objects having attributes.</p>
+</div>
+
+<div id="rdf-conversion-algorithm-terms" class="section">
+  <h3><span class="secno">5.2 </span>RDF Conversion Algorithm Terms</h3>
+  <dl>
+    <dt><dfn title="graph_name" id="dfn-graph_name">graph name</dfn></dt>
+    <dd>
+      A <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> used to identify statements belonging to a
+      <em>named graph</em>.
+    </dd>
+  </dl>
+</div>
+
+<div id="convert-to-rdf-algorithm" class="section">
+  <h3><span class="secno">5.3 </span>Convert to RDF Algorithm</h3>
+  <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 href="#idl-def-Statement" class="idlType"><code>Statement</code></a>s that the following
+    algorithm generates:
+  </p>
+
+  <p>The algorithm takes five 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>. 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, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
+          to a literal value as follows:
+          <ol class="algorithm">
+            <li>
+              As a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> if <em>element</em> contains a <code>@type</code> property
+              after performing <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion</a> on the specified <code>@type</code>.
+            </li>
+            <li>
+              Otherwise, as a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>. If <em>element</em> contains
+              a <code>@language</code> property, use it's value to set the language of the plain literal.
+            </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 nether <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 href="#idl-def-Statement" class="idlType"><code>Statement</code></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> 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 <abbr title="Internationalized Resource Identifier">IRI</abbr> value 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>, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
+      to a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> value created from the string.</li>
+
+    <li>Otherwise, if <em>element</em> 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_literal" href="#dfn-typed_literal">typed literal</a> using a string representation of the value with datatype set
+      to 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 <em>element</em> 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_literal" href="#dfn-typed_literal">typed literal</a> created from the
+      string representation of the value with datatype set to <code>xsd:boolean</code>.</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 href="#idl-def-Statement" class="idlType"><code>Statement</code></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>
+</div>
+<div id="list-conversion" class="section">
+  <h3><span class="secno">5.4 </span>List Conversion</h3>
+
+  <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" rel="biblioentry" 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">This algorithm does not support lists containing lists.</div>
+  <ol class="algorithm">
+    <li>
+      If <em>array</em> is empty return <code>rdf:nil</code>.
+    </li>
+    <li>
+      Otherwise, generate a <a href="#idl-def-Statement" class="idlType"><code>Statement</code></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 <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a></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 <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a></em>, otherwise use <code>rdf:nil</code>.</li>
+        <li>Generate a new <a href="#idl-def-Statement" class="idlType"><code>Statement</code></a> using <em>first <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a></em>,
+          <code>rdf:rest</code> and <em>rest <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a></em>.</li>
+        <li>Set <em>first <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a></em> to
+          <em>rest <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a></em>.</li>
+        <li>Return <em>first <a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">blank node</a></em>.</li>
+      </ol>
+    </li>
+  </ol>
+</div>
+
+<div id="convert-from-rdf-algorithm" class="section">
+  <h3><span class="secno">5.5 </span>Convert from RDF Algorithm</h3>
+  <p>In some cases, data exists natively in Triples or Quads form; 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 href="#idl-def-Statement" class="idlType"><code>Statement</code></a>s into a JSON-LD document.</p>
+  <p>The conversion algorithm takes a single parameter <em>input</em> in the form of an
+    array of <a href="#idl-def-Statement" class="idlType"><code>Statement</code></a> representations.</p>
+  <ol class="algorithm">
+    <li>Construct a JSON <a class="tref internalDFN" title="array" href="#dfn-array">array</a> <em>array</em> to serve as the output object.</li>
+    <li>Construct a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> <em>listMap</em> to map graph names and subjects to objects derived from
+      statements having a property of <code>rdf:first</code>.</li>
+    <li>Construct a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> <em>restMap</em> to map graph names and subjects to objects
+      derived from statements having a property of <code>rdf:rest</code>.</li>
+    <li>Construct a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> <em>subjectMap</em> to map graph names and subjects to
+      <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> instances contained in <em>array</em>.</li>
+    <li>For each statement in <em>input</em>:
+      <ol class="algorithm">
+        <li>If <em>property</em> is <code>rdf:first</code>,
+          create a new entry in <em>listMap</em> with for <em>name</em> and <em>subject</em> and an array value
+          containing <em>object</em> representation and skip to the next statement.</li>
+        <li>If <em>property</em> is <code>rdf:rest</code>,
+          and <em>object</em> is a <a href="#idl-def-BlankNode" class="idlType"><code>BlankNode</code></a>,
+          create a new entry in <em>restMap</em> to map <em>name</em> and <em>subject</em> to a value being the
+          result of <a href="#iri-expansion"><abbr title="Internationalized Resource Identifier">IRI</abbr> expansion</a> on <em>object</em> and skip to the next statement.</li>
+        <li>If <em>name</em> is not <a class="tref internalDFN" title="null" href="#dfn-null">null</a>:
+          <ol class="algorithm">
+            <li>If <em>subjectMap</em> does not have an entry for <a class="tref internalDFN" title="null" href="#dfn-null">null</a> as name and <em>name</em> as subject:
+              <ol class="algorithm">
+                <li>Create 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
+                  a string representation of <em>name</em> and use as <em>value</em>.</li>
+                <li>Save <em>value</em> in <em>subjectMap</em> and append to <em>array</em>.</li>
+              </ol>
+            </li>
+            <li>Otherwise, use that entry as <em>value</em>.</li>
+            <li>If <em>value</em> does not have an entry for <code>@graph</code>, initialize it as a new <a class="tref internalDFN" title="array" href="#dfn-array">array</a> <em>ary</em>.</li>
+            <li>Otherwise, let <em>ary</em> be that array.</li>
+            <li>If <em>subjectMap</em> does not have an entry for <code>name</code> and <em>subject</em>:
+              <ol class="algorithm">
+                <li>Create 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
+                  a string representation of <em>subject</em> and use as <em>value</em>.</li>
+                <li>Save <em>value</em> in <em>subjectMap</em> and append to <em>ary</em>.</li>
+              </ol>
+            </li>
+            <li>Otherwise, use that entry as <em>value</em>.</li>
+          </ol>
+        </li>
+        <li>Otherwise, if <em>subjectMap</em> does not have an entry for <a class="tref internalDFN" title="null" href="#dfn-null">null</a> as name and <em>subject</em>:
+          <ol class="algorithm">
+            <li>Create 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
+              a string representation of <em>subject</em> and use as <em>value</em>.</li>
+            <li>Save <em>value</em> in <em>subjectMap</em> and append to <em>array</em>.</li>
+          </ol>
+        </li>
+        <li>Otherwise, use that entry as <em>value</em>.</li>
+        <li>If <em>property</em> is <code>rdf:type</code>:
+          <ol class="algorithm">
+            <li>Append the string representation of <em>object</em> 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 <code>rdf:nil</code>:
+          <ol class="algorithm">
+            <li>Let <em>key</em> be the string representation of <em>property</em>.</li>
+            <li>Set the value for <em>key</em> in <em>value</em> to an empty <code>@list</code>
+              representation: <code>{&quot;@list&quot;: []}</code>.</li>
+          </ol>
+        </li>
+        <li>Otherwise,
+          <ol class="algorithm">
+            <li>Let <em>key</em> be the string representation of <em>property</em> and let
+              <em>object representation</em>
+              be <em>object</em> represented in expanded form as described in
+              <a href="#value-expansion">Value Expansion</a>.</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>, <em>map</em> in <em>restMap</em>:
+      <ol class="algorithm">
+        <li>For each key/value <em>prev</em>, <em>rest</em> entry in <em>map</em>,
+          append to the <em>listMap</em> value identified
+          by <em>name</em> and <em>prev</em> the <em>listMap</em> value identified by <em>name</em> and <em>rest</em>.</li>
+      </ol>
+    </li>
+    <li>For each <em>name</em>, <em>map</em> in <em>listMap</em>:
+      <ol class="algorithm">
+        <li>For each key/value <em>node</em>, <em>list</em>, in <em>map</em> where <em>list</em>
+          exists as a value of an object in <em>array</em>,
+          replace the object value with <em>list</em>.</li>
+      </ol>
+    </li>
+    <li>Return array as the graph representation in expanded form.</li>
+  </ol>
+</div>
+</div>
+
+<div class="appendix informative section" id="iana-considerations">
+
+<!-- OddPage -->
+<h2><span class="secno">A. </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 W3C Recommendation.</p>
+
+<dl>
+  <dt>Type name:</dt>
+  <dd>application</dd>
+  <dt>Subtype name:</dt>
+  <dd>ld-frame+json</dd>
+  <dt>Required parameters:</dt>
+  <dd>None</dd>
+  <dt>Optional parameters:</dt>
+  <dd>None</dd>
+  <dt>Encoding considerations:</dt>
+  <dd>The same as the <code>application/json</code> MIME media type.</dd>
+  <dt>Security considerations:</dt>
+  <dd>Since a JSON-LD frame is intended to specify a deterministic layout
+    for a JSON-LD graph, 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 frame 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>.jsonldf</dd>
+      <dt>Macintosh file type code(s):</dt>
+      <dd>TEXT</dd>
+    </dl>
+  </dd>
+  <dt>Person &amp; email address to contact for further information:</dt>
+  <dd>Manu Sporny &lt;msporny@digitalbazaar.com&gt;</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>W3C</dd>
+</dl>
+
+</div>
+
+<div id="appendix-b" class="appendix section">
+
+<!-- OddPage -->
+<h2><span class="secno">B. </span>Initial Context</h2>
+  <p>The <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a> is defined with the following default entries:</p>
+<pre class="example">{
+  &quot;@context&quot;: {
+    &quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&quot;: { &quot;@type&quot;: &quot;@id&quot;}
+  }
+}</pre>
+  <p>Processors <em class="rfc2119" title="must">must</em> act as if the initial context is defined in the outer-most level when processing
+    JSON-LD documents.</p>
+  <p class="issue">Should we define other default prefixes?</p>
+</div>
+
+<div class="appendix section" id="acknowledgements">
+
+<!-- OddPage -->
+<h2><span class="secno">C. </span>Acknowledgements</h2>
+
+<p>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,
+Dave Lehn and Mike Johnson who reviewed, provided feedback, and
+performed several implementations of the specification, and Ian Davis, who
+created RDF/JSON. Thanks also to Nathan Rixham, Bradley P. Allen,
+Kingsley Idehen, Glenn McDonald, Alexandre Passant, Danny Ayers, Ted
+Thibodeau Jr., Olivier Grisel, Niklas Lindström, Markus Lanthaler, and Richard
+Cyganiak for their input on the specification.
+</p>
+</div>
+
+
+
+<div id="references" class="appendix section">
+<!-- OddPage -->
+<h2><span class="secno">D. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">D.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
+</dd><dt id="bib-IEEE-754-1985">[IEEE-754-1985]</dt><dd>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-IRI">[IRI]</dt><dd>M. Duerst, M. Suignard. <a href="http://www.ietf.org/rfc/rfc3987.txt"><cite>Internationalized Resource Identifiers (IRI).</cite></a> January 2005. Internet RFC 3987. URL: <a href="http://www.ietf.org/rfc/rfc3986.txt">http://www.ietf.org/rfc/rfc3987.txt</a>
+</dd><dt id="bib-JSON-LD">[JSON-LD]</dt><dd>Manu Sporny, Gregg Kellogg, Markus Lanthaler. <a href="http://json-ld.org/spec/latest/json-ld-syntax/"><cite>The JSON-LD Syntax</cite></a> Latest. W3C Editor's Draft. URL: <a href="http://json-ld.org/spec/latest/json-ld-syntax/">http://json-ld.org/spec/latest/json-ld-syntax/</a>
+</dd><dt id="bib-JSON-POINTER">[JSON-POINTER]</dt><dd>P. Bryan, Ed. <cite><a href="http://www.ietf.org/id/draft-pbryan-zyp-json-pointer-01.txt">JSON Pointer</a></cite> Latest. IETF Draft. URL: <a href="http://www.ietf.org/id/draft-pbryan-zyp-json-pointer-01.txt">http://www.ietf.org/id/draft-pbryan-zyp-json-pointer-01.txt</a>
+</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a>
+</dd><dt id="bib-RDF-SCHEMA">[RDF-SCHEMA]</dt><dd>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-RFC3986">[RFC3986]</dt><dd>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>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>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>Cameron McCormack. <a href="http://www.w3.org/TR/2011/WD-WebIDL-20110927/"><cite>Web IDL.</cite></a> 27 September 2011. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2011/WD-WebIDL-20110927/">http://www.w3.org/TR/2011/WD-WebIDL-20110927/</a>
+</dd><dt id="bib-XMLSCHEMA-2">[XMLSCHEMA-2]</dt><dd>Paul V. Biron; Ashok Malhotra. <a href="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/"><cite>XML Schema Part 2: Datatypes Second Edition.</cite></a> 28 October 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/">http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/</a>
+</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">D.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-ECMA-262">[ECMA-262]</dt><dd><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><cite>ECMAScript Language Specification.</cite></a> December 1999. 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-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a>
+</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a>
+</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2012/CR-rdfa-core-20120313/"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a> 13 March 2012. W3C Candidate Recommendation. URL: <a href="http://www.w3.org/TR/2012/CR-rdfa-core-20120313/">http://www.w3.org/TR/2012/CR-rdfa-core-20120313/</a>
+</dd></dl></div></div></body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20120426/diff-20120318.html	Thu Apr 26 13:04:54 2012 +0200
@@ -0,0 +1,15546 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD Syntax 1.0</title>
+<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
+
+<!--
+  === 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>
+.diff { font-weight:bold; color:#0a3; }
+ol.algorithm.update { margin-left: 2em; }
+ol.algorithm.update>li { list-style-type: none; }
+ol.algorithm.update>li>span.list-number {
+  display:block;
+  float: left;
+  margin-left: -3.5em;
+}
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- 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;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- 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 {
+    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 {
+    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%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- 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;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+    }
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">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, ".") ") "; }
+
+<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>
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
+
+<body style="display: inherit;"><div class="head"><p></p><h1 id="title" class="title">JSON-LD Syntax 1.0</h1><h2 id="subtitle">A Context-based JSON Serialization for Linking Data</h2><h2 id="unofficial-draft-26-april-2012">Unofficial Draft 26 April 2012</h2><dl><dt>Editors:</dt><dd><a href="http://manu.sporny.org/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dd>
+<a href="http://greggkellogg.net/">
+Gregg
+Kellogg
+</a>,
+<a href="http://kellogg-assoc.com/">
+Kellogg
+Associates
+</a>
+</dd>
+<dd>
+<a href="http://www.markus-lanthaler.com/">
+<ins class="diff-new">Markus
+Lanthaler
+</ins></a>,<a href="http://www.tugraz.at/"><ins class="diff-new">
+Graz
+University
+of
+Technology
+</ins></a></dd>
+<dt>
+Authors:
+</dt>
+<dd>
+<a href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</dd>
+<dd>
+<a href="http://digitalbazaar.com/">
+Dave
+Longley
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</dd>
+<dd>
+<a href="http://greggkellogg.net/">
+Gregg
+Kellogg
+</a>,
+<a href="http://kellogg-assoc.com/">
+Kellogg
+Associates
+</a>
+</dd>
+<dd>
+<a href="http://www.markus-lanthaler.com/">
+Markus
+Lanthaler
+</a>,
+<a href="http://www.tugraz.at/">
+Graz
+University
+of
+Technology
+</a>
+</dd>
+<dd>
+<a href="http://webbackplane.com/">
+Mark
+Birbeck
+</a>,
+<a href="http://webbackplane.com/">
+Backplane
+Ltd.
+</a>
+</dd>
+</dl>
+<p>
+This
+document
+is
+also
+available
+in
+this
+non-normative
+format:
+<a href="diff-20120318.html">
+diff
+to
+previous
+version
+</a>.
+</p>
+<p class="copyright">
+This
+document
+is
+licensed
+under
+a
+<a rel="license" href="http://creativecommons.org/licenses/by/3.0/" class="subfoot">
+Creative
+Commons
+Attribution
+3.0
+License
+</a>.
+</p>
+<hr />
+</div>
+<div id="abstract" class="introductory section">
+<h2>
+Abstract
+</h2>
+<p>
+JSON
+<del class="diff-old">[
+RFC4627
+]
+</del>
+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>
+</div>
+<div class="introductory section" id="sotd">
+<h2>
+Status
+of
+This
+Document
+</h2>
+<p>
+This
+document
+is
+merely
+a
+public
+working
+draft
+of
+a
+potential
+specification.
+It
+has
+no
+official
+standing
+of
+any
+kind
+and
+does
+not
+represent
+the
+support
+or
+consensus
+of
+any
+standards
+organisation.
+</p>
+<p>
+This
+document
+is
+an
+experimental
+work
+in
+progress.
+</p>
+</div>
+<div id="toc" class="section">
+<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>
+<li class="tocline">
+<a href="#syntax-tokens-and-keywords" class="tocxref">
+<span class="secno">
+1.2
+</span>
+Syntax
+Tokens
+and
+Keywords
+</a>
+</li>
+<li class="tocline">
+<a href="#contributing" class="tocxref">
+<span class="secno">
+1.3
+</span>
+Contributing
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#design-goals-and-rationale" class="tocxref">
+<span class="secno">
+2.
+</span>
+Design
+<ins class="diff-new">Goals
+and
+Rationale
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#basic-concepts" class="tocxref">
+<span class="secno">
+<del class="diff-old">2.1
+</del>
+<ins class="diff-chg">3.
+</ins>
+</span>
+<del class="diff-old">Goals
+and
+Rationale
+</del>
+<ins class="diff-chg">Basic
+Concepts
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#linking-data" class="tocxref">
+<span class="secno">
+<del class="diff-old">2.2
+</del>
+<ins class="diff-chg">3.1
+</ins>
+</span>
+Linking
+Data
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#the-context" class="tocxref">
+<span class="secno">
+<del class="diff-old">2.2.1
+</del>
+<ins class="diff-chg">3.1.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">2.2.2
+</del>
+<ins class="diff-chg">3.1.2
+</ins>
+</span>
+From
+JSON
+to
+JSON-LD
+</a>
+</li>
+</ul>
+</li>
+<del class="diff-old">3.
+Basic
+Concepts
+</del>
+<li class="tocline">
+<a href="#iris" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.1
+</del>
+<ins class="diff-chg">3.2
+</ins>
+</span>
+IRIs
+</a>
+</li>
+<li class="tocline">
+<a href="#identifying-the-subject" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.2
+</del>
+<ins class="diff-chg">3.3
+</ins>
+</span>
+Identifying
+the
+Subject
+</a>
+</li>
+<li class="tocline">
+<a href="#specifying-the-type" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.3
+</del>
+<ins class="diff-chg">3.4
+</ins>
+</span>
+Specifying
+the
+Type
+</a>
+</li>
+<li class="tocline">
+<del class="diff-old">3.4
+Strings
+</del>
+<a href="#string-internationalization" class="tocxref">
+<span class="secno">
+3.5
+</span>
+String
+Internationalization
+</a>
+</li>
+<li class="tocline">
+<a href="#sets-and-lists" class="tocxref">
+<span class="secno">
+3.6
+</span>
+<del class="diff-old">Typed
+Values
+3.7
+Multiple
+Objects
+for
+a
+Single
+Property
+3.8
+Multiple
+Values
+for
+a
+Single
+Property
+3.9
+</del>
+<ins class="diff-chg">Sets
+and
+</ins>
+Lists
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#advanced-concepts" class="tocxref">
+<span class="secno">
+4.
+</span>
+Advanced
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#typed-values" class="tocxref">
+<span class="secno">
+4.1
+</span>
+<del class="diff-old">Compact
+IRIs
+</del>
+<ins class="diff-chg">Typed
+Values
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#compact-iris" class="tocxref">
+<span class="secno">
+4.2
+</span>
+<del class="diff-old">External
+Contexts
+</del>
+<ins class="diff-chg">Compact
+IRIs
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#external-contexts" class="tocxref">
+<span class="secno">
+4.3
+</span>
+<del class="diff-old">Referencing
+</del>
+<ins class="diff-chg">External
+</ins>
+Contexts
+<del class="diff-old">from
+JSON
+Documents
+</del>
+</a>
+</li>
+<li class="tocline">
+<a href="#referencing-contexts-from-json-documents" class="tocxref">
+<span class="secno">
+4.4
+</span>
+<del class="diff-old">Default
+Language
+</del>
+<ins class="diff-chg">Referencing
+Contexts
+from
+JSON
+Documents
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#expanded-term-definition" class="tocxref">
+<span class="secno">
+4.5
+</span>
+Expanded
+Term
+Definition
+</a>
+</li>
+<li class="tocline">
+<del class="diff-old">4.6
+Automatic
+Typing
+</del>
+<a href="#type-coercion" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.7
+</del>
+<ins class="diff-chg">4.6
+</ins>
+</span>
+Type
+Coercion
+</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">4.7
+</ins>
+</span>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+Within
+a
+Context
+</a>
+</li>
+<li class="tocline">
+<a href="#embedding" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.9
+</del>
+<ins class="diff-chg">4.8
+</ins>
+</span>
+Embedding
+</a>
+</li>
+<li class="tocline">
+<a href="#named-graphs" class="tocxref">
+<span class="secno">
+<ins class="diff-new">4.9
+</ins></span><ins class="diff-new">
+Named
+Graphs
+</ins></a></li><li class="tocline">
+<a href="#identifying-unlabeled-nodes" class="tocxref">
+<span class="secno">
+4.10
+</span>
+Identifying
+Unlabeled
+Nodes
+</a>
+</li>
+<li class="tocline">
+<a href="#aliasing-keywords" class="tocxref">
+<span class="secno">
+4.11
+</span>
+Aliasing
+Keywords
+</a>
+</li>
+<li class="tocline">
+<a href="#expansion" class="tocxref">
+<span class="secno">
+4.12
+</span>
+Expansion
+</a>
+</li>
+<li class="tocline">
+<a href="#compaction" class="tocxref">
+<span class="secno">
+4.13
+</span>
+Compaction
+</a>
+</li>
+<li class="tocline">
+<a href="#framing" class="tocxref">
+<span class="secno">
+4.14
+</span>
+Framing
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#framing-operators" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.15
+</del>
+<ins class="diff-chg">4.14.1
+</ins>
+</span>
+<del class="diff-old">Normalization
+</del>
+<ins class="diff-chg">Framing
+Operators
+</ins>
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#markup-examples" class="tocxref">
+<span class="secno">
+A.
+</span>
+Markup
+Examples
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#turtle" class="tocxref">
+<span class="secno">
+A.1
+</span>
+Turtle
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#prefix-definitions" class="tocxref">
+<span class="secno">
+A.1.1
+</span>
+Prefix
+definitions
+</a>
+</li>
+<li class="tocline">
+<a href="#embedding-1" class="tocxref">
+<span class="secno">
+A.1.2
+</span>
+Embedding
+</a>
+</li>
+<li class="tocline">
+<a href="#lists" class="tocxref">
+<span class="secno">
+A.1.3
+</span>
+Lists
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#rdfa" class="tocxref">
+<span class="secno">
+A.2
+</span>
+RDFa
+</a>
+</li>
+<li class="tocline">
+<a href="#microformats" class="tocxref">
+<span class="secno">
+A.3
+</span>
+Microformats
+</a>
+</li>
+<li class="tocline">
+<a href="#microdata" class="tocxref">
+<span class="secno">
+A.4
+</span>
+Microdata
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#linked-data" class="tocxref">
+<span class="secno">
+B.
+</span>
+Linked
+Data
+</a>
+</li>
+<li class="tocline">
+<a href="#mashing-up-vocabularies" class="tocxref">
+<span class="secno">
+C.
+</span>
+Mashing
+Up
+Vocabularies
+</a>
+</li>
+<li class="tocline">
+<a href="#iana-considerations" class="tocxref">
+<span class="secno">
+D.
+</span>
+IANA
+Considerations
+</a>
+</li>
+<li class="tocline">
+<a href="#acknowledgements" class="tocxref">
+<span class="secno">
+E.
+</span>
+Acknowledgements
+</a>
+</li>
+<li class="tocline">
+<a href="#references" class="tocxref">
+<span class="secno">
+F.
+</span>
+References
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#normative-references" class="tocxref">
+<span class="secno">
+F.1
+</span>
+Normative
+references
+</a>
+</li>
+<li class="tocline">
+<a href="#informative-references" class="tocxref">
+<span class="secno">
+F.2
+</span>
+Informative
+references
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<div class="informative section" id="introduction">
+<h2>
+<span class="secno">
+1.
+</span>
+Introduction
+</h2>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+JSON,
+as
+specified
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+],
+is
+a
+simple
+language
+for
+representing
+data
+on
+the
+Web.
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>
+is
+a
+technique
+for
+creating
+a
+graph
+of
+interlinked
+data
+across
+different
+documents
+or
+Web
+sites.
+Data
+entities
+are
+described
+using
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+s,
+which
+are
+typically
+dereferencable
+and
+thus
+may
+be
+used
+to
+find
+more
+information
+about
+an
+entity,
+creating
+a
+&quot;Web
+of
+Knowledge&quot;.
+JSON-LD
+is
+intended
+to
+be
+a
+simple
+publishing
+method
+for
+expressing
+not
+only
+Linked
+Data
+in
+JSON,
+but
+also
+for
+adding
+semantics
+to
+existing
+JSON.
+</p>
+<p>
+JSON-LD
+is
+designed
+as
+a
+lightweight
+syntax
+that
+can
+be
+used
+to
+express
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>.
+It
+is
+primarily
+intended
+to
+be
+a
+way
+to
+use
+Linked
+Data
+in
+Javascript
+and
+other
+Web-based
+programming
+environments.
+It
+is
+also
+useful
+when
+building
+interoperable
+Web
+services
+and
+when
+storing
+Linked
+Data
+in
+JSON-based
+document
+storage
+engines.
+It
+is
+practical
+and
+designed
+to
+be
+as
+simple
+as
+possible,
+utilizing
+the
+large
+number
+of
+JSON
+parsers
+and
+libraries
+available
+today.
+</p>
+<p>
+The
+syntax
+does
+not
+necessarily
+require
+applications
+to
+change
+their
+JSON,
+but
+allows
+one
+to
+easily
+add
+meaning
+by
+simply
+adding
+or
+referencing
+a
+context.
+The
+syntax
+is
+designed
+to
+not
+disturb
+already
+deployed
+systems
+running
+on
+JSON,
+but
+provide
+a
+smooth
+upgrade
+path
+from
+JSON
+to
+JSON-LD
+with
+added
+semantics.
+Finally,
+the
+format
+is
+intended
+to
+be
+easy
+to
+parse,
+efficient
+to
+generate,
+and
+only
+requires
+a
+very
+small
+memory
+footprint
+in
+order
+to
+operate.
+</p>
+<div id="how-to-read-this-document" class="section">
+<h3>
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</h3>
+<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
+way
+that
+is
+cross-language
+compatible
+via
+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" rel="biblioentry" 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" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+].
+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" rel="biblioentry" href="#bib-ECMA-262">
+ECMA-262
+</a>
+</cite>
+]
+and
+WebIDL
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-WEBIDL">
+WEBIDL
+</a>
+</cite>
+].
+</p>
+<p>
+JSON
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+]
+defines
+several
+terms
+which
+are
+used
+throughout
+this
+document:
+</p>
+<dl>
+<dt>
+<dfn title="json_object" id="dfn-json_object">
+JSON
+<del class="diff-old">Object
+</del>
+<ins class="diff-chg">object
+</ins>
+</dfn>
+</dt>
+<dd>
+An
+object
+structure
+is
+represented
+as
+a
+pair
+of
+curly
+brackets
+surrounding
+zero
+or
+more
+name/value
+pairs
+(or
+members).
+A
+name
+is
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>.
+A
+single
+colon
+comes
+after
+each
+name,
+separating
+the
+name
+from
+the
+value.
+A
+single
+comma
+separates
+a
+value
+from
+a
+following
+name.
+The
+names
+within
+an
+object
+<em class="rfc2119" title="should">
+should
+</em>
+be
+unique.
+</dd>
+<dt>
+<dfn title="array" id="dfn-array">
+array
+</dfn>
+</dt>
+<dd>
+An
+array
+is
+an
+ordered
+collection
+of
+values.
+An
+array
+structure
+is
+represented
+as
+square
+brackets
+surrounding
+zero
+or
+more
+values
+(or
+elements).
+Elements
+are
+separated
+by
+commas.
+Within
+JSON-LD,
+array
+order
+is
+not
+preserved
+by
+default,
+unless
+specific
+markup
+is
+provided
+(see
+<a href="#sets-and-lists">
+<ins class="diff-chg">Sets
+and
+</ins>
+Lists
+</a>
+).
+This
+is
+because
+the
+basic
+data
+model
+of
+JSON-LD
+is
+a
+<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
+linked
+data
+graph
+</a>,
+which
+is
+inherently
+unordered.
+</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.
+A
+character
+is
+represented
+as
+a
+single
+character
+string.
+</dd>
+<dt>
+<dfn title="number" id="dfn-number">
+number
+</dfn>
+</dt>
+<dd>
+A
+number
+is
+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>
+<del class="diff-old">The
+use
+</del>
+<ins class="diff-chg">Unless
+otherwise
+specified,
+a
+JSON-LD
+processor
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+act
+as
+if
+a
+key-value
+pair
+in
+the
+body
+</ins>
+of
+<ins class="diff-new">a
+JSON-LD
+document
+was
+never
+declared
+when
+</ins>
+the
+<ins class="diff-new">value
+equals
+</ins><em><ins class="diff-new">
+null
+</ins></em>.<ins class="diff-new">
+If
+</ins><code><ins class="diff-new">
+@value
+</ins></code>,<code><ins class="diff-new">
+@list
+</ins></code>,<ins class="diff-new">
+or
+</ins><code><ins class="diff-new">
+@set
+</ins></code><ins class="diff-new">
+is
+set
+to
+</ins>
+<em>
+null
+</em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">in
+expanded
+form,
+then
+the
+entire
+JSON
+object
+</ins>
+is
+<del class="diff-old">undefined
+</del>
+<ins class="diff-chg">ignored.
+If
+</ins><code><ins class="diff-chg">
+@context
+</ins></code><ins class="diff-chg">
+is
+set
+to
+</ins><em><ins class="diff-chg">
+null
+</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">
+is
+reset
+and
+when
+used
+</ins>
+within
+<del class="diff-old">JSON-LD.
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="context" href="#dfn-context"><ins class="diff-chg">
+context
+</ins></a>,<ins class="diff-chg">
+it
+removes
+any
+definition
+associated
+with
+the
+key,
+unless
+otherwise
+specified.
+</ins></dd><dt><dfn title="subject_definition" id="dfn-subject_definition"><ins class="diff-chg">
+subject
+definition
+</ins></dfn></dt><dd><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">
+used
+to
+represent
+a
+</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
+subject
+</ins></a><ins class="diff-chg">
+and
+one
+or
+more
+properties
+of
+that
+subject.
+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
+a
+subject
+definition
+if
+it
+does
+not
+contain
+they
+keys
+</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">
+and
+it
+has
+one
+or
+more
+keys
+other
+than
+</ins><code><ins class="diff-chg">
+@id
+</ins></code>.</dd><dt><dfn title="subject_reference" id="dfn-subject_reference"><ins class="diff-chg">
+subject
+reference
+</ins></dfn></dt><dd><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">
+used
+to
+reference
+a
+subject
+having
+only
+the
+</ins><code><ins class="diff-chg">
+@id
+</ins></code><ins class="diff-chg">
+key.
+</ins>
+</dd>
+</dl>
+<p>
+</p>
+</div>
+<div id="syntax-tokens-and-keywords" class="section">
+<h3>
+<span class="secno">
+1.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
+using
+in
+all
+algorithms
+described
+in
+this
+section:
+</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">
+term
+</a>
+s
+and
+help
+developers
+<ins class="diff-new">to
+</ins>
+express
+specific
+identifiers
+in
+a
+compact
+manner.
+The
+<code>
+@context
+</code>
+keyword
+is
+described
+in
+detail
+in
+the
+section
+titled
+<a href="#the-context">
+The
+Context
+</a>.
+</dd>
+<dt>
+<code>
+<ins class="diff-new">@graph
+</ins></code></dt><dd><ins class="diff-new">
+Used
+to
+explicitly
+express
+a
+</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-new">
+linked
+data
+graph
+</ins></a>.</dd><dt><code>
+@id
+</code>
+</dt>
+<dd>
+Used
+to
+uniquely
+identify
+things
+that
+are
+being
+described
+in
+the
+document.
+This
+keyword
+is
+described
+in
+the
+section
+titled
+<a href="#identifying-the-subject">
+Identifying
+the
+Subject
+</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
+the
+sections
+titled
+<a href="#string-internationalization">
+String
+Internationalization
+</a>
+and
+<a href="#typed-values">
+Typed
+Values
+</a>.
+</dd>
+<dt>
+<code>
+@language
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+the
+native
+language
+for
+a
+particular
+<del class="diff-old">value.
+</del>
+<ins class="diff-chg">value
+or
+the
+default
+language
+of
+a
+JSON-LD
+document.
+</ins>
+This
+keyword
+is
+described
+in
+the
+section
+titled
+<a href="#string-internationalization">
+String
+Internationalization
+</a>.
+</dd>
+<dt>
+<code>
+@type
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+data
+type
+of
+a
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</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">
+Typed
+Values
+</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">
+<ins class="diff-chg">Sets
+and
+</ins>
+Lists
+</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">
+<ins class="diff-chg">Sets
+and
+Lists
+</ins></a>.</dd><dt><code><ins class="diff-chg">
+@set
+</ins></code></dt><dd><ins class="diff-chg">
+Used
+to
+express
+an
+unordered
+set
+of
+data.
+This
+keyword
+is
+described
+in
+the
+section
+titled
+</ins><a href="#sets-and-lists"><ins class="diff-chg">
+Sets
+and
+</ins>
+Lists
+</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>
+</div>
+<div id="contributing" class="section">
+<h3>
+<span class="secno">
+1.3
+</span>
+Contributing
+</h3>
+<p>
+There
+are
+a
+number
+of
+ways
+that
+one
+may
+participate
+in
+the
+development
+of
+this
+specification:
+</p>
+<ul>
+<li>
+Technical
+discussion
+typically
+occurs
+on
+the
+public
+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
+teleconferences
+</a>
+are
+held
+every
+week
+on
+Tuesdays
+at
+1500
+UTC.
+</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>.
+</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>
+</div>
+</div>
+<div class="informative section" id="design-goals-and-rationale">
+<h2>
+<span class="secno">
+2.
+</span>
+Design
+<ins class="diff-new">Goals
+and
+Rationale
+</ins>
+</h2>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+<del class="diff-old">The
+following
+section
+outlines
+the
+design
+goals
+and
+rationale
+behind
+the
+JSON-LD
+markup
+language.
+2.1
+Goals
+and
+Rationale
+</del>
+A
+number
+of
+design
+considerations
+were
+explored
+during
+the
+creation
+of
+this
+markup
+language:
+</p>
+<dl>
+<dt>
+Simplicity
+</dt>
+<dd>
+Developers
+need
+only
+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.
+No
+extra
+processors
+or
+software
+libraries
+are
+necessary
+to
+use
+JSON-LD
+in
+its
+most
+basic
+form.
+The
+language
+attempts
+to
+ensure
+that
+developers
+have
+an
+easy
+learning
+curve.
+</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
+<del class="diff-old">simply
+</del>
+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
+provides
+a
+mechanism
+that
+allows
+developers
+to
+specify
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+in
+a
+way
+that
+is
+out-of-band.
+This
+allows
+organizations
+that
+have
+already
+deployed
+large
+JSON-based
+infrastructure
+to
+add
+meaning
+to
+their
+JSON
+documents
+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
+esoteric
+markup,
+we
+chose
+not
+to
+support
+the
+use
+case
+and
+support
+a
+simplified
+syntax
+instead.
+So,
+while
+Zero
+Edits
+is
+a
+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>
+</dl>
+</div>
+<div id="basic-concepts" class="section">
+<h2>
+<span class="secno">
+<ins class="diff-new">3.
+</ins></span><ins class="diff-new">
+Basic
+Concepts
+</ins></h2><p><ins class="diff-new">
+JSON-LD
+is
+designed
+to
+ensure
+that
+</ins><a class="tref internalDFN" title="linked_data" href="#dfn-linked_data"><ins class="diff-new">
+Linked
+Data
+</ins></a><ins class="diff-new">
+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
+</ins><a class="tref internalDFN" title="context" href="#dfn-context"><ins class="diff-new">
+context
+</ins></a>.<ins class="diff-new">
+As
+more
+JSON-LD
+features
+are
+used,
+more
+semantics
+are
+added
+to
+the
+JSON
+markup.
+</ins></p>
+<div id="linking-data" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">2.2
+</del>
+<ins class="diff-chg">3.1
+</ins>
+</span>
+Linking
+Data
+</h3>
+<p>
+An
+Internationalized
+Resource
+Identifier
+(
+<dfn title="iri" id="dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</dfn>
+),
+as
+described
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC3987">
+RFC3987
+</a>
+</cite>
+],
+is
+a
+mechanism
+for
+representing
+unique
+identifiers
+on
+the
+<del class="diff-old">web.
+</del>
+<ins class="diff-chg">Web.
+</ins>
+In
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>,
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+is
+commonly
+used
+for
+expressing
+a
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>,
+a
+<a class="tref internalDFN" title="property" href="#dfn-property">
+property
+</a>
+or
+an
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>.
+</p>
+<p>
+JSON-LD
+defines
+a
+mechanism
+to
+map
+JSON
+terms,
+i.e.,
+keys
+and
+values,
+to
+IRIs.
+This
+does
+not
+mean
+that
+JSON-LD
+requires
+every
+key
+or
+value
+to
+be
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>,
+but
+rather
+ensures
+that
+keys
+and
+values
+can
+be
+mapped
+to
+IRIs
+if
+the
+developer
+desires
+to
+transform
+their
+data
+into
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>.
+There
+are
+a
+few
+techniques
+that
+can
+ensure
+that
+developers
+will
+generate
+good
+Linked
+Data
+for
+the
+Web.
+JSON-LD
+formalizes
+those
+techniques.
+</p>
+<p>
+We
+will
+be
+using
+the
+following
+JSON
+markup
+as
+the
+example
+for
+the
+rest
+of
+this
+section:
+</p>
+<del class="diff-old">{
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+</ins>
+}
+</pre>
+<div id="the-context" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">2.2.1
+</del>
+<ins class="diff-chg">3.1.1
+</ins>
+</span>
+The
+Context
+</h4>
+<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">
+term
+</a>
+s,
+i.e.,
+<del class="diff-old">keys
+</del>
+<ins class="diff-chg">properties
+</ins>
+with
+associated
+values
+in
+an
+JSON
+document,
+to
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+s.
+A
+<dfn title="term" id="dfn-term">
+term
+</dfn>
+is
+a
+short
+word
+that
+<del class="diff-old">may
+be
+expanded
+</del>
+<ins class="diff-chg">expands
+</ins>
+to
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+<del class="diff-old">A
+</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">must
+</del>
+<ins class="diff-chg">s
+</ins><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins>
+</em>
+<del class="diff-old">have
+the
+lexical
+form
+of
+NCName
+</del>
+<ins class="diff-chg">be
+defined
+as
+any
+valid
+JSON
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins>
+</a>
+<del class="diff-old">(see
+[
+XML-NAMES
+</del>
+<ins class="diff-chg">other
+than
+a
+JSON-LD
+</ins><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-chg">
+keyword
+</ins></a>.<ins class="diff-chg">
+To
+avoid
+forward-compatibility
+issues,
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins>
+</a>
+<del class="diff-old">]),
+compact
+IRI
+,
+absolute
+IRI
+,
+or
+be
+</del>
+<ins class="diff-chg">s
+starting
+with
+</ins>
+an
+<del class="diff-old">empty
+string.
+</del>
+<code>
+<ins class="diff-chg">@
+</ins></code><ins class="diff-chg">
+character
+</ins><em class="rfc2119" title="should not"><ins class="diff-chg">
+should
+not
+</ins></em><ins class="diff-chg">
+be
+used
+as
+they
+might
+be
+used
+as
+</ins><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-chg">
+keywords
+</ins></a><ins class="diff-chg">
+in
+future
+versions
+of
+JSON-LD.
+</ins>
+</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">
+term
+</a>
+s
+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">
+term
+</a>
+s
+to
+expand
+to
+IRIs
+so
+that
+developers
+don't
+accidentally
+step
+on
+each
+other's
+<dfn title="vocabulary" id="dfn-vocabulary">
+vocabulary
+</dfn>
+<ins class="diff-new">terms.
+Furthermore,
+developers,
+and
+machines,
+are
+able
+to
+use
+this
+</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">(by
+plugging
+it
+directly
+into
+a
+web
+browser,
+for
+instance)
+to
+go
+to
+the
+term
+and
+get
+a
+definition
+of
+what
+the
+term
+means.
+Much
+like
+we
+can
+use
+</ins><a href="http://wordnet.princeton.edu/"><ins class="diff-new">
+WordNet
+</ins></a><ins class="diff-new">
+today
+to
+see
+the
+definition
+of
+words
+in
+the
+English
+language.
+Developers
+and
+machines
+need
+the
+same
+sort
+of
+definition
+of
+</ins>
+terms.
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<ins class="diff-new">IRIs
+</ins></a><ins class="diff-new">
+provide
+a
+way
+to
+ensure
+that
+these
+terms
+are
+unambiguous.
+</ins>
+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
+name/value
+pairs
+while
+ensuring
+that
+the
+data
+is
+useful
+outside
+of
+the
+page,
+API
+or
+database
+in
+which
+it
+resides.
+The
+value
+of
+a
+term
+mapping
+<em class="rfc2119" title="must">
+must
+</em>
+be
+either;
+1)
+a
+simple
+string
+with
+the
+lexical
+form
+of
+an
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+<del class="diff-old">or,
+</del>
+<ins class="diff-chg">or
+</ins>
+2)
+<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">
+or
+3)
+</ins>
+an
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+containing
+an
+<code>
+@id
+</code>,
+<code>
+@type
+</code>,
+<code>
+@language
+</code>,
+or
+<code>
+@container
+</code>
+<del class="diff-old">keyword.
+</del>
+<ins class="diff-chg">keyword
+(all
+other
+keywords
+are
+ignored
+by
+a
+JSON-LD
+processor).
+</ins>
+</p>
+<p>
+These
+Linked
+Data
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+are
+typically
+collected
+in
+a
+context
+document
+that
+would
+look
+something
+like
+this:
+</p>
+<del class="diff-old">{
+  &quot;@context&quot;:
+  {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;depiction&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/depiction&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+    &quot;homepage&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+  }
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;depiction&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/depiction&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+    &quot;homepage&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+  }
+</ins>
+}
+</pre>
+<p>
+<del class="diff-old">This
+</del>
+<ins class="diff-chg">Assuming
+that
+this
+</ins>
+context
+document
+can
+<del class="diff-old">then
+</del>
+be
+<del class="diff-old">used
+in
+an
+</del>
+<ins class="diff-chg">retrieved
+at
+</ins><code><ins class="diff-chg">
+http://json-ld.org/contexts/person
+</ins></code>,<ins class="diff-chg">
+it
+can
+be
+referenced
+from
+a
+</ins>
+JSON-LD
+document
+by
+adding
+a
+single
+line.
+The
+JSON
+markup
+<del class="diff-old">as
+</del>
+shown
+in
+the
+previous
+section
+could
+be
+changed
+as
+<del class="diff-old">follows
+to
+link
+to
+the
+context
+document:
+</del>
+<ins class="diff-chg">follows:
+</ins>
+</p>
+<del class="diff-old">{
+
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+</del>
+<pre class="example">{
+  <span class="diff">&quot;@context&quot;: &quot;http://json-ld.org/contexts/person&quot;,</span>
+<ins class="diff-chg">  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+</ins>
+}
+</pre>
+<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
+information
+for
+certain
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+as
+well
+as
+other
+processing
+instructions
+for
+the
+JSON-LD
+processor.
+</p>
+<p>
+Contexts
+<em class="rfc2119" title="may">
+may
+</em>
+be
+specified
+in-line.
+This
+ensures
+that
+JSON-LD
+documents
+can
+be
+processed
+when
+a
+JSON-LD
+processor
+does
+not
+have
+access
+to
+the
+Web.
+</p>
+<del class="diff-old">{
+  &quot;@context&quot;:
+  {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;depiction&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/depiction&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+    &quot;homepage&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+  },
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+</del>
+<pre class="example">{
+  <span class="diff">&quot;@context&quot;:
+<ins class="diff-chg">  {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;depiction&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/depiction&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+    &quot;homepage&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+  },</span>
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+</ins>
+}
+</pre>
+<p>
+Contexts
+<em class="rfc2119" title="may">
+may
+</em>
+be
+used
+at
+any
+time
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+is
+defined.
+A
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+<em class="rfc2119" title="may">
+may
+</em>
+specify
+multiple
+contexts,
+using
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>,
+which
+is
+processed
+in
+<del class="diff-old">array-order.
+</del>
+<ins class="diff-chg">order.
+</ins>
+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">
+term
+</a>
+s
+<em class="rfc2119" title="must">
+must
+</em>
+be
+overridden
+using
+a
+last-defined-overrides
+mechanism.
+</p>
+<p class="note">
+<ins class="diff-new">If
+a
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a><ins class="diff-new">
+is
+re-defined
+within
+a
+context,
+all
+previous
+rules
+associated
+with
+the
+previous
+definition
+are
+removed.
+A
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a><ins class="diff-new">
+defined
+in
+a
+previous
+context
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+removed,
+if
+it
+is
+re-defined
+to
+</ins><code><ins class="diff-new">
+null
+</ins></code>.</p>
+<p>
+The
+set
+of
+contexts
+defined
+within
+a
+specific
+<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>
+are
+referred
+to
+as
+<dfn title="local_context" id="dfn-local_context">
+local
+context
+</dfn>
+s.
+<ins class="diff-new">Setting
+the
+context
+to
+</ins><code><ins class="diff-new">
+null
+</ins></code><ins class="diff-new">
+effectively
+sets
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-new">
+local
+context
+</ins></a><ins class="diff-new">
+to
+it's
+initial
+state.
+</ins>
+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
+context
+</a>
+s
+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">{
+  &quot;@context&quot;: [
+    &quot;http://json-ld.org/contexts/person&quot;,
+    {
+      &quot;pic&quot;: &quot;http://xmlns.com/foaf/0.1/depiction&quot;
+    }
+  ],
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+
+</del>
+<pre class="example">{
+  <span class="diff">&quot;@context&quot;: [
+<ins class="diff-chg">    &quot;http://json-ld.org/contexts/person&quot;,
+    {
+      &quot;pic&quot;: &quot;http://xmlns.com/foaf/0.1/depiction&quot;
+    }
+  ],</span>
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+</ins>  <span class="diff">&quot;pic&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;</span>
+}
+</pre>
+<del class="diff-old">JSON-LD
+uses
+a
+special
+type
+of
+machine-readable
+document
+called
+a
+vocabulary
+to
+define
+term
+s
+that
+are
+then
+used
+to
+describe
+concepts
+and
+&quot;things&quot;
+in
+the
+world.
+Typically,
+these
+vocabulary
+documents
+have
+prefix
+es
+associated
+with
+them
+and
+contain
+a
+number
+of
+term
+declarations.
+Prefix
+es
+are
+helpful
+when
+a
+developer
+wants
+to
+mix
+multiple
+vocabularies
+together
+in
+a
+context
+,
+but
+does
+not
+want
+to
+go
+to
+the
+trouble
+of
+defining
+every
+single
+term
+in
+every
+single
+vocabulary.
+Some
+vocabularies
+may
+have
+dozens
+of
+terms
+defined.
+If
+a
+developer
+wants
+to
+use
+3-4
+different
+vocabularies
+,
+the
+number
+of
+terms
+that
+would
+have
+to
+be
+declared
+in
+a
+single
+context
+could
+become
+quite
+large.
+To
+reduce
+the
+number
+of
+different
+terms
+that
+must
+be
+defined,
+JSON-LD
+also
+allows
+prefixes
+to
+be
+used
+to
+compact
+IRIs
+.
+For
+example,
+the
+IRI
+http://xmlns.com/foaf/0.1/
+specifies
+a
+vocabulary
+which
+may
+be
+represented
+using
+the
+foaf
+prefix
+.
+The
+foaf
+vocabulary
+contains
+a
+term
+called
+name
+.
+If
+you
+join
+the
+foaf
+prefix
+with
+the
+name
+suffix,
+you
+can
+build
+a
+compact
+IRI
+that
+will
+expand
+out
+into
+an
+absolute
+IRI
+for
+the
+http://xmlns.com/foaf/0.1/name
+vocabulary
+term.
+That
+is,
+the
+compact
+IRI
+(or
+short-form),
+is
+foaf:name
+and
+the
+expanded-form
+is
+http://xmlns.com/foaf/0.1/name
+.
+This
+vocabulary
+term
+is
+used
+to
+specify
+a
+person's
+name.
+Developers,
+and
+machines,
+are
+able
+to
+use
+this
+IRI
+(by
+plugging
+it
+directly
+into
+a
+web
+browser,
+for
+instance)
+to
+go
+to
+the
+term
+and
+get
+a
+definition
+of
+what
+the
+term
+means.
+Much
+like
+we
+can
+use
+WordNet
+today
+to
+see
+the
+definition
+of
+words
+in
+the
+English
+language.
+Developers
+and
+machines
+need
+the
+same
+sort
+of
+definition
+of
+terms.
+IRIs
+provide
+a
+way
+to
+ensure
+that
+these
+terms
+are
+unambiguous.
+The
+context
+provides
+a
+collection
+of
+vocabulary
+term
+s
+that
+can
+be
+used
+to
+expand
+JSON
+keys
+and
+values
+into
+IRIs
+.
+</del>
+<p class="note">
+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
+one-pass
+processors.
+</p>
+</div>
+<div id="from-json-to-json-ld" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">2.2.2
+</del>
+<ins class="diff-chg">3.1.2
+</ins>
+</span>
+From
+JSON
+to
+JSON-LD
+</h4>
+<p>
+If
+a
+set
+of
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+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
+JSON
+objects,
+machines
+are
+able
+to
+automatically
+expand
+the
+terms
+to
+something
+meaningful
+and
+unambiguous,
+like
+this:
+</p>
+<del class="diff-old">{
+  &quot;&quot;: &quot;Manu Sporny&quot;,
+  &quot;&quot;: &quot;http://manu.sporny.org&quot;
+  &quot;&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;<span class="diff">http://xmlns.com/foaf/0.1/name</span>&quot;: &quot;Manu Sporny&quot;,
+  &quot;<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>&quot;: &quot;http://manu.sporny.org&quot;
+  &quot;<span class="diff">http://xmlns.com/foaf/0.1/depiction</span>&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+</ins>
+}
+</pre>
+<p>
+Doing
+this
+allows
+JSON
+to
+be
+unambiguously
+machine-readable
+without
+requiring
+developers
+to
+drastically
+change
+their
+workflow.
+</p>
+<p class="note">
+The
+example
+above
+does
+not
+use
+the
+<code>
+@id
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+to
+set
+the
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>
+of
+the
+node
+being
+described
+above.
+This
+type
+of
+node
+is
+called
+an
+<dfn title="unlabeled_node" id="dfn-unlabeled_node">
+unlabeled
+node
+</dfn>
+and
+is
+considered
+to
+be
+a
+weaker
+form
+of
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>.
+It
+is
+advised
+that
+all
+nodes
+described
+in
+JSON-LD
+are
+given
+unique
+identifiers
+via
+the
+<code>
+@id
+</code>
+keyword
+unless
+the
+data
+is
+not
+intended
+to
+be
+linked
+to
+from
+other
+data
+sets.
+</p>
+<del class="diff-old">3.
+Basic
+Concepts
+</del>
+<p>
+<del class="diff-old">JSON-LD
+is
+designed
+to
+ensure
+that
+Linked
+Data
+</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">concepts
+can
+be
+marked
+up
+in
+a
+way
+that
+is
+simple
+</del>
+<ins class="diff-chg">used
+</ins>
+to
+<del class="diff-old">understand
+and
+create
+by
+Web
+authors.
+In
+many
+cases,
+regular
+JSON
+markup
+can
+become
+Linked
+Data
+with
+the
+simple
+addition
+of
+</del>
+<ins class="diff-chg">define
+property
+values
+is
+called
+</ins>
+a
+<del class="diff-old">context
+</del>
+<a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">
+<ins class="diff-chg">subject
+definition
+</ins>
+</a>.
+<del class="diff-old">As
+more
+JSON-LD
+features
+are
+used,
+more
+semantics
+</del>
+<a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">
+<ins class="diff-chg">Subject
+definitions
+</ins></a><ins class="diff-chg">
+do
+not
+require
+a
+</ins><code><ins class="diff-chg">
+@id
+</ins></code>,<ins class="diff-chg">
+in
+which
+case
+they
+</ins>
+are
+<del class="diff-old">added
+</del>
+<ins class="diff-chg">considered
+</ins>
+to
+<del class="diff-old">the
+JSON
+markup.
+</del>
+<ins class="diff-chg">be
+an
+</ins><a class="tref internalDFN" title="unlabeled_node" href="#dfn-unlabeled_node"><ins class="diff-chg">
+unlabeled
+node
+</ins></a>.
+</p>
+</div>
+</div>
+<div id="iris" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">3.1
+</del>
+<ins class="diff-chg">3.2
+</ins>
+</span>
+IRIs
+</h3>
+<p>
+Expressing
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+s
+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="subject" href="#dfn-subject">
+subject
+</a>
+s,
+all
+<a class="tref internalDFN" title="property" href="#dfn-property">
+properties
+</a>
+and
+many
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+s
+are
+identified.
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+s
+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">
+term
+</a>
+s
+in
+the
+key
+position
+in
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+that
+have
+a
+mapping
+to
+an
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+or
+another
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+are
+expanded
+to
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+by
+JSON-LD
+processors.
+</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>,
+a
+<a class="tref internalDFN" title="relative_iri" href="#dfn-relative_iri">
+relative
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+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>.
+</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" rel="biblioentry" 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
+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.
+</p>
+<p>
+IRIs
+can
+be
+expressed
+directly
+in
+the
+key
+position
+like
+so:
+</p>
+<del class="diff-old">{
+...
+  &quot;&quot;: &quot;Manu Sporny&quot;,
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">...
+  &quot;<span class="diff">http://xmlns.com/foaf/0.1/name</span>&quot;: &quot;Manu Sporny&quot;,
+...
+</ins>
+}
+</pre>
+<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>,
+as
+opposed
+to
+being
+interpreted
+as
+a
+string.
+</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">{
+  &quot;&quot;:
+  {
+    &quot;&quot;
+...
+  },
+  &quot;&quot;: &quot;Manu Sporny&quot;,
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;<span class="diff">@context</span>&quot;:
+  {
+    &quot;<span class="diff">name</span>&quot;: &quot;<span class="diff">http://xmlns.com/foaf/0.1/name</span>&quot;
+...
+  },
+  &quot;<span class="diff">name</span>&quot;: &quot;Manu Sporny&quot;,
+...
+</ins>
+}
+</pre>
+<p>
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+Prefix
+</a>
+es
+are
+expanded
+when
+the
+form
+of
+the
+value
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+represented
+as
+is
+<code>
+prefix:suffix
+</code>,
+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">{
+  &quot;&quot;:
+  {
+    &quot;&quot;
+...
+  },
+  &quot;&quot;: &quot;Manu Sporny&quot;,
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;<span class="diff">@context</span>&quot;:
+  {
+    &quot;<span class="diff">foaf</span>&quot;: &quot;<span class="diff">http://xmlns.com/foaf/0.1/</span>&quot;
+...
+  },
+  &quot;<span class="diff">foaf:name</span>&quot;: &quot;Manu Sporny&quot;,
+...
+</ins>
+}
+</pre>
+<p>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+Term
+</a>
+s
+are
+case
+sensitive,
+and
+<em class="rfc2119" title="must">
+must
+</em>
+be
+matched
+using
+a
+case-sensitive
+comparison.
+</p>
+<p>
+Keys
+that
+do
+not
+expand
+to
+an
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+are
+ignored.
+</p>
+<del class="diff-old">It
+is
+not
+determined
+if
+processing
+proceeds
+into
+values
+of
+undefined
+keys.
+If
+so,
+this
+would
+result
+in
+a
+graph
+which
+is
+not
+embedded
+.
+</del>
+<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">
+Compact
+IRIs
+</a>
+for
+more
+details.
+</p>
+<p>
+An
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+is
+generated
+when
+a
+value
+is
+associated
+with
+a
+key
+using
+the
+<code>
+@id
+</code>
+keyword:
+</p>
+<del class="diff-old">{
+...
+  &quot;homepage&quot;: { &quot;&quot;: &quot;http://manu.sporny.org&quot; }
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">...
+  &quot;homepage&quot;: { &quot;<span class="diff">@id</span>&quot;: &quot;http://manu.sporny.org&quot; }
+...
+</ins>
+}
+</pre>
+<p class="note">
+Specifying
+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>
+with
+an
+<code>
+@id
+</code>
+key
+is
+used
+to
+identify
+that
+object
+using
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+This
+facility
+<em class="rfc2119" title="may">
+may
+</em>
+also
+be
+used
+to
+link
+a
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>
+with
+an
+<a class="tref internalDFN" title="object" href="#dfn-object">
+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">
+Embedding
+</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>
+<del class="diff-old">
+  &quot;@context&quot;:
+  {
+    ...
+    &quot;homepage&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+    ...
+  }
+...
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+...
+</del>
+<pre class="example">{<span class="diff">
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+    ...
+    &quot;homepage&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+    ...
+  }</span>
+...
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+...
+</ins>
+}
+</pre>
+<p>
+Even
+though
+the
+value
+<code>
+http://manu.sporny.org/
+</code>
+is
+a
+<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
+processed
+by
+a
+JSON-LD
+Processor.
+</p>
+</div>
+<div id="identifying-the-subject" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">3.2
+</del>
+<ins class="diff-chg">3.3
+</ins>
+</span>
+Identifying
+the
+Subject
+</h3>
+<p>
+To
+be
+able
+to
+externally
+reference
+nodes,
+it
+is
+important
+that
+each
+node
+has
+an
+unambiguous
+identifier.
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+s
+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.
+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>
+A
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>
+of
+an
+object
+in
+JSON
+is
+declared
+using
+the
+<code>
+@id
+</code>
+key.
+The
+subject
+is
+the
+first
+piece
+of
+information
+needed
+by
+the
+JSON-LD
+processor
+in
+order
+to
+create
+the
+(subject,
+property,
+object)
+tuple,
+also
+known
+as
+a
+triple.
+</p>
+<del class="diff-old">{
+...
+  &quot;&quot;,
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">...
+  &quot;<span class="diff">@id</span>&quot;: &quot;<span class="diff">http://example.org/people#joebob</span>&quot;,
+...
+</ins>
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+subject
+to
+the
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<code>
+http://example.org/people#joebob
+</code>.
+</p>
+<p>
+<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
+is
+called
+a
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-new">
+subject
+definition
+</ins></a>.<a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-new">
+Subject
+definitions
+</ins></a><ins class="diff-new">
+do
+not
+require
+a
+</ins><code><ins class="diff-new">
+@id
+</ins></code>,<ins class="diff-new">
+in
+which
+case
+they
+are
+considered
+to
+be
+an
+</ins><a class="tref internalDFN" title="unlabeled_node" href="#dfn-unlabeled_node"><ins class="diff-new">
+unlabeled
+node
+</ins></a>.</p>
+<p class="note">
+To
+ensure
+the
+best
+possible
+performance,
+it
+is
+a
+best
+practice
+to
+put
+the
+<code>
+@id
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+before
+other
+key-value
+pairs
+in
+an
+object.
+If
+it
+isn't
+listed
+first,
+processors
+have
+to
+save
+each
+key-value
+pair
+until
+<code>
+@id
+</code>
+is
+processed
+before
+they
+can
+start
+generating
+triples.
+Not
+specifying
+the
+<code>
+@id
+</code>
+keyword
+first
+creates
+a
+memory
+and
+complexity
+burden
+for
+one-pass
+processors.
+</p>
+</div>
+<div id="specifying-the-type" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">3.3
+</del>
+<ins class="diff-chg">3.4
+</ins>
+</span>
+Specifying
+the
+Type
+</h3>
+<p>
+The
+type
+of
+a
+particular
+subject
+can
+be
+specified
+using
+the
+<code>
+@type
+</code>
+<del class="diff-old">keyword.
+</del>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+<ins class="diff-chg">keyword
+</ins></a>.
+Specifying
+the
+type
+in
+this
+way
+will
+generate
+a
+triple
+of
+the
+form
+(subject,
+type,
+type-
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+).
+To
+be
+considered
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>,
+types
+<em class="rfc2119" title="must">
+must
+</em>
+be
+uniquely
+identified
+by
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+</p>
+<del class="diff-old">{
+...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;&quot;,
+...
+}
+3.4
+Strings
+Regular
+text
+strings,
+also
+referred
+to
+as
+string
+value
+s,
+are
+easily
+expressed
+using
+regular
+JSON
+string
+s.
+{
+...
+  &quot;name&quot;: &quot;&quot;,
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;<span class="diff">@type</span>&quot;: &quot;<span class="diff">http://xmlns.com/foaf/0.1/Person</span>&quot;,
+...
+</ins>
+}
+</pre>
+</div>
+<div id="string-internationalization" class="section">
+<h3>
+<span class="secno">
+3.5
+</span>
+String
+Internationalization
+</h3>
+<p>
+<del class="diff-old">JSON-LD
+makes
+an
+assumption
+that
+strings
+</del>
+<ins class="diff-chg">In
+different
+scenarios
+it
+is
+important
+to
+annotate
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a>
+with
+<del class="diff-old">associated
+language
+encoding
+information
+are
+not
+very
+common
+when
+used
+</del>
+<ins class="diff-chg">its
+language.
+In
+JSON-LD
+this
+is
+possible
+</ins>
+in
+<del class="diff-old">JavaScript
+and
+Web
+Services.
+Thus,
+it
+takes
+</del>
+a
+<del class="diff-old">little
+more
+effort
+</del>
+<ins class="diff-chg">variety
+of
+ways.
+Firstly,
+it
+is
+possible
+</ins>
+to
+<del class="diff-old">express
+strings
+with
+associated
+</del>
+<ins class="diff-chg">define
+a
+default
+</ins>
+language
+<del class="diff-old">information.
+</del>
+<ins class="diff-chg">for
+a
+JSON-LD
+document
+by
+setting
+the
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+key
+in
+the
+</ins><code><ins class="diff-chg">
+@context
+</ins></code><ins class="diff-chg">
+or
+in
+a
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+definition:
+</ins>
+</p>
+<del class="diff-old">{
+...
+  &quot;name&quot;:
+  {
+    &quot;@value&quot;: &quot;花澄&quot;,
+    &quot;@language&quot;: &quot;ja&quot;
+  }
+...
+</del>
+<pre class="example">{
+  <span class="diff">&quot;@context&quot;:
+<ins class="diff-chg">  {
+    ...
+    &quot;@language&quot;: &quot;ja&quot;
+  },</span>
+  &quot;name&quot;: <span class="diff">&quot;花澄&quot;</span>,
+  &quot;occupation&quot;: <span class="diff">&quot;科学者&quot;</span>
+</ins>
+}
+</pre>
+<p>
+The
+example
+above
+would
+<del class="diff-old">generate
+a
+string
+value
+for
+花澄
+and
+</del>
+associate
+the
+<code>
+ja
+</code>
+language
+code
+with
+the
+<del class="diff-old">triple
+that
+is
+generated.
+</del>
+<ins class="diff-chg">two
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a><ins class="diff-chg">
+s
+</ins><em><ins class="diff-chg">
+花澄
+</ins></em><ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+科学者
+</ins></em>.
+Languages
+<em class="rfc2119" title="must">
+must
+</em>
+be
+expressed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+]
+format.
+</p>
+<del class="diff-old">3.6
+Typed
+Values
+</del>
+<p>
+<del class="diff-old">A
+value
+with
+an
+associated
+type,
+also
+known
+as
+a
+typed
+value
+,
+</del>
+<ins class="diff-chg">It
+</ins>
+is
+<del class="diff-old">indicated
+by
+associating
+a
+value
+with
+an
+IRI
+which
+indicates
+the
+value's
+type.
+Typed
+values
+may
+be
+expressed
+in
+JSON-LD
+in
+three
+ways:
+By
+utilizing
+</del>
+<ins class="diff-chg">possible
+to
+override
+</ins>
+the
+<del class="diff-old">@type
+keyword
+when
+defining
+a
+term
+within
+a
+@context
+section.
+By
+utilizing
+</del>
+<ins class="diff-chg">default
+language
+by
+using
+</ins>
+the
+expanded
+form
+<del class="diff-old">for
+specifying
+objects.
+By
+using
+a
+native
+JSON
+type.
+The
+first
+example
+uses
+the
+@type
+keyword
+to
+express
+</del>
+<ins class="diff-chg">of
+</ins>
+a
+<del class="diff-old">typed
+</del>
+value:
+</p>
+<del class="diff-old">{
+  &quot;@context&quot;:
+  {
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+    &quot;modified&quot;:
+    {
+      &quot;@id&quot;: &quot;http://purl.org/dc/terms/modified&quot;,
+      &quot;@type&quot;: &quot;xsd:dateTime&quot;
+    }
+  }
+...
+  &quot;modified&quot;: &quot;2010-05-29T14:17:39+02:00&quot;,
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;: {
+    ...
+    &quot;@language&quot;: &quot;ja&quot;
+  },
+  &quot;name&quot;: &quot;花澄&quot;,
+  &quot;occupation&quot;: <span class="diff">{
+    &quot;@value&quot;: &quot;Scientist&quot;,
+    &quot;@language&quot;: &quot;en&quot;
+  }</span>
+</ins>
+}
+</pre>
+<p>
+<del class="diff-old">The
+second
+example
+uses
+</del>
+<ins class="diff-chg">It
+is
+also
+possible
+to
+override
+the
+default
+language
+or
+specify
+a
+plain
+value
+by
+omitting
+the
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+tag
+or
+setting
+it
+to
+</ins><code><ins class="diff-chg">
+null
+</ins></code><ins class="diff-chg">
+when
+expressing
+</ins>
+the
+expanded
+<del class="diff-old">form
+for
+specifying
+objects:
+</del>
+<ins class="diff-chg">value:
+</ins>
+</p>
+<del class="diff-old">{
+...
+  &quot;modified&quot;:
+  {
+    &quot;@value&quot;: &quot;2010-05-29T14:17:39+02:00&quot;,
+    &quot;@type&quot;: &quot;xsd:dateTime&quot;
+  }
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;: {
+    ...
+    &quot;@language&quot;: &quot;ja&quot;
+  },
+  &quot;name&quot;: <span class="diff">{
+    &quot;@value&quot;: &quot;花澄&quot;
+  },</span>
+  &quot;occupation&quot;: <span class="diff"> {
+    &quot;@value&quot;: &quot;Ninja&quot;,
+    &quot;@language&quot;: &quot;en&quot;
+  }</span>,
+  &quot;speciality&quot;: &quot;手裏剣&quot;
+</ins>
+}
+</pre>
+<del class="diff-old">Both
+examples
+above
+would
+generate
+an
+object
+with
+the
+</del>
+<p class="note">
+<ins class="diff-chg">Please
+note
+that
+language
+associations
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+only
+be
+applied
+to
+plain
+literal
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a><ins class="diff-chg">
+s.
+That
+is,
+</ins><a class="tref internalDFN" title="typed_value" href="#dfn-typed_value"><ins class="diff-chg">
+typed
+</ins>
+value
+<del class="diff-old">of
+2010-05-29T14:17:39+02:00
+and
+the
+</del>
+</a>
+<ins class="diff-chg">s
+or
+values
+that
+are
+subject
+to
+</ins><a href="#type-coercion">
+type
+<del class="diff-old">of
+http://www.w3.org/2001/XMLSchema#dateTime
+.
+</del>
+<ins class="diff-chg">coercion
+</ins></a><ins class="diff-chg">
+won't
+be
+language
+tagged.
+</ins>
+</p>
+<p>
+<del class="diff-old">The
+third
+example
+uses
+a
+built-in
+native
+JSON
+type,
+</del>
+<ins class="diff-chg">To
+clear
+the
+default
+language
+for
+</ins>
+a
+<del class="diff-old">number
+,
+</del>
+<ins class="diff-chg">subtree,
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+can
+be
+set
+</ins>
+to
+<del class="diff-old">express
+a
+type:
+{
+...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;age&quot;:
+...
+}
+The
+example
+above
+is
+really
+just
+</del>
+<code>
+<ins class="diff-chg">null
+</ins></code><ins class="diff-chg">
+in
+</ins>
+a
+<del class="diff-old">shorthand
+for
+the
+following:
+</del>
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+<ins class="diff-chg">local
+context
+</ins></a><ins class="diff-chg">
+as
+follows:
+</ins>
+</p>
+<del class="diff-old">{
+...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;age&quot;:
+  {
+    &quot;@value&quot;: &quot;31&quot;,
+    &quot;@type&quot;: &quot;http://www.w3.org/2001/XMLSchema#integer&quot;
+  }
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;: {
+    ...
+    &quot;@language&quot;: &quot;ja&quot;
+  },
+  &quot;name&quot;: &quot;花澄&quot;,
+  &quot;details&quot;: {
+</ins><span class="diff">    &quot;@context&quot;: {<ins class="diff-chg">
+      &quot;@language&quot;: null
+    },</span>
+    &quot;occupation&quot;: &quot;Ninja&quot;
+  }
+</ins>
+}
+</pre>
+<p class="note">
+<del class="diff-old">The
+@type
+keyword
+is
+also
+used
+</del>
+<ins class="diff-chg">JSON-LD
+allows
+</ins>
+to
+associate
+<del class="diff-old">a
+type
+</del>
+<ins class="diff-chg">language
+information
+</ins>
+with
+<del class="diff-old">a
+subject
+.
+Although
+the
+same
+keyword
+is
+used
+in
+both
+places,
+the
+concept
+of
+an
+object
+type
+and
+a
+value
+type
+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.
+</del>
+<ins class="diff-chg">terms.
+See
+</ins><a href="#expanded-term-definition"><ins class="diff-chg">
+Expanded
+Term
+Definition
+</ins></a><ins class="diff-chg">
+for
+more
+details.
+</ins>
+</p>
+</div>
+<div id="sets-and-lists" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">3.7
+</del>
+<ins class="diff-chg">3.6
+</ins>
+</span>
+<del class="diff-old">Multiple
+Objects
+for
+a
+Single
+Property
+</del>
+<ins class="diff-chg">Sets
+and
+Lists
+</ins>
+</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">
+array
+</a>
+s.
+<del class="diff-old">If
+a
+subject
+has
+multiple
+values
+for
+the
+same
+property,
+the
+author
+may
+express
+each
+property
+as
+an
+array
+.
+In
+JSON-LD,
+multiple
+objects
+on
+a
+property
+are
+not
+ordered.
+This
+is
+</del>
+<ins class="diff-chg">But,
+</ins>
+because
+graphs
+<del class="diff-old">are
+inherently
+unordered
+data
+structures.
+To
+learn
+more
+about
+creating
+ordered
+collections
+in
+JSON-LD,
+see
+the
+section
+on
+Lists
+.
+{
+...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;nick&quot;: ,
+...
+}
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+&lt;http://example.org/people#joebob&gt;
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      &quot;joe&quot; .
+&lt;http://example.org/people#joebob&gt;
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      &quot;bob&quot; .
+&lt;http://example.org/people#joebob&gt;
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+&quot;jaybee&quot;
+.
+3.8
+Multiple
+Values
+for
+a
+Single
+Property
+Multiple
+value
+s
+may
+also
+be
+expressed
+using
+the
+expanded
+form
+for
+object
+s:
+{
+  &quot;@id&quot;: &quot;http://example.org/articles/8&quot;,
+  &quot;dc:title&quot;:
+  [
+    {
+      &quot;@value&quot;: &quot;Das Kapital&quot;,
+      &quot;@language&quot;: &quot;de&quot;
+    },
+    {
+      &quot;@value&quot;: &quot;Capital&quot;,
+      &quot;@language&quot;: &quot;en&quot;
+    }
+  ]
+}
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+&lt;http://example.org/articles/8&gt;
+   &lt;http://purl.org/dc/terms/title&gt;
+      &quot;Das Kapital&quot;@de .
+&lt;http://example.org/articles/8&gt;
+   &lt;http://purl.org/dc/terms/title&gt;
+&quot;Capital&quot;@en
+.
+3.9
+Lists
+Because
+graphs
+</del>
+do
+not
+describe
+ordering
+for
+links
+between
+nodes,
+in
+contrast
+to
+plain
+JSON,
+<del class="diff-old">multi-valued
+properties
+</del>
+<ins class="diff-chg">arrays
+</ins>
+in
+JSON-LD
+do
+not
+provide
+an
+ordering
+of
+the
+listed
+<del class="diff-old">objects.
+</del>
+<ins class="diff-chg">objects
+by
+default.
+</ins>
+For
+example,
+consider
+the
+following
+simple
+document:
+</p>
+<del class="diff-old">  {
+...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;nick&quot;: ,
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;nick&quot;: <span class="diff">[ &quot;joe&quot;, &quot;bob&quot;, &quot;jaybee&quot; ]</span>,
+...
+</ins>
+}
+</pre>
+<p>
+<del class="diff-old">This
+results
+</del>
+<ins class="diff-chg">The
+markup
+shown
+above
+would
+result
+</ins>
+in
+three
+triples
+being
+generated,
+each
+relating
+the
+subject
+to
+an
+individual
+object,
+with
+no
+inherent
+<del class="diff-old">order.
+</del>
+<ins class="diff-chg">order:
+</ins>
+</p>
+<pre class="example">&lt;http://example.org/people#joebob&gt;
+<ins class="diff-new">   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      &quot;joe&quot; .
+&lt;http://example.org/people#joebob&gt;
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      &quot;bob&quot; .
+&lt;http://example.org/people#joebob&gt;
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+&quot;jaybee&quot;
+.
+</ins></pre><p><ins class="diff-new">
+Multiple
+values
+may
+also
+be
+expressed
+using
+the
+expanded
+object
+form:
+</ins></p><pre class="example">{<ins class="diff-new">
+  &quot;@id&quot;: &quot;http://example.org/articles/8&quot;,
+  &quot;dc:title&quot;: <span class="diff">
+  [
+    {
+      &quot;@value&quot;: &quot;Das Kapital&quot;,
+      &quot;@language&quot;: &quot;de&quot;
+    },
+    {
+      &quot;@value&quot;: &quot;Capital&quot;,
+      &quot;@language&quot;: &quot;en&quot;
+    }
+  ]</span>
+}
+</ins></pre><p><ins class="diff-new">
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples,
+again
+with
+no
+inherent
+order:
+</ins></p><pre class="example">&lt;http://example.org/articles/8&gt;<ins class="diff-new">
+   &lt;http://purl.org/dc/terms/title&gt;
+      &quot;Das Kapital&quot;@de .
+&lt;http://example.org/articles/8&gt;
+   &lt;http://purl.org/dc/terms/title&gt;
+&quot;Capital&quot;@en
+.
+</ins></pre>
+<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">  {
+...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;foaf:nick&quot;:
+  {
+    &quot;@list&quot;: [ &quot;joe&quot;, &quot;bob&quot;, &quot;jaybee&quot; ]
+  },
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;foaf:nick&quot;:
+</ins>  <span class="diff">{<ins class="diff-chg">
+    &quot;@list&quot;: [ &quot;joe&quot;, &quot;bob&quot;, &quot;jaybee&quot; ]
+  }</span>,
+...
+</ins>
+}
+</pre>
+<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
+through
+<del class="diff-old">alternate
+representations
+</del>
+<ins class="diff-chg">operations
+such
+</ins>
+as
+<del class="diff-old">described
+in
+[
+JSON-LD-API
+].
+</del>
+<a href="#expansion">
+<ins class="diff-chg">Expansion
+</ins></a>,<a href="#compaction"><ins class="diff-chg">
+Compaction
+</ins></a>,<ins class="diff-chg">
+and
+</ins><a href="#framing"><ins class="diff-chg">
+Framing
+</ins></a>.
+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">  {
+  &quot;@context&quot;:
+  {
+    ...
+    &quot;nick&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/nick&quot;,
+      &quot;@container&quot;: &quot;@list&quot;
+    }
+  },
+...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;nick&quot;: ,
+...
+</del>
+<pre class="example">{
+  <span class="diff">&quot;@context&quot;:
+<ins class="diff-chg">  {
+    ...
+    &quot;nick&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/nick&quot;,
+      &quot;@container&quot;: &quot;@list&quot;
+    }
+  }</span>,
+...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;nick&quot;: <span class="diff">[ &quot;joe&quot;, &quot;bob&quot;, &quot;jaybee&quot; ]</span>,
+...
+</ins>
+}
+</pre>
+<p class="note">
+List
+<del class="diff-old">coercion
+</del>
+<ins class="diff-chg">of
+lists
+are
+not
+allowed
+in
+this
+version
+of
+JSON-LD.
+If
+a
+list
+of
+lists
+</ins>
+is
+<del class="diff-old">specified
+within
+</del>
+<ins class="diff-chg">detected,
+a
+JSON-LD
+processor
+will
+throw
+</ins>
+an
+<del class="diff-old">expanded
+term
+definition
+using
+</del>
+<ins class="diff-chg">exception.
+</ins></p><p><ins class="diff-chg">
+Similarly
+to
+</ins><code><ins class="diff-chg">
+@list
+</ins></code>,<ins class="diff-chg">
+there
+exists
+</ins>
+the
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+<ins class="diff-new">keyword
+</ins></a>
+<code>
+<del class="diff-old">@container
+</del>
+<ins class="diff-chg">@set
+</ins>
+</code>
+<del class="diff-old">key.
+The
+value
+</del>
+<ins class="diff-chg">to
+describe
+unordered
+sets.
+While
+its
+use
+in
+the
+body
+</ins>
+of
+<del class="diff-old">this
+key,
+if
+present,
+</del>
+<ins class="diff-chg">a
+JSON-LD
+document
+represents
+just
+syntactic
+sugar
+that
+</ins>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+<ins class="diff-new">optimized
+away
+when
+processing
+the
+document,
+it
+is
+very
+helpful
+for
+</ins><a href="#compaction"><ins class="diff-new">
+Compaction
+</ins></a><ins class="diff-new">
+and
+</ins><a href="#framing"><ins class="diff-new">
+Framing
+</ins></a>.<ins class="diff-new">
+The
+value
+of
+terms
+associated
+with
+a
+</ins><code><ins class="diff-new">
+@set
+</ins></code><ins class="diff-new">
+-
+or
+</ins>
+<code>
+@list
+<del class="diff-old">.
+This
+indicates
+that
+</del>
+</code>
+<ins class="diff-chg">-
+</ins><code><ins class="diff-chg">
+@container
+</ins></code><ins class="diff-chg">
+are
+always
+represented
+in
+the
+form
+of
+an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array">
+array
+<del class="diff-old">values
+</del>
+</a>
+<ins class="diff-chg">-
+even
+if
+there
+is
+just
+a
+single
+value.
+This
+makes
+post-processing
+</ins>
+of
+<del class="diff-old">keys
+coerced
+</del>
+<ins class="diff-chg">the
+data
+easier
+</ins>
+as
+<ins class="diff-new">the
+data
+is
+in
+a
+deterministic
+form.
+If
+no
+such
+</ins>
+<code>
+<del class="diff-old">@list
+</del>
+<ins class="diff-chg">@container
+</ins>
+</code>
+<ins class="diff-new">is
+specified,
+single
+values
+</ins>
+are
+<ins class="diff-new">optimized
+</ins>
+to
+<del class="diff-old">be
+serialized
+as
+</del>
+a
+<del class="diff-old">List
+.
+</del>
+<ins class="diff-chg">non-array
+form.
+</ins>
+</p>
+<p class="note">
+<del class="diff-old">List
+</del>
+<ins class="diff-chg">The
+use
+</ins>
+of
+<del class="diff-old">lists
+are
+not
+allowed
+</del>
+<code>
+<ins class="diff-chg">@container
+</ins></code>
+in
+<del class="diff-old">this
+version
+</del>
+<ins class="diff-chg">the
+body
+</ins>
+of
+<del class="diff-old">JSON-LD.
+If
+</del>
+a
+<del class="diff-old">list
+of
+lists
+</del>
+<ins class="diff-chg">JSON-LD
+document,
+i.e.,
+outside
+</ins><code><ins class="diff-chg">
+@context
+</ins></code>
+is
+<del class="diff-old">detected,
+a
+</del>
+<ins class="diff-chg">ignored
+by
+</ins>
+JSON-LD
+<del class="diff-old">processor
+will
+throw
+an
+exception.
+</del>
+<ins class="diff-chg">processors.
+</ins>
+</p>
+</div>
+</div>
+<div id="advanced-concepts" class="section">
+<h2>
+<span class="secno">
+4.
+</span>
+Advanced
+Concepts
+</h2>
+<p>
+JSON-LD
+has
+a
+number
+of
+features
+that
+provide
+functionality
+above
+and
+beyond
+the
+core
+functionality
+described
+above.
+The
+following
+sections
+outline
+the
+features
+that
+are
+specific
+to
+JSON-LD.
+</p>
+<div id="typed-values" class="section">
+<h3>
+<span class="secno">
+4.1
+</span>
+<ins class="diff-new">Typed
+Values
+</ins></h3><p><ins class="diff-new">
+A
+value
+with
+an
+associated
+type,
+also
+known
+as
+a
+</ins><dfn title="typed_value" id="dfn-typed_value"><ins class="diff-new">
+typed
+value
+</ins></dfn>,<ins class="diff-new">
+is
+indicated
+by
+associating
+a
+value
+with
+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">
+which
+indicates
+the
+value's
+type.
+Typed
+values
+may
+be
+expressed
+in
+JSON-LD
+in
+three
+ways:
+</ins></p><ol><li><ins class="diff-new">
+By
+utilizing
+the
+</ins><code><ins class="diff-new">
+@type
+</ins></code><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-new">
+keyword
+</ins></a><ins class="diff-new">
+when
+defining
+a
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a><ins class="diff-new">
+within
+a
+</ins><code><ins class="diff-new">
+@context
+</ins></code><ins class="diff-new">
+section.
+</ins></li><li><ins class="diff-new">
+By
+utilizing
+the
+expanded
+form
+for
+specifying
+objects.
+</ins></li><li><ins class="diff-new">
+By
+using
+a
+native
+JSON
+type.
+</ins></li></ol><p><ins class="diff-new">
+The
+first
+example
+uses
+the
+</ins><code><ins class="diff-new">
+@type
+</ins></code><ins class="diff-new">
+keyword
+to
+express
+a
+typed
+value:
+</ins></p><pre class="example">{  <span class="diff">&quot;@context&quot;:<ins class="diff-new">
+  {
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+    &quot;modified&quot;:
+    {
+      &quot;@id&quot;: &quot;http://purl.org/dc/terms/modified&quot;,
+      &quot;@type&quot;: &quot;xsd:dateTime&quot;
+    }
+  }</span>
+...
+  &quot;modified&quot;: &quot;2010-05-29T14:17:39+02:00&quot;,
+...
+}
+</ins></pre><p><ins class="diff-new">
+The
+second
+example
+uses
+the
+expanded
+form
+for
+specifying
+objects:
+</ins></p><pre class="example">{<ins class="diff-new">
+...
+  &quot;modified&quot;:
+</ins>  <span class="diff">{<ins class="diff-new">
+    &quot;@value&quot;: &quot;2010-05-29T14:17:39+02:00&quot;,
+    &quot;@type&quot;: &quot;xsd:dateTime&quot;
+  }</span>
+...
+}
+</ins></pre><p><ins class="diff-new">
+Both
+examples
+above
+would
+generate
+an
+object
+with
+the
+value
+of
+</ins><code><ins class="diff-new">
+2010-05-29T14:17:39+02:00
+</ins></code><ins class="diff-new">
+and
+the
+type
+of
+</ins><code><ins class="diff-new">
+http://www.w3.org/2001/XMLSchema#dateTime
+</ins></code>.</p><p><ins class="diff-new">
+The
+third
+example
+uses
+a
+built-in
+native
+JSON
+type,
+a
+</ins><a class="tref internalDFN" title="number" href="#dfn-number"><ins class="diff-new">
+number
+</ins></a>,<ins class="diff-new">
+to
+express
+a
+type:
+</ins></p><pre class="example">{<ins class="diff-new">
+...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;age&quot;: <span class="diff">31</span>
+...
+}
+</ins></pre><p><ins class="diff-new">
+The
+example
+above
+is
+really
+just
+a
+shorthand
+for
+the
+following:
+</ins></p><pre class="example">{<ins class="diff-new">
+...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;age&quot;:
+</ins>  <span class="diff">{<ins class="diff-new">
+    &quot;@value&quot;: &quot;31&quot;,
+    &quot;@type&quot;: &quot;http://www.w3.org/2001/XMLSchema#integer&quot;
+  }</span>
+...
+}
+</ins></pre><p class="note"><ins class="diff-new">
+The
+</ins><code><ins class="diff-new">
+@type
+</ins></code><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-new">
+keyword
+</ins></a><ins class="diff-new">
+is
+also
+used
+to
+associate
+a
+type
+with
+a
+</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-new">
+subject
+</ins></a>.<ins class="diff-new">
+Although
+the
+same
+keyword
+is
+used
+in
+both
+places,
+the
+concept
+of
+an
+</ins><em><ins class="diff-new">
+object
+type
+</ins></em><ins class="diff-new">
+and
+a
+</ins><em><ins class="diff-new">
+value
+type
+</ins></em><ins class="diff-new">
+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.
+</ins></p></div><div id="compact-iris" class="section"><h3><span class="secno"><ins class="diff-new">
+4.2
+</ins></span>
+Compact
+IRIs
+</h3>
+<p>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+Term
+</a>
+s
+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
+term
+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">
+term
+</a>
+s
+that
+are
+used
+across
+an
+application.
+This
+is
+a
+concern
+for
+at
+least
+three
+<del class="diff-old">reasons;
+</del>
+<ins class="diff-chg">reasons:
+</ins>
+the
+first
+is
+the
+cognitive
+load
+on
+the
+developer
+of
+remembering
+all
+of
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s,
+the
+second
+is
+the
+serialized
+size
+of
+the
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+if
+it
+is
+specified
+inline,
+the
+third
+is
+future-proofing
+embedded
+application
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+s
+that
+may
+not
+be
+easy
+to
+change
+after
+they
+are
+deployed.
+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>.
+Generally,
+these
+prefixes
+are
+used
+by
+concatenating
+the
+<em>
+prefix
+</em>
+and
+a
+<em>
+suffix
+</em>,
+which
+is
+separated
+by
+a
+colon
+(
+<code>:
+</code>
+).
+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
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+s
+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
+<del class="diff-old">used
+directly
+</del>
+<ins class="diff-chg">interpreted
+</ins>
+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.
+This
+effectively
+means
+that
+every
+term
+containing
+a
+colon
+will
+be
+interpreted
+by
+a
+JSON-LD
+processor
+as
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>.
+</p>
+<p>
+The
+ability
+to
+use
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+IRIs
+</a>
+reduces
+the
+need
+for
+developers
+to
+declare
+every
+<a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">
+vocabulary
+</a>
+term
+that
+they
+intend
+to
+use
+in
+the
+JSON-LD
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>.
+This
+reduces
+stand-alone
+JSON-LD
+document
+serialization
+size
+because
+every
+<a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">
+vocabulary
+</a>
+term
+need
+not
+be
+declared
+in
+the
+embedded
+context.
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+Compact
+IRIs
+</a>
+also
+reduces
+the
+cognitive
+load
+on
+the
+developer.
+It
+is
+far
+easier
+to
+remember
+<code>
+foaf:name
+</code>
+than
+it
+is
+to
+remember
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>.
+The
+use
+of
+prefixes
+also
+ensures
+that
+a
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+document
+does
+not
+have
+to
+be
+updated
+in
+lock-step
+with
+an
+externally
+defined
+<a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">
+vocabulary
+</a>.
+Without
+prefixes,
+a
+developer
+would
+need
+to
+keep
+their
+application
+context
+terms
+in
+lock-step
+with
+an
+externally
+defined
+vocabulary.
+Rather,
+by
+just
+declaring
+the
+<a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">
+vocabulary
+</a>
+prefix,
+one
+can
+use
+new
+terms
+as
+they're
+declared
+without
+having
+to
+update
+the
+application's
+JSON-LD
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>.
+</p>
+<p>
+Consider
+the
+following
+example:
+</p>
+<del class="diff-old">  {
+  &quot;@context&quot;:
+  {
+
+
+  },
+  &quot;@id&quot;: &quot;http://example.org/library&quot;,
+  &quot;@type&quot;: ,
+  :
+  {
+    &quot;@id&quot;: &quot;http://example.org/library/the-republic&quot;,
+    &quot;@type&quot;: ,
+    : &quot;Plato&quot;,
+    : &quot;The Republic&quot;,
+    :
+    {
+      &quot;@id&quot;: &quot;http://example.org/library/the-republic#introduction&quot;,
+      &quot;@type&quot;: ,
+      : &quot;An introductory chapter on The Republic.&quot;,
+      : &quot;The Introduction&quot;
+    }
+  }
+</del>
+  <pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+</ins>    <span class="diff">&quot;dc&quot;: &quot;http://purl.org/dc/elements/1.1/&quot;,</span>    <span class="diff">&quot;ex&quot;: &quot;http://example.org/vocab#&quot;</span><ins class="diff-chg">
+  },
+  &quot;@id&quot;: &quot;http://example.org/library&quot;,
+  &quot;@type&quot;: <span class="diff">&quot;ex:Library&quot;</span>,
+</ins>  <span class="diff">&quot;ex:contains&quot;</span>:<ins class="diff-chg">
+  {
+    &quot;@id&quot;: &quot;http://example.org/library/the-republic&quot;,
+    &quot;@type&quot;: <span class="diff">&quot;ex:Book&quot;</span>,
+</ins>    <span class="diff">&quot;dc:creator&quot;</span>: &quot;Plato&quot;,    <span class="diff">&quot;dc:title&quot;</span>: &quot;The Republic&quot;,    <span class="diff">&quot;ex:contains&quot;</span>:<ins class="diff-chg">
+    {
+      &quot;@id&quot;: &quot;http://example.org/library/the-republic#introduction&quot;,
+      &quot;@type&quot;: <span class="diff">&quot;ex:Chapter&quot;</span>,
+</ins>      <span class="diff">&quot;dc:description&quot;</span>: &quot;An introductory chapter on The Republic.&quot;,      <span class="diff">&quot;dc:title&quot;</span>: &quot;The Introduction&quot;<ins class="diff-chg">
+    }
+  }
+</ins>
+}
+</pre>
+<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">  {
+  &quot;@context&quot;:
+  {
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;,
+    : { &quot;@type&quot;: &quot;@id&quot; },
+    &quot;picture&quot;: { &quot;@id&quot;: , &quot;@type&quot;: &quot;@id&quot; }
+  },
+  &quot;@subject&quot;: &quot;http://me.markus-lanthaler.com/&quot;,
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Markus Lanthaler&quot;,
+  &quot;foaf:homepage&quot;: &quot;http://www.markus-lanthaler.com/&quot;,
+  &quot;picture&quot;: &quot;http://twitter.com/account/profile_image/markuslanthaler&quot;
+</del>
+  <pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;,
+</ins>    <span class="diff">&quot;foaf:homepage&quot;</span>: { &quot;@type&quot;: &quot;@id&quot; },<ins class="diff-chg">
+    &quot;picture&quot;: { &quot;@id&quot;: <span class="diff">&quot;foaf:depiction&quot;</span>, &quot;@type&quot;: &quot;@id&quot; }
+  },
+  &quot;@subject&quot;: &quot;http://me.markus-lanthaler.com/&quot;,
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Markus Lanthaler&quot;,
+  &quot;foaf:homepage&quot;: &quot;http://www.markus-lanthaler.com/&quot;,
+  &quot;picture&quot;: &quot;http://twitter.com/account/profile_image/markuslanthaler&quot;
+</ins>
+}
+</pre>
+<p>
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+Compact
+IRIs
+</a>,
+also
+known
+as
+CURIEs,
+are
+defined
+more
+formally
+in
+RDFa
+Core
+1.1,
+<cite>
+<a href="http://www.w3.org/TR/rdfa-core/#s_curies">
+Section
+6
+&quot;CURIE
+Syntax
+Definition&quot;
+</a>
+</cite>
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
+RDFA-CORE
+</a>
+</cite>
+].
+JSON-LD
+does
+not
+support
+the
+square-bracketed
+CURIE
+syntax
+as
+the
+mechanism
+is
+not
+required
+to
+disambiguate
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+s
+in
+a
+JSON-LD
+document
+like
+it
+is
+in
+HTML
+documents.
+</p>
+</div>
+<div id="external-contexts" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.2
+</del>
+<ins class="diff-chg">4.3
+</ins>
+</span>
+External
+Contexts
+</h3>
+<p>
+Authors
+may
+choose
+to
+declare
+JSON-LD
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+s
+in
+external
+documents
+to
+promote
+re-use
+of
+contexts
+as
+well
+as
+reduce
+the
+size
+of
+JSON-LD
+documents.
+</p>
+<p>
+In
+order
+to
+use
+an
+external
+context,
+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
+JSON-LD
+document.
+The
+referenced
+document
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+top-level
+<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>.
+The
+value
+of
+any
+<code>
+@context
+</code>
+key
+within
+that
+object
+is
+substituted
+for
+the
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+within
+the
+referencing
+document
+to
+have
+the
+same
+effect
+as
+if
+the
+value
+were
+specified
+inline
+within
+the
+referencing
+document.
+</p>
+<p>
+The
+following
+example
+demonstrates
+the
+use
+of
+an
+external
+context:
+</p>
+<del class="diff-old">{
+  ,
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+</del>
+<pre class="example">{
+  <span class="diff">&quot;@context&quot;: &quot;http://json-ld.org/contexts/person&quot;</span>,
+<ins class="diff-chg">  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+</ins>
+}
+</pre>
+<p>
+Authors
+may
+also
+import
+multiple
+contexts
+or
+a
+combination
+of
+external
+and
+local
+contexts
+by
+specifying
+a
+list
+of
+contexts:
+</p>
+<del class="diff-old">{
+  &quot;@context&quot;:
+  [
+    &quot;http://json-ld.org/contexts/person&quot;,
+    {
+      &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;
+    },
+    &quot;http://json-ld.org/contexts/event&quot;,
+  ]
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+  &quot;celebrates&quot;:
+  {
+    &quot;@type&quot;: &quot;Event&quot;,
+    &quot;description&quot;: &quot;International Talk Like a Pirate Day&quot;,
+    &quot;date&quot;: &quot;R/2011-09-19&quot;
+  }
+</del>
+<pre class="example">{
+  <span class="diff">&quot;@context&quot;:
+<ins class="diff-chg">  [
+    &quot;http://json-ld.org/contexts/person&quot;,
+    {
+      &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;
+    },
+    &quot;http://json-ld.org/contexts/event&quot;,
+  ]</span>
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+</ins>  <span class="diff">&quot;celebrates&quot;:<ins class="diff-chg">
+  {
+    &quot;@type&quot;: &quot;Event&quot;,
+    &quot;description&quot;: &quot;International Talk Like a Pirate Day&quot;,
+    &quot;date&quot;: &quot;R/2011-09-19&quot;
+  }</span>
+</ins>
+}
+</pre>
+<p>
+Each
+context
+in
+a
+list
+will
+be
+evaluated
+in-order.
+Duplicate
+mappings
+among
+the
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+s
+<em class="rfc2119" title="must">
+must
+</em>
+be
+overwritten
+on
+a
+last-defined-overrides
+basis.
+The
+context
+list
+<em class="rfc2119" title="must">
+must
+</em>
+contain
+either
+de-referenceable
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+s
+or
+<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>
+s
+that
+conform
+to
+the
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+syntax
+as
+described
+in
+this
+document.
+</p>
+<p>
+An
+author
+may
+nest
+contexts
+within
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+s,
+with
+the
+more
+deeply
+nested
+contexts
+overriding
+the
+values
+in
+previously
+defined
+contexts:
+</p>
+<del class="diff-old">{
+  &quot;@context&quot;:
+  {
+    &quot;name&quot;: &quot;http://example.com/person#name&quot;,
+    &quot;details&quot;: &quot;http://example.com/person#details&quot;
+  },
+  &quot;&quot;: &quot;Markus Lanthaler&quot;,
+  ...
+  &quot;details&quot;:
+  {
+
+    &quot;&quot;: &quot;Graz University of Technology&quot;
+  }
+</del>
+<pre class="example">{
+  <span class="diff">&quot;@context&quot;:
+<ins class="diff-chg">  {
+    &quot;name&quot;: &quot;http://example.com/person#name&quot;,
+    &quot;details&quot;: &quot;http://example.com/person#details&quot;
+  },</span>
+  &quot;<span class="diff">name</span>&quot;: &quot;Markus Lanthaler&quot;,
+  ...
+  &quot;details&quot;:
+  {
+</ins>    <span class="diff">&quot;@context&quot;: { &quot;name&quot;: &quot;http://example.com/organization#name&quot; },</span><ins class="diff-chg">
+    &quot;<span class="diff">name</span>&quot;: &quot;Graz University of Technology&quot;
+  }
+</ins>
+}
+</pre>
+<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
+the
+JSON
+object
+has
+legacy
+applications
+using
+the
+structure
+of
+the
+object.
+</p>
+<p>
+External
+JSON-LD
+context
+documents
+<em class="rfc2119" title="may">
+may
+</em>
+contain
+extra
+information
+located
+outside
+of
+the
+<code>
+@context
+</code>
+key,
+such
+as
+documentation
+about
+the
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefixes
+</a>
+declared
+in
+the
+document.
+When
+importing
+a
+<code>
+@context
+</code>
+value
+from
+an
+external
+JSON-LD
+context
+document,
+any
+extra
+information
+contained
+outside
+of
+the
+<code>
+@context
+</code>
+value
+<em class="rfc2119" title="must">
+must
+</em>
+be
+discarded.
+It
+is
+also
+<em class="rfc2119" title="recommended">
+recommended
+</em>
+that
+a
+human-readable
+document
+encoded
+in
+HTML+RDFa
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-HTML-RDFA">
+HTML-RDFA
+</a>
+</cite>
+]
+or
+other
+Linked
+Data
+compatible
+format
+is
+served
+as
+well
+to
+explain
+the
+correct
+usage
+of
+the
+JSON-LD
+context
+document.
+</p>
+</div>
+<div id="referencing-contexts-from-json-documents" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.3
+</del>
+<ins class="diff-chg">4.4
+</ins>
+</span>
+Referencing
+Contexts
+from
+JSON
+Documents
+</h3>
+<p>
+Ordinary
+JSON
+documents
+can
+be
+transformed
+<del class="diff-old">in
+</del>
+<ins class="diff-chg">into
+</ins>
+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
+JSON-LD
+document
+in
+an
+HTTP
+Link
+Header
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC5988">
+RFC5988
+</a>
+</cite>
+]
+using
+the
+<code>
+describedby
+</code>
+link
+relation.
+The
+referenced
+document
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+top-level
+<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>.
+The
+<code>
+@context
+</code>
+subtree
+within
+that
+object
+is
+added
+to
+the
+top-level
+object
+of
+the
+referencing
+document.
+If
+an
+array
+is
+at
+the
+top-level
+of
+the
+referencing
+document
+and
+its
+items
+are
+objects,
+the
+<code>
+@context
+</code>
+subtree
+is
+added
+to
+all
+array
+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
+Host: example.com
+Accept: application/json,*/*;q=0.1
+
+----------------------------------------------------
+
+HTTP/1.0 200 OK
+...
+Content-Type: application/json
+
+
+{
+  &quot;name&quot;: &quot;Markus Lanthaler&quot;,
+  &quot;homepage&quot;: &quot;http://www.markus-lanthaler.com/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/markuslanthaler&quot;
+</del>
+<pre class="example">GET /ordinary-json-document.json HTTP/1.1
+<ins class="diff-chg">Host: example.com
+Accept: application/json,*/*;q=0.1
+====================================
+HTTP/1.0 200 OK
+...
+Content-Type: application/json
+</ins><span class="diff">Link: &lt;http://json-ld.org/contexts/person&gt;; rel=&quot;describedby&quot;; type=&quot;application/ld+json&quot;</span><ins class="diff-chg">
+{
+  &quot;name&quot;: &quot;Markus Lanthaler&quot;,
+  &quot;homepage&quot;: &quot;http://www.markus-lanthaler.com/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/markuslanthaler&quot;
+</ins>
+}
+</pre>
+<p class="note">
+JSON-LD
+documents
+<ins class="diff-new">served
+with
+the
+</ins><code><ins class="diff-new">
+application/ld+json
+</ins></code><ins class="diff-new">
+media
+type
+</ins>
+<em class="rfc2119" title="must">
+must
+</em>
+have
+all
+context
+information,
+including
+references
+to
+external
+contexts,
+within
+the
+body
+of
+the
+document.
+</p>
+</div>
+<del class="diff-old">4.4
+Default
+Language
+JSON-LD
+allows
+a
+default
+value
+to
+use
+as
+the
+language
+for
+string
+value
+s.
+It
+is
+commonly
+the
+case
+that
+documents
+are
+written
+using
+a
+single
+language.
+As
+described
+in
+String
+Internationalization
+,
+a
+language-tagged
+value
+may
+be
+specified
+as
+follows:
+{
+  ...
+  &quot;name&quot;:
+  {
+    &quot;@value&quot;: &quot;花澄&quot;,
+    &quot;@language&quot;: &quot;ja&quot;
+  }
+}
+It
+is
+also
+possible
+to
+apply
+a
+particular
+language
+code
+to
+all
+string
+value
+s
+by
+setting
+the
+@language
+key
+in
+the
+@context
+:
+{
+  &quot;@context&quot;:
+  {
+    ...
+    &quot;@language&quot;: &quot;ja&quot;
+  },
+  &quot;name&quot;: ,
+  &quot;occupation&quot;:
+}
+The
+example
+above
+would
+generate
+a
+string
+value
+for
+花澄
+and
+科学者
+and
+associate
+the
+ja
+language
+code
+with
+each
+value.
+It
+is
+possible
+to
+override
+the
+default
+language
+by
+using
+the
+expanded
+form
+of
+a
+value:
+{
+  &quot;@context&quot;:
+  {
+    ...
+    &quot;@language&quot;: &quot;ja&quot;
+  },
+  &quot;name&quot;: &quot;花澄&quot;,
+  &quot;occupation&quot;:
+  {
+    &quot;@value&quot;: &quot;Scientist&quot;,
+    &quot;@language&quot;: &quot;en&quot;
+  }
+}
+It
+is
+also
+possible
+to
+override
+the
+default
+language
+and
+specify
+a
+plain
+value
+by
+omitting
+the
+@language
+tag
+when
+expressing
+the
+expanded
+value:
+{
+  &quot;@context&quot;:
+  {
+    ...
+    &quot;@language&quot;: &quot;ja&quot;
+  },
+  &quot;name&quot;: &quot;花澄&quot;,
+  &quot;occupation&quot;:
+  {
+    &quot;@value&quot;: &quot;Ninja&quot;
+  }
+}
+Object
+properties
+that
+use
+the
+expanded
+form
+are
+considered
+explicitly
+defined.
+The
+@language
+keyword,
+when
+used
+in
+the
+context
+,
+must
+only
+be
+applied
+to
+string
+value
+s.
+That
+is,
+string
+value
+s
+expressed
+in
+expanded
+form
+are
+not
+affected
+by
+the
+@language
+keyword,
+when
+it
+is
+used
+in
+the
+context
+.
+To
+clear
+the
+default
+language
+for
+a
+subtree,
+@language
+can
+be
+set
+to
+null
+in
+a
+local
+context
+as
+follows:
+{
+  &quot;@context&quot;:
+  {
+    ...
+    &quot;@language&quot;: &quot;ja&quot;
+  },
+  &quot;name&quot;: &quot;花澄&quot;,
+  &quot;details&quot;:
+  {
+    &quot;@context&quot;:
+    {
+      &quot;@language&quot;: null
+    },
+    &quot;occupation&quot;: &quot;Ninja&quot;
+  }
+}
+</del>
+<div id="expanded-term-definition" class="section">
+<h3>
+<span class="secno">
+4.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">
+term
+</a>
+s
+<em class="rfc2119" title="may">
+may
+</em>
+be
+defined
+using
+an
+expanded
+notation
+to
+allow
+for
+additional
+information
+associated
+with
+the
+term
+to
+be
+specified
+(see
+<ins class="diff-chg">also
+</ins><a href="#type-coercion">
+Type
+Coercion
+</a>
+and
+<a href="#sets-and-lists">
+<ins class="diff-chg">Sets
+and
+</ins>
+Lists
+</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>
+<em class="rfc2119" title="may">
+may
+</em>
+be
+specified
+using
+an
+object
+having
+an
+<code>
+@id
+</code>
+key.
+The
+value
+of
+the
+<code>
+@id
+</code>
+key
+<em class="rfc2119" title="must">
+must
+</em>
+be
+either
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<ins class="diff-new">term
+</ins></a>,<ins class="diff-new">
+a
+</ins>
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>:suffix
+value,
+<ins class="diff-new">or
+</ins>
+an
+<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>.
+Type
+information
+may
+be
+specified
+</p>
+<del class="diff-old">{
+  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: ,
+    &quot;name&quot;: ,
+    &quot;homepage&quot;: ,
+    &quot;depiction&quot;:
+  },
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: <span class="diff">{ &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/&quot; }</span>,
+    &quot;name&quot;: <span class="diff">{ &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot; }</span>,
+    &quot;homepage&quot;: <span class="diff">{ &quot;@id&quot;: &quot;foaf:homepage&quot; }</span>,
+    &quot;depiction&quot;: <span class="diff">{ &quot;@id&quot;: &quot;foaf:depiction&quot; }</span>
+  },
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+</ins>
+}
+</pre>
+<del class="diff-old">4.6
+Automatic
+Typing
+</del>
+<p>
+<del class="diff-old">Since
+JSON
+is
+capable
+of
+expressing
+typed
+information
+such
+as
+doubles,
+integers,
+and
+boolean
+values.
+As
+demonstrated
+below,
+JSON-LD
+utilizes
+that
+</del>
+<ins class="diff-chg">This
+allows
+additional
+</ins>
+information
+to
+<del class="diff-old">create
+typed
+value
+</del>
+<ins class="diff-chg">be
+associated
+with
+the
+term.
+This
+</ins><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em><ins class="diff-chg">
+be
+used
+for
+</ins><a href="#type-coercion"><ins class="diff-chg">
+Type
+Coercion
+</ins></a>,<a href="#sets-and-lists"><ins class="diff-chg">
+Sets
+and
+Lists
+</ins>
+</a>
+<del class="diff-old">s:
+</del>
+<ins class="diff-chg">),
+or
+to
+associate
+language
+information
+with
+a
+term
+as
+shown
+in
+the
+following
+example:
+</ins>
+</p>
+<del class="diff-old">{
+...
+  // The following two values are automatically converted to a type of xsd:double
+  // and both values are equivalent to each other.
+  &quot;measure:cups&quot;: ,
+  &quot;measure:cups&quot;: ,
+  // The following value is automatically converted to a type of xsd:double as well
+  &quot;space:astronomicUnits&quot;: ,
+  // The following value is never converted to a language-native type
+  &quot;measure:stones&quot;: ,
+  // This value is automatically converted to having a type of xsd:integer
+  &quot;chem:protons&quot;: ,
+  // This value is automatically converted to having a type of xsd:boolean
+  &quot;sensor:active&quot;: ,
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;: {
+    ...
+    &quot;ex&quot;: &quot;http://example.com/&quot;,
+    &quot;@language&quot;: &quot;ja&quot;,
+    &quot;name&quot;: { &quot;@id&quot;: &quot;ex:name&quot;, <span class="diff">&quot;@language&quot;: null</span> },
+    &quot;occupation&quot;: { &quot;@id&quot;: &quot;ex:occupation&quot; },
+    &quot;occupation_en&quot;: { &quot;@id&quot;: &quot;ex:occupation&quot;, <span class="diff">&quot;@language&quot;: &quot;en&quot;</span> },
+    &quot;occupation_de&quot;: { &quot;@id&quot;: &quot;ex:occupation&quot;, <span class="diff">&quot;@language&quot;: &quot;cs&quot;</span> }
+  },
+</ins>  <span class="diff">&quot;name&quot;: &quot;Yagyū Muneyoshi&quot;,<ins class="diff-chg">
+  &quot;occupation&quot;: &quot;忍者&quot;,
+  &quot;occupation_en&quot;: &quot;Ninja&quot;,
+  &quot;occupation_cs&quot;: &quot;Nindža&quot;,</span>
+  ...
+</ins>
+}
+</pre>
+<del class="diff-old">When
+dealing
+</del>
+<p>
+<ins class="diff-chg">The
+example
+above
+would
+associate
+</ins><em><ins class="diff-chg">
+忍者
+</ins></em>
+with
+<del class="diff-old">a
+number
+of
+modern
+programming
+languages,
+including
+JavaScript
+ECMA-262,
+there
+is
+no
+distinction
+between
+xsd:decimal
+and
+xsd:double
+values.
+That
+is,
+</del>
+the
+<del class="diff-old">number
+</del>
+<ins class="diff-chg">specified
+default
+language
+code
+</ins>
+<code>
+<del class="diff-old">5.3
+and
+</del>
+<ins class="diff-chg">ja
+</ins></code>,<em><ins class="diff-chg">
+Ninja
+</ins></em><ins class="diff-chg">
+with
+</ins>
+the
+<del class="diff-old">number
+</del>
+<ins class="diff-chg">language
+code
+</ins>
+<code>
+<del class="diff-old">5.3e0
+are
+treated
+as
+if
+they
+were
+the
+same.
+When
+converting
+from
+JSON-LD
+to
+a
+language-native
+format
+</del>
+<ins class="diff-chg">en
+</ins></code>,
+and
+<del class="diff-old">back,
+type
+information
+is
+lost
+in
+a
+number
+</del>
+<em>
+<ins class="diff-chg">Nindža
+</ins></em><ins class="diff-chg">
+with
+the
+language
+code
+</ins><code><ins class="diff-chg">
+cs
+</ins></code>.<ins class="diff-chg">
+The
+value
+</ins>
+of
+<del class="diff-old">these
+languages.
+Thus,
+one
+could
+say
+that
+</del>
+<code>
+<del class="diff-old">5.3
+is
+a
+xsd:decimal
+and
+</del>
+<ins class="diff-chg">name
+</ins></code>,<em><ins class="diff-chg">
+Yagyū
+Muneyoshi
+</ins></em><ins class="diff-chg">
+wouldn't
+be
+associated
+with
+any
+language
+code
+since
+it
+was
+reset
+in
+the
+expanded
+term
+definition.
+</ins></p><p><ins class="diff-chg">
+Expanded
+terms
+</ins><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em><ins class="diff-chg">
+also
+be
+defined
+using
+</ins><a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri"><ins class="diff-chg">
+Compact
+IRIs
+</ins></a><ins class="diff-chg">
+or
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-chg">
+IRIs
+</ins></a><ins class="diff-chg">
+as
+keys.
+If
+the
+definition
+does
+not
+include
+an
+</ins>
+<code>
+<del class="diff-old">5.3e0
+</del>
+<ins class="diff-chg">@id
+</ins>
+</code>
+<ins class="diff-new">key,
+the
+expanded
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr>
+is
+<del class="diff-old">an
+xsd:double
+in
+JSON-LD,
+but
+when
+both
+values
+are
+converted
+to
+a
+language-native
+format
+</del>
+<ins class="diff-chg">determined
+by
+performing
+expansion
+of
+</ins>
+the
+<del class="diff-old">type
+difference
+between
+</del>
+<ins class="diff-chg">key
+within
+</ins>
+the
+<del class="diff-old">two
+</del>
+<ins class="diff-chg">current
+active
+context.
+</ins></p><p class="note"><ins class="diff-chg">
+Although
+it
+</ins>
+is
+<del class="diff-old">lost
+because
+the
+machine-level
+representation
+will
+almost
+always
+be
+a
+double
+.
+Implementers
+should
+be
+aware
+of
+this
+potential
+round-tripping
+issue
+between
+xsd:decimal
+and
+xsd:double
+.
+Specifically
+objects
+with
+a
+type
+of
+xsd:decimal
+must
+not
+be
+converted
+</del>
+<ins class="diff-chg">possible
+</ins>
+to
+<ins class="diff-new">define
+</ins>
+a
+<del class="diff-old">language
+native
+type.
+</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">
+or
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+to
+expand
+to
+some
+other
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>,<ins class="diff-chg">
+such
+usage
+is
+strongly
+discouraged.
+</ins>
+</p>
+</div>
+<div id="type-coercion" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.7
+</del>
+<ins class="diff-chg">4.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
+types
+to
+the
+proper
+data
+type
+based
+on
+a
+mapping
+of
+data
+type
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+s
+to
+property
+types.
+Using
+type
+coercion,
+value
+representation
+is
+preserved
+without
+requiring
+the
+data
+type
+to
+be
+specified
+with
+each
+usage.
+</p>
+<p>
+Type
+coercion
+is
+specified
+within
+an
+<a href="#expanded-term-definition">
+expanded
+term
+definition
+</a>
+using
+the
+<code>
+@type
+</code>
+key.
+The
+values
+of
+this
+key
+represent
+type
+IRIs
+and
+<em class="rfc2119" title="must">
+must
+</em>
+take
+the
+form
+of
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>,
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+or
+the
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>
+<code>
+@id
+</code>.
+Specifying
+<code>
+@id
+</code>
+indicates
+that
+within
+the
+body
+of
+a
+JSON-LD
+document,
+string
+values
+of
+keys
+coerced
+as
+<code>
+@id
+</code>
+are
+to
+be
+interpreted
+as
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+s.
+</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
+<em class="rfc2119" title="may">
+may
+</em>
+be
+defined
+within
+the
+same
+context.
+</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
+value
+</a>
+s,
+IRIs
+and
+lists.
+</p>
+<del class="diff-old">{
+  &quot;@context&quot;:
+  {
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;age&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/age&quot;,
+      &quot;@type&quot;: &quot;xsd:integer&quot;
+    },
+    &quot;homepage&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;,
+      &quot;@container&quot;: &quot;@list&quot;
+    }
+  },
+  &quot;name&quot;: &quot;John Smith&quot;,
+  &quot;age&quot;: ,
+  &quot;homepage&quot;:
+  [
+    &quot;http://personal.example.org/&quot;,
+    &quot;http://work.example.com/jsmith/&quot;
+  ]
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;age&quot;:
+</ins>    <span class="diff">{<ins class="diff-chg">
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/age&quot;,
+      &quot;@type&quot;: &quot;xsd:integer&quot;
+    }</span>,
+    &quot;homepage&quot;:
+</ins>    <span class="diff">{<ins class="diff-chg">
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;,
+      &quot;@container&quot;: &quot;@list&quot;
+    }</span>
+  },
+  &quot;name&quot;: &quot;John Smith&quot;,
+  &quot;age&quot;: <span class="diff">&quot;41&quot;</span>,
+  &quot;homepage&quot;:
+</ins>  <span class="diff">[<ins class="diff-chg">
+    &quot;http://personal.example.org/&quot;,
+    &quot;http://work.example.com/jsmith/&quot;
+  ]</span>
+</ins>
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+Turtle:
+</p>
+<del class="diff-old">@prefix xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt; .
+
+[ foaf:name &quot;John Smith&quot;;
+  foaf:age  &quot;41&quot;^^xsd:integer;
+  foaf:homepage ( &lt;http://personal.example.org/&gt; &lt;http://work.example.com/jsmith/&gt; )
+</del>
+<pre class="example">@prefix xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt; .
+<ins class="diff-chg">[ foaf:name &quot;John Smith&quot;;
+  foaf:age  &quot;41&quot;^^xsd:integer;
+  foaf:homepage ( &lt;http://personal.example.org/&gt; &lt;http://work.example.com/jsmith/&gt; )
+</ins>
+]
+.
+</pre>
+<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
+by
+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">{
+  &quot;@context&quot;:
+  {
+    ,
+    &quot;&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;&quot;,
+      &quot;@type&quot;: &quot;xsd:integer&quot;
+    },
+    &quot;&quot;:
+    {
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+</ins>    <span class="diff">&quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;</span>,<ins class="diff-chg">
+    &quot;<span class="diff">foaf:age</span>&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;&quot;,
+      &quot;@type&quot;: &quot;xsd:integer&quot;
+    },
+    &quot;<span class="diff">foaf:homepage</span>&quot;:
+</ins>    <span class="diff">{<ins class="diff-chg">
+      &quot;@type&quot;: &quot;@id&quot;
+    }</span>
+</ins>
+}
+</pre>
+<p>
+In
+this
+case,
+the
+<code>
+@id
+</code>
+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
+term
+so
+that
+the
+actual
+definition
+of
+a
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>
+becomes
+unnecessary.
+</p>
+<p class="note">
+<ins class="diff-new">Keys
+in
+the
+context
+are
+treated
+as
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+terms
+</ins></a><ins class="diff-new">
+for
+the
+purpose
+of
+expansion
+and
+value
+coercion.
+This
+allows
+multiple
+representations
+for
+the
+same
+expanded
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr>,<ins class="diff-new">
+which
+may
+be
+useful
+for
+establishing
+different
+type
+coercion
+rules.
+It
+also
+allows
+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">
+(or
+even
+an
+absolute
+</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">
+)
+to
+be
+defined
+as
+something
+else
+entirely,
+but
+this
+usage
+is
+discouraged.
+</ins></p><p><ins class="diff-new">
+Type
+coercion
+is
+performed
+using
+the
+unexpanded
+value
+of
+the
+key,
+which
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+exactly
+match
+a
+coercion
+rule
+in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a>.</p>
+</div>
+<div id="iri-expansion-within-a-context" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.8
+</del>
+<ins class="diff-chg">4.7
+</ins>
+</span>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+Within
+a
+Context
+</h3>
+<p>
+To
+be
+consistent
+with
+JSON-LD,
+in
+general,
+anywhere
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+is
+expected,
+normal
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+expansion
+rules
+apply
+(see
+<a href="#iris">
+IRIs
+</a>
+).
+Within
+a
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+definition,
+this
+can
+mean
+that
+terms
+defined
+within
+a
+given
+context
+<em class="rfc2119" title="may">
+may
+</em>
+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">{
+  &quot;@context&quot;:
+  {
+    ,
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;age&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/age&quot;,
+      &quot;@type&quot;:
+    },
+    &quot;homepage&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  },
+  ...
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+</ins>    <span class="diff">&quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;</span>,<ins class="diff-chg">
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;age&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/age&quot;,
+      &quot;@type&quot;: <span class="diff">&quot;xsd:integer&quot;</span>
+    },
+    &quot;homepage&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  },
+  ...
+</ins>
+}
+</pre>
+<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">
+Term
+</a>
+s
+<em class="rfc2119" title="may">
+may
+</em>
+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">{
+  &quot;@context&quot;:
+  {
+    ,
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+    &quot;name&quot;: ,
+    &quot;age&quot;:
+    {
+      &quot;@id&quot;: ,
+      &quot;@type&quot;: &quot;xsd:integer&quot;
+    },
+    &quot;homepage&quot;:
+    {
+      &quot;@id&quot;: ,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  },
+  ...
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+</ins>    <span class="diff">&quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;</span>,<ins class="diff-chg">
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+    &quot;name&quot;: <span class="diff">&quot;foaf:name&quot;</span>,
+    &quot;age&quot;:
+    {
+      &quot;@id&quot;: <span class="diff">&quot;foaf:age&quot;</span>,
+      &quot;@type&quot;: &quot;xsd:integer&quot;
+    },
+    &quot;homepage&quot;:
+    {
+      &quot;@id&quot;: <span class="diff">&quot;foaf:homepage&quot;</span>,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  },
+  ...
+</ins>
+}
+</pre>
+<p>
+<ins class="diff-new">Not
+only
+</ins>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">Term
+</del>
+<ins class="diff-chg">term
+</ins></a><ins class="diff-chg">
+s,
+but
+also
+</ins><a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri"><ins class="diff-chg">
+Compact
+IRIs
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-chg">
+IRIs
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+<em class="rfc2119" title="may">
+may
+</em>
+<del class="diff-old">also
+</del>
+be
+used
+on
+the
+left-hand
+side
+of
+a
+definition.
+</p>
+<del class="diff-old">{
+  &quot;@context&quot;:
+  {
+    ,
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+    &quot;name&quot;: &quot;foaf:name&quot;,
+    &quot;&quot;:
+    {
+      &quot;@id&quot;: &quot;foaf:age&quot;,
+      &quot;@type&quot;: &quot;xsd:integer&quot;
+    },
+    &quot;&quot;:
+    {
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  },
+  ...
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+</ins>    <span class="diff">&quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;</span>,<ins class="diff-chg">
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+    &quot;name&quot;: &quot;foaf:name&quot;,
+    &quot;<span class="diff">foaf:age</span>&quot;:
+    {
+      &quot;@id&quot;: &quot;foaf:age&quot;,
+      &quot;@type&quot;: &quot;xsd:integer&quot;
+    },
+    &quot;<span class="diff">foaf:homepage</span>&quot;:
+</ins>    <span class="diff">{<ins class="diff-chg">
+      &quot;@type&quot;: &quot;@id&quot;
+    }</span>
+  },
+  ...
+</ins>
+}
+</pre>
+<p>
+<del class="diff-old">Note
+that
+in
+</del>
+<ins class="diff-chg">In
+</ins>
+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.
+The
+first
+way,
+as
+shown
+with
+<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
+term
+(using
+short-form)
+as
+well
+as
+the
+<code>
+@type
+</code>
+associated
+with
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>.
+The
+second
+way,
+only
+declares
+the
+<code>
+@type
+</code>
+associated
+with
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>.
+In
+the
+second
+case,
+the
+JSON-LD
+processor
+will
+still
+derive
+the
+full
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+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>
+for
+<code>
+foaf:homepage
+</code>.
+</p>
+<p>
+<del class="diff-old">Full
+</del>
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+<ins class="diff-chg">Absolute
+</ins>
+IRIs
+</a>
+<em class="rfc2119" title="may">
+may
+</em>
+also
+be
+used
+on
+the
+left-hand
+side
+of
+a
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>:
+</p>
+<del class="diff-old">{
+  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;,
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+    &quot;name&quot;: &quot;foaf:name&quot;,
+    &quot;foaf:age&quot;:
+    {
+      &quot;@id&quot;: &quot;foaf:age&quot;,
+      &quot;@type&quot;: &quot;xsd:integer&quot;
+    },
+    &quot;&quot;:
+    {
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  },
+  ...
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;,
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+    &quot;name&quot;: &quot;foaf:name&quot;,
+    &quot;foaf:age&quot;:
+    {
+      &quot;@id&quot;: &quot;foaf:age&quot;,
+      &quot;@type&quot;: &quot;xsd:integer&quot;
+    },
+    &quot;<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>&quot;:
+    {
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  },
+  ...
+</ins>
+}
+</pre>
+<p>
+<del class="diff-old">Note
+that
+in
+</del>
+<ins class="diff-chg">In
+</ins>
+order
+for
+the
+<del class="diff-old">full
+</del>
+<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>
+to
+match
+above,
+the
+<del class="diff-old">full
+</del>
+<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>
+<em class="rfc2119" title="must">
+must
+</em>
+also
+be
+used
+in
+the
+JSON-LD
+document.
+Also
+note
+that
+<code>
+foaf:homepage
+</code>
+will
+not
+use
+the
+<code>
+{
+&quot;@type&quot;:
+&quot;@id&quot;
+}
+</code>
+declaration
+because
+<code>
+foaf:homepage
+</code>
+is
+not
+the
+same
+as
+<code>
+http://xmlns.com/foaf/0.1/homepage
+</code>.
+That
+is,
+a
+JSON-LD
+processor
+will
+use
+direct
+string
+comparison
+when
+looking
+up
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+in
+a
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+before
+it
+applies
+the
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>
+lookup
+mechanism.
+</p>
+<p>
+The
+only
+exception
+for
+using
+terms
+in
+the
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+is
+that
+they
+<em class="rfc2119" title="must not">
+must
+not
+</em>
+be
+used
+in
+a
+circular
+manner.
+That
+is,
+a
+definition
+of
+<em>
+term-1
+</em>
+<em class="rfc2119" title="must not">
+must
+not
+</em>
+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">{
+  &quot;@context&quot;:
+  {
+    &quot;term1&quot;: &quot;term2:foo&quot;,
+    &quot;term2&quot;: &quot;term1:bar&quot;
+  },
+  ...
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+</ins>    <span class="diff">&quot;term1&quot;: &quot;term2:foo&quot;,<ins class="diff-chg">
+    &quot;term2&quot;: &quot;term1:bar&quot;</span>
+  },
+  ...
+</ins>
+}
+</pre>
+</div>
+<div id="embedding" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.9
+</del>
+<ins class="diff-chg">4.8
+</ins>
+</span>
+Embedding
+</h3>
+<p>
+Object
+<dfn title="embedding" id="dfn-embedding">
+embedding
+</dfn>
+is
+a
+JSON-LD
+feature
+that
+allows
+an
+author
+to
+use
+the
+definition
+of
+JSON-LD
+objects
+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="subject" href="#dfn-subject">
+subject
+</a>
+s.
+</p>
+<p>
+The
+example
+shows
+two
+subjects
+related
+by
+a
+property
+from
+the
+first
+subject:
+</p>
+<del class="diff-old">  {
+...
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;&quot;:
+  {
+    &quot;&quot;,
+    &quot;&quot;,
+  }
+...
+</del>
+  <pre class="example">{
+<ins class="diff-chg">...
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;<span class="diff">knows</span>&quot;:
+  {
+    &quot;<span class="diff">@type</span>&quot;: &quot;<span class="diff">Person</span>&quot;,
+    &quot;<span class="diff">name</span>&quot;: &quot;<span class="diff">Gregg Kellogg</span>&quot;,
+  }
+...
+</ins>
+}
+</pre>
+<p>
+An
+object
+definition,
+like
+the
+one
+used
+above,
+<em class="rfc2119" title="may">
+may
+</em>
+be
+used
+as
+a
+JSON
+value
+at
+any
+point
+in
+JSON-LD.
+</p>
+</div>
+<div id="named-graphs" class="section">
+<h3>
+<span class="secno">
+<ins class="diff-new">4.9
+</ins></span><ins class="diff-new">
+Named
+Graphs
+</ins></h3><p><ins class="diff-new">
+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">
+is
+used
+to
+identify
+a
+set
+of
+JSON-LD
+object
+definitions
+that
+may
+not
+be
+directly
+related
+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
+appropriate.
+For
+example:
+</ins></p>  <pre class="example">{<ins class="diff-new">
+  &quot;@context&quot;: ...,
+  &quot;<span class="diff">@graph</span>&quot;:
+  [
+    {
+      &quot;@id&quot;: &quot;http://manu.sporny.org/i/public&quot;,
+      &quot;@type&quot;: &quot;foaf:Person&quot;,
+      &quot;name&quot;: &quot;Manu Sporny&quot;,
+      &quot;knows&quot; &quot;http://greggkellogg.net/foaf#me&quot;
+    },
+    {
+      &quot;@id&quot;: &quot;http://greggkellogg.net/foaf#me&quot;,
+      &quot;@type&quot;: &quot;foaf:Person&quot;,
+      &quot;name&quot;: &quot;Gregg Kellogg&quot;,
+      &quot;knows&quot; &quot;http://manu.sporny.org/i/public&quot;
+    }
+  ]
+}
+</ins></pre><p><ins class="diff-new">
+In
+this
+case,
+embedding
+doesn't
+work
+as
+each
+JSON-LD
+object
+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
+resources
+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="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+definitions
+in
+array
+and
+defining
+the
+</ins><code><ins class="diff-new">
+@context
+</ins></code><ins class="diff-new">
+within
+each
+object:
+</ins></p>  <pre class="example"><span class="diff">[</span><ins class="diff-new">
+  {
+</ins>    <span class="diff">&quot;@context&quot;: ...,</span><ins class="diff-new">
+    &quot;@id&quot;: &quot;http://manu.sporny.org/i/public&quot;,
+    &quot;@type&quot;: &quot;foaf:Person&quot;,
+    &quot;name&quot;: &quot;Manu Sporny&quot;,
+    &quot;knows&quot; &quot;http://greggkellogg.net/foaf#me&quot;
+  },
+  {
+</ins>    <span class="diff">&quot;@context&quot;: ...,</span><ins class="diff-new">
+    &quot;@id&quot;: &quot;http://greggkellogg.net/foaf#me&quot;,
+    &quot;@type&quot;: &quot;foaf:Person&quot;,
+    &quot;name&quot;: &quot;Gregg Kellogg&quot;,
+    &quot;knows&quot; &quot;http://manu.sporny.org/i/public&quot;
+  }
+</ins><span class="diff"><ins class="diff-new">
+]
+</ins></span></pre><p><ins class="diff-new">
+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">
+takes
+on
+additional
+meaning
+when
+it
+is
+used
+along
+with
+other
+properties,
+or
+is
+used
+within
+an
+embedded
+JSON-LD
+object.
+In
+this
+case,
+the
+set
+of
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-new">
+subject
+definitions
+</ins></a>,<ins class="diff-new">
+or
+</ins><a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference"><ins class="diff-new">
+subject
+references
+</ins></a><ins class="diff-new">
+contained
+within
+a
+</ins><code><ins class="diff-new">
+@graph
+</ins></code><ins class="diff-new">
+is
+given
+a
+</ins><em><ins class="diff-new">
+name
+</ins></em>,<ins class="diff-new">
+based
+on
+the
+label
+of
+the
+JSON-LD
+object
+containing
+a
+</ins><code><ins class="diff-new">
+@graph
+</ins></code><ins class="diff-new">
+property,
+either
+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
+an
+</ins><a class="tref internalDFN" title="unlabeled_node" href="#dfn-unlabeled_node"><ins class="diff-new">
+unlabeled
+node
+</ins></a>.<ins class="diff-new">
+This
+allows
+statements
+to
+be
+made
+about
+an
+entire
+</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-new">
+linked
+data
+graph
+</ins></a>,<ins class="diff-new">
+rather
+than
+just
+a
+single
+JSON-LD
+object.
+</ins></p>  <pre class="example">{<ins class="diff-new">
+  &quot;@context&quot;: ...,
+</ins>  <span class="diff">&quot;@id&quot;: &quot;http://example.org/linked-data-graph&quot;,<ins class="diff-new">
+  &quot;asOf&quot;: { &quot;@value&quot;: &quot;2012-04-09&quot;, &quot;@type&quot;: &quot;xsd:date&quot; },
+  &quot;@graph&quot;:</span>
+  [
+    {
+      &quot;@id&quot;: &quot;http://manu.sporny.org/i/public&quot;,
+      &quot;@type&quot;: &quot;foaf:Person&quot;,
+      &quot;name&quot;: &quot;Manu Sporny&quot;,
+      &quot;knows&quot; &quot;http://greggkellogg.net/foaf#me&quot;
+    },
+    {
+      &quot;@id&quot;: &quot;http://greggkellogg.net/foaf#me&quot;,
+      &quot;@type&quot;: &quot;foaf:Person&quot;,
+      &quot;name&quot;: &quot;Gregg Kellogg&quot;,
+      &quot;knows&quot; &quot;http://manu.sporny.org/i/public&quot;
+    },
+    &quot;http://www.markus-lanthaler.com/&quot;
+  ]
+}
+</ins></pre><p><ins class="diff-new">
+This
+example
+says
+that
+there
+is
+a
+</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-new">
+linked
+data
+graph
+</ins></a><ins class="diff-new">
+identified
+by
+</ins><code><ins class="diff-new">
+http://example.org/linked-data-graph
+</ins></code><ins class="diff-new">
+which
+is
+composed
+of
+the
+statements
+about
+Manu
+and
+Gregg
+and
+a
+reference
+to
+another
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr>,<ins class="diff-new">
+which
+could
+make
+statements
+about
+Markus.
+Additionally,
+there
+is
+information
+about
+the
+graph
+itself,
+which
+indicates
+a
+time
+at
+which
+this
+information
+as
+asserted
+to
+be
+true.
+</ins></p></div>
+<div id="identifying-unlabeled-nodes" class="section">
+<h3>
+<span class="secno">
+4.10
+</span>
+Identifying
+Unlabeled
+Nodes
+</h3>
+<p>
+At
+times,
+it
+becomes
+necessary
+to
+be
+able
+to
+express
+information
+without
+being
+able
+to
+specify
+the
+subject.
+Typically,
+this
+type
+of
+node
+is
+called
+an
+<a class="tref internalDFN" title="unlabeled_node" href="#dfn-unlabeled_node">
+unlabeled
+node
+</a>
+or
+a
+blank
+node.
+In
+JSON-LD,
+<a class="tref internalDFN" title="unlabeled_node" href="#dfn-unlabeled_node">
+unlabeled
+node
+</a>
+identifiers
+are
+automatically
+created
+if
+a
+subject
+is
+not
+specified
+using
+the
+<code>
+@id
+</code>
+<del class="diff-old">keyword.
+</del>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+<ins class="diff-chg">keyword
+</ins></a>.
+However,
+authors
+may
+provide
+identifiers
+for
+unlabeled
+nodes
+by
+using
+the
+special
+<code>
+_
+</code>
+(underscore)
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>.
+This
+allows
+to
+reference
+the
+node
+locally
+within
+the
+document
+but
+not
+in
+an
+external
+document.
+</p>
+<del class="diff-old">{
+...
+  &quot;@id&quot;: &quot;&quot;,
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">...
+  &quot;@id&quot;: &quot;<span class="diff">_:foo</span>&quot;,
+...
+</ins>
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+subject
+to
+<code>
+_:foo
+</code>,
+which
+can
+then
+be
+used
+later
+on
+in
+the
+JSON-LD
+markup
+to
+refer
+back
+to
+the
+<a class="tref internalDFN" title="unlabeled_node" href="#dfn-unlabeled_node">
+unlabeled
+<del class="diff-old">node.
+</del>
+<ins class="diff-chg">node
+</ins></a>.
+This
+practice,
+however,
+is
+usually
+frowned
+upon
+when
+generating
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>.
+If
+a
+developer
+finds
+that
+they
+refer
+to
+the
+unlabeled
+node
+more
+than
+once,
+they
+should
+consider
+naming
+the
+node
+using
+a
+<del class="diff-old">resolve-able
+</del>
+<ins class="diff-chg">de-referenceable
+</ins>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+</p>
+</div>
+<div id="aliasing-keywords" class="section">
+<h3>
+<span class="secno">
+4.11
+</span>
+Aliasing
+Keywords
+</h3>
+<p>
+JSON-LD
+allows
+all
+of
+the
+syntax
+<del class="diff-old">keywords,
+</del>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+<ins class="diff-chg">keywords
+</ins></a>,
+except
+for
+<code>
+@context
+</code>,
+to
+be
+aliased.
+This
+feature
+allows
+more
+legacy
+JSON
+content
+to
+be
+supported
+by
+JSON-LD.
+It
+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">{
+  &quot;@context&quot;:
+  {
+     ,
+     ,
+     &quot;name&quot;: &quot;http://schema.org/name&quot;
+  },
+  &quot;url&quot;: &quot;http://example.com/about#gregg&quot;,
+  &quot;a&quot;: &quot;http://schema.org/Person&quot;,
+  &quot;name&quot;: &quot;Gregg Kellogg&quot;
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+</ins>     <span class="diff">&quot;url&quot;: &quot;@id&quot;</span>,     <span class="diff">&quot;a&quot;: &quot;@type&quot;</span>,<ins class="diff-chg">
+     &quot;name&quot;: &quot;http://schema.org/name&quot;
+  },
+  &quot;url&quot;: &quot;http://example.com/about#gregg&quot;,
+  &quot;a&quot;: &quot;http://schema.org/Person&quot;,
+  &quot;name&quot;: &quot;Gregg Kellogg&quot;
+</ins>
+}
+</pre>
+<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>
+</div>
+<div id="expansion" class="section">
+<h3>
+<span class="secno">
+4.12
+</span>
+Expansion
+</h3>
+<p>
+The
+JSON-LD
+API
+[
+<cite>
+<a class="bibref" rel="biblioentry" 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
+context
+such
+that
+all
+<del class="diff-old">IRI
+,
+</del>
+<ins class="diff-chg">IRIs,
+</ins>
+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
+<a href="#framing">
+Framing
+</a>.
+</p>
+<p>
+For
+example,
+assume
+the
+following
+JSON-LD
+input
+document:
+</p>
+<del class="diff-old">{
+   &quot;@context&quot;:
+   {
+      &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+      &quot;homepage&quot;: {
+        &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+        &quot;@type&quot;, &quot;@id&quot;
+      }
+   },
+   &quot;name&quot;: &quot;Manu Sporny&quot;,
+   &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;
+</del>
+<pre class="example">{
+<ins class="diff-chg">   &quot;@context&quot;:
+   {
+      &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+      &quot;homepage&quot;: {
+        &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+        &quot;@type&quot;, &quot;@id&quot;
+      }
+   },
+   &quot;name&quot;: &quot;Manu Sporny&quot;,
+   &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;
+</ins>
+}
+</pre>
+<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">{
+   &quot;http://xmlns.com/foaf/0.1/name&quot;: &quot;Manu Sporny&quot;,
+   &quot;http://xmlns.com/foaf/0.1/homepage&quot;: {
+      &quot;@id&quot;: &quot;http://manu.sporny.org/&quot;
+   }
+}
+</del>
+<pre class="example">[
+<ins class="diff-chg">  {
+    &quot;http://xmlns.com/foaf/0.1/name&quot;: [ &quot;Manu Sporny&quot; ],
+    &quot;http://xmlns.com/foaf/0.1/homepage&quot;: [
+      {
+       &quot;@id&quot;: &quot;http://manu.sporny.org/&quot;
+      }
+    ]
+  }
+]
+</ins>
+</pre>
+</div>
+<div id="compaction" class="section">
+<h3>
+<span class="secno">
+4.13
+</span>
+Compaction
+</h3>
+<p>
+The
+JSON-LD
+API
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-JSON-LD-API">
+JSON-LD-API
+</a>
+</cite>
+]
+defines
+<del class="diff-old">an
+</del>
+<ins class="diff-chg">a
+</ins>
+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">{
+  &quot;http://xmlns.com/foaf/0.1/name&quot;: &quot;Manu Sporny&quot;,
+  &quot;http://xmlns.com/foaf/0.1/homepage&quot;: {
+    &quot;@id&quot;: &quot;http://manu.sporny.org/&quot;
+  }
+}
+</del>
+<pre class="example">[
+<ins class="diff-chg">  {
+    &quot;http://xmlns.com/foaf/0.1/name&quot;: [ &quot;Manu Sporny&quot; ],
+    &quot;http://xmlns.com/foaf/0.1/homepage&quot;: [
+      {
+       &quot;@id&quot;: &quot;http://manu.sporny.org/&quot;
+      }
+    ]
+  }
+]
+</ins>
+</pre>
+<p>
+Additionally,
+assume
+the
+following
+developer-supplied
+JSON-LD
+context:
+</p>
+<del class="diff-old">{
+  &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+  &quot;homepage&quot;: {
+    &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+    &quot;@type&quot;: &quot;@id&quot;
+  }
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;: {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;homepage&quot;: {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  }
+</ins>
+}
+</pre>
+<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">{
+  &quot;@context&quot;: {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;homepage&quot;: {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  },
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;: {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;homepage&quot;: {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  },
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;
+</ins>
+}
+</pre>
+<p>
+The
+compaction
+algorithm
+also
+enables
+the
+developer
+to
+map
+any
+expanded
+format
+into
+an
+application-specific
+compacted
+format.
+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.
+</p>
+</div>
+<div id="framing" class="section">
+<h3>
+<span class="secno">
+4.14
+</span>
+Framing
+</h3>
+<p>
+The
+JSON-LD
+API
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-JSON-LD-API">
+JSON-LD-API
+</a>
+</cite>
+]
+defines
+an
+method
+for
+<em>
+framing
+</em>
+a
+JSON-LD
+document.
+This
+allows
+developers
+to
+query
+by
+example
+and
+force
+a
+specific
+tree
+layout
+to
+a
+JSON-LD
+document.
+</p>
+<p>
+A
+JSON-LD
+document
+is
+a
+representation
+of
+a
+directed
+graph.
+A
+single
+directed
+graph
+can
+have
+many
+different
+serializations,
+each
+expressing
+exactly
+the
+same
+information.
+Developers
+typically
+work
+with
+trees,
+represented
+as
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>
+s.
+While
+mapping
+a
+graph
+to
+a
+tree
+can
+be
+done,
+the
+layout
+of
+the
+end
+result
+must
+be
+specified
+in
+advance.
+A
+<dfn title="frame" id="dfn-frame">
+Frame
+</dfn>
+can
+be
+used
+by
+a
+developer
+on
+a
+JSON-LD
+document
+to
+specify
+a
+deterministic
+layout
+for
+a
+graph.
+</p>
+<p>
+Framing
+is
+the
+process
+of
+taking
+a
+JSON-LD
+document,
+which
+expresses
+a
+graph
+of
+information,
+and
+applying
+a
+specific
+graph
+layout
+(called
+a
+<a class="tref internalDFN" title="frame" href="#dfn-frame">
+Frame
+</a>
+).
+</p>
+<p>
+The
+JSON-LD
+document
+below
+expresses
+a
+library,
+a
+book
+and
+a
+chapter:
+</p>
+<del class="diff-old">{
+  &quot;@context&quot;: {
+    &quot;Book&quot;:         &quot;http://example.org/vocab#Book&quot;,
+    &quot;Chapter&quot;:      &quot;http://example.org/vocab#Chapter&quot;,
+    &quot;contains&quot;:     {
+      &quot;@id&quot;: &quot;http://example.org/vocab#contains&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+    &quot;creator&quot;:      &quot;http://purl.org/dc/terms/creator&quot;,
+    &quot;description&quot;:  &quot;http://purl.org/dc/terms/description&quot;,
+    &quot;Library&quot;:      &quot;http://example.org/vocab#Library&quot;,
+    &quot;title&quot;:        &quot;http://purl.org/dc/terms/title&quot;
+  },
+  &quot;@id&quot;:
+  [{
+    &quot;@id&quot;: &quot;http://example.com/library&quot;,
+    &quot;@type&quot;: &quot;Library&quot;,
+    &quot;contains&quot;: &quot;http://example.org/library/the-republic&quot;
+  },
+  {
+    &quot;@id&quot;: &quot;http://example.org/library/the-republic&quot;,
+    &quot;@type&quot;: &quot;Book&quot;,
+    &quot;creator&quot;: &quot;Plato&quot;,
+    &quot;title&quot;: &quot;The Republic&quot;,
+    &quot;contains&quot;: &quot;http://example.org/library/the-republic#introduction&quot;
+  },
+  {
+    &quot;@id&quot;: &quot;http://example.org/library/the-republic#introduction&quot;,
+    &quot;@type&quot;: &quot;Chapter&quot;,
+    &quot;description&quot;: &quot;An introductory chapter on The Republic.&quot;,
+    &quot;title&quot;: &quot;The Introduction&quot;
+  }]
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;: {
+    &quot;Book&quot;:         &quot;http://example.org/vocab#Book&quot;,
+    &quot;Chapter&quot;:      &quot;http://example.org/vocab#Chapter&quot;,
+    &quot;contains&quot;:     {
+      &quot;@id&quot;: &quot;http://example.org/vocab#contains&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+    &quot;creator&quot;:      &quot;http://purl.org/dc/terms/creator&quot;,
+    &quot;description&quot;:  &quot;http://purl.org/dc/terms/description&quot;,
+    &quot;Library&quot;:      &quot;http://example.org/vocab#Library&quot;,
+    &quot;title&quot;:        &quot;http://purl.org/dc/terms/title&quot;
+  },
+  &quot;@graph&quot;:
+  [{
+    &quot;@id&quot;: &quot;http://example.com/library&quot;,
+    &quot;@type&quot;: &quot;Library&quot;,
+    &quot;contains&quot;: &quot;http://example.org/library/the-republic&quot;
+  },
+  {
+    &quot;@id&quot;: &quot;http://example.org/library/the-republic&quot;,
+    &quot;@type&quot;: &quot;Book&quot;,
+    &quot;creator&quot;: &quot;Plato&quot;,
+    &quot;title&quot;: &quot;The Republic&quot;,
+    &quot;contains&quot;: &quot;http://example.org/library/the-republic#introduction&quot;
+  },
+  {
+    &quot;@id&quot;: &quot;http://example.org/library/the-republic#introduction&quot;,
+    &quot;@type&quot;: &quot;Chapter&quot;,
+    &quot;description&quot;: &quot;An introductory chapter on The Republic.&quot;,
+    &quot;title&quot;: &quot;The Introduction&quot;
+  }]
+</ins>
+}
+</pre>
+<p>
+Developers
+typically
+like
+to
+operate
+on
+items
+in
+a
+hierarchical,
+tree-based
+fashion.
+Ideally,
+a
+developer
+would
+want
+the
+data
+above
+sorted
+into
+top-level
+libraries,
+then
+the
+books
+that
+are
+contained
+in
+each
+library,
+and
+then
+the
+chapters
+contained
+in
+each
+book.
+To
+achieve
+that
+layout,
+the
+developer
+can
+define
+the
+following
+<a class="tref internalDFN" title="frame" href="#dfn-frame">
+frame
+</a>:
+</p>
+<del class="diff-old">{
+  &quot;@context&quot;: {
+    &quot;Book&quot;:         &quot;http://example.org/vocab#Book&quot;,
+    &quot;Chapter&quot;:      &quot;http://example.org/vocab#Chapter&quot;,
+    &quot;contains&quot;:     &quot;http://example.org/vocab#contains&quot;,
+    &quot;creator&quot;:      &quot;http://purl.org/dc/terms/creator&quot;
+    &quot;description&quot;:  &quot;http://purl.org/dc/terms/description&quot;
+    &quot;Library&quot;:      &quot;http://example.org/vocab#Library&quot;,
+    &quot;title&quot;:        &quot;http://purl.org/dc/terms/title&quot;
+  },
+  &quot;@type&quot;: &quot;Library&quot;,
+  &quot;contains&quot;: {
+    &quot;@type&quot;: &quot;Book&quot;,
+    &quot;contains&quot;: {
+      &quot;@type&quot;: &quot;Chapter&quot;
+    }
+  }
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;: {
+    &quot;Book&quot;:         &quot;http://example.org/vocab#Book&quot;,
+    &quot;Chapter&quot;:      &quot;http://example.org/vocab#Chapter&quot;,
+    &quot;contains&quot;:     &quot;http://example.org/vocab#contains&quot;,
+    &quot;creator&quot;:      &quot;http://purl.org/dc/terms/creator&quot;,
+    &quot;description&quot;:  &quot;http://purl.org/dc/terms/description&quot;,
+    &quot;Library&quot;:      &quot;http://example.org/vocab#Library&quot;,
+    &quot;title&quot;:        &quot;http://purl.org/dc/terms/title&quot;
+  },
+  &quot;@type&quot;: &quot;Library&quot;,
+  &quot;contains&quot;: {
+    &quot;@type&quot;: &quot;Book&quot;,
+    &quot;contains&quot;: {
+      &quot;@type&quot;: &quot;Chapter&quot;
+    }
+  }
+</ins>
+}
+</pre>
+<p>
+When
+the
+framing
+algorithm
+is
+run
+against
+the
+previously
+defined
+JSON-LD
+document,
+paired
+with
+the
+<a class="tref internalDFN" title="frame" href="#dfn-frame">
+frame
+</a>
+above,
+the
+following
+JSON-LD
+document
+is
+the
+end
+result:
+</p>
+<del class="diff-old">{
+  &quot;@context&quot;: {
+    &quot;Book&quot;:         &quot;http://example.org/vocab#Book&quot;,
+    &quot;Chapter&quot;:      &quot;http://example.org/vocab#Chapter&quot;,
+    &quot;contains&quot;:     &quot;http://example.org/vocab#contains&quot;,
+    &quot;creator&quot;:      &quot;http://purl.org/dc/terms/creator&quot;
+    &quot;description&quot;:  &quot;http://purl.org/dc/terms/description&quot;
+    &quot;Library&quot;:      &quot;http://example.org/vocab#Library&quot;,
+    &quot;title&quot;:        &quot;http://purl.org/dc/terms/title&quot;
+  },
+  &quot;@id&quot;: &quot;http://example.org/library&quot;,
+  &quot;@type&quot;: &quot;Library&quot;,
+  &quot;contains&quot;: {
+
+    &quot;@type&quot;: &quot;Book&quot;,
+
+
+    &quot;contains&quot;: {
+
+      &quot;@type&quot;: &quot;Chapter&quot;,
+
+
+    },
+  },
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;: {
+    &quot;Book&quot;:         &quot;http://example.org/vocab#Book&quot;,
+    &quot;Chapter&quot;:      &quot;http://example.org/vocab#Chapter&quot;,
+    &quot;contains&quot;:     &quot;http://example.org/vocab#contains&quot;,
+    &quot;creator&quot;:      &quot;http://purl.org/dc/terms/creator&quot;
+    &quot;description&quot;:  &quot;http://purl.org/dc/terms/description&quot;
+    &quot;Library&quot;:      &quot;http://example.org/vocab#Library&quot;,
+    &quot;title&quot;:        &quot;http://purl.org/dc/terms/title&quot;
+  },
+  &quot;@id&quot;: &quot;http://example.org/library&quot;,
+  &quot;@type&quot;: &quot;Library&quot;,
+  &quot;contains&quot;: {
+</ins>    <span class="diff">&quot;@id&quot;: &quot;http://example.org/library/the-republic&quot;,</span><ins class="diff-chg">
+    &quot;@type&quot;: &quot;Book&quot;,
+</ins>    <span class="diff">&quot;creator&quot;: &quot;Plato&quot;,</span>    <span class="diff">&quot;title&quot;: &quot;The Republic&quot;,</span><ins class="diff-chg">
+    &quot;contains&quot;: {
+</ins>      <span class="diff">&quot;@id&quot;: &quot;http://example.org/library/the-republic#introduction&quot;,</span><ins class="diff-chg">
+      &quot;@type&quot;: &quot;Chapter&quot;,
+</ins>      <span class="diff">&quot;description&quot;: &quot;An introductory chapter on The Republic.&quot;,</span>      <span class="diff">&quot;title&quot;: &quot;The Introduction&quot;</span><ins class="diff-chg">
+    },
+  },
+</ins>
+}
+</pre>
+<div id="framing-operators" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">4.15
+</del>
+<ins class="diff-chg">4.14.1
+</ins>
+</span>
+<del class="diff-old">Normalization
+</del>
+<ins class="diff-chg">Framing
+Operators
+</ins></h4>
+<p>
+<del class="diff-old">The
+JSON-LD
+API
+[
+JSON-LD-API
+</del>
+<ins class="diff-chg">A
+</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-chg">
+frame
+</ins>
+</a>
+<del class="diff-old">]
+defines
+an
+method
+for
+normalizing
+a
+JSON-LD
+document.
+Normalization
+</del>
+is
+<del class="diff-old">the
+process
+of
+performing
+a
+deterministic
+transformation
+on
+</del>
+a
+JSON-LD
+document
+<del class="diff-old">resulting
+in
+a
+normalized
+representation.
+Normalization
+is
+useful
+when
+comparing
+two
+graphs
+</del>
+<ins class="diff-chg">with
+some
+extra
+syntactic
+elements
+used
+to
+match
+</ins>
+against
+<del class="diff-old">one
+another,
+when
+generating
+a
+detailed
+list
+</del>
+<ins class="diff-chg">parts
+</ins>
+of
+<del class="diff-old">differences
+between
+two
+graphs,
+and
+when
+generating
+a
+cryptographic
+digital
+signature
+for
+information
+contained
+in
+</del>
+<ins class="diff-chg">an
+input
+document.
+These
+operators
+work
+by
+matching
+on
+elements
+of
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-chg">
+subject
+definitions
+</ins></a><ins class="diff-chg">
+comprising
+the
+document.
+</ins></p><dl><dt><ins class="diff-chg">
+Type
+Matching
+</ins></dt><dd><ins class="diff-chg">
+A
+</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-chg">
+frame
+</ins></a><ins class="diff-chg">
+including
+</ins>
+a
+<del class="diff-old">graph
+</del>
+<code>
+<ins class="diff-chg">@type
+</ins></code><ins class="diff-chg">
+with
+one
+</ins>
+or
+<del class="diff-old">when
+generating
+</del>
+<ins class="diff-chg">more
+values
+matches
+any
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-chg">
+subject
+definition
+</ins></a><ins class="diff-chg">
+having
+</ins>
+a
+<del class="diff-old">hash
+of
+</del>
+<code>
+<ins class="diff-chg">@type
+</ins></code><ins class="diff-chg">
+property
+that
+includes
+</ins>
+the
+<del class="diff-old">information
+contained
+in
+</del>
+<ins class="diff-chg">specified
+type.
+</ins></dd><dt><ins class="diff-chg">
+Type
+Wildcard
+</ins></dt><dd><ins class="diff-chg">
+A
+</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-chg">
+frame
+</ins></a><ins class="diff-chg">
+including
+</ins>
+a
+<del class="diff-old">graph.
+The
+example
+below
+is
+</del>
+<code>
+<ins class="diff-chg">@type
+</ins></code><ins class="diff-chg">
+having
+only
+</ins>
+an
+<del class="diff-old">un-normalized
+JSON-LD
+document:
+{
+  &quot;@context&quot;: {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;homepage&quot;: {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;
+  },
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;
+}
+The
+example
+below
+is
+the
+normalized
+form
+of
+the
+JSON-LD
+document
+above:
+[{
+  &quot;@id&quot;: &quot;_:c14n0&quot;,
+  &quot;http://xmlns.com/foaf/0.1/homepage&quot;: {
+    &quot;@id&quot;: &quot;http://manu.sporny.org/&quot;
+  },
+  &quot;http://xmlns.com/foaf/0.1/name&quot;: &quot;Manu Sporny&quot;
+}]
+Notice
+how
+all
+of
+the
+term
+</del>
+<ins class="diff-chg">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">s
+have
+been
+expanded
+and
+sorted
+in
+alphabetical
+order.
+Also,
+notice
+how
+the
+</del>
+<ins class="diff-chg">matches
+any
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">
+subject
+<ins class="diff-new">definition
+</ins>
+</a>
+<del class="diff-old">has
+been
+labeled
+</del>
+<ins class="diff-chg">having
+a
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+property
+</ins>
+with
+<ins class="diff-new">any
+value.
+</ins></dd><dt><ins class="diff-new">
+Duck
+Typing
+</ins></dt><dd><ins class="diff-new">
+A
+</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-new">
+frame
+</ins></a><ins class="diff-new">
+without
+</ins>
+a
+<del class="diff-old">named
+unlabeled
+node
+.
+Normalization
+ensures
+that
+</del>
+<code>
+<ins class="diff-chg">@type
+</ins></code><ins class="diff-chg">
+definition
+but
+with
+other
+non-
+</ins><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-chg">
+keyword
+</ins></a><ins class="diff-chg">
+property
+definitions
+matches
+</ins>
+any
+<del class="diff-old">arbitrary
+graph
+containing
+exactly
+</del>
+<a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">
+<ins class="diff-chg">subject
+definition
+</ins></a><ins class="diff-chg">
+having
+at
+least
+</ins>
+the
+same
+<del class="diff-old">information
+would
+</del>
+<ins class="diff-chg">set
+of
+properties.
+</ins></dd><dt><ins class="diff-chg">
+Embedding
+</ins></dt><dd><ins class="diff-chg">
+A
+</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-chg">
+frame
+</ins></a><ins class="diff-chg">
+including
+a
+property
+which
+references
+another
+</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-chg">
+frame
+</ins></a><ins class="diff-chg">
+causes
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-chg">
+subject
+definitions
+</ins></a><ins class="diff-chg">
+containing
+that
+property
+and
+referencing
+either
+other
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-chg">
+subject
+definitions
+</ins></a><ins class="diff-chg">
+or
+</ins><a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference"><ins class="diff-chg">
+subject
+references
+</ins></a><ins class="diff-chg">
+to
+embed
+</ins><a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition"><ins class="diff-chg">
+subject
+definitions
+</ins></a><ins class="diff-chg">
+matching
+the
+embed
+</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-chg">
+frame
+</ins></a><ins class="diff-chg">
+to
+</ins>
+be
+<del class="diff-old">normalized
+</del>
+<ins class="diff-chg">defined
+within
+that
+property.
+</ins><a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference"><ins class="diff-chg">
+Subject
+references
+</ins></a><ins class="diff-chg">
+that
+don't
+match
+the
+embed
+</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-chg">
+frame
+</ins></a><ins class="diff-chg">
+are
+dropped.
+</ins></dd></dl><p><ins class="diff-chg">
+The
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-JSON-LD-API"><ins class="diff-chg">
+JSON-LD-API
+</ins></a></cite><ins class="diff-chg">
+]
+describes
+other
+flags
+and
+</ins><a class="tref internalDFN" title="keyword" href="#dfn-keyword"><ins class="diff-chg">
+keywords
+</ins></a><ins class="diff-chg">
+that
+are
+used
+</ins>
+to
+<del class="diff-old">exactly
+</del>
+<ins class="diff-chg">gain
+even
+more
+control
+over
+</ins>
+the
+<del class="diff-old">same
+form
+shown
+above.
+</del>
+<ins class="diff-chg">framed
+output.
+</ins>
+</p>
+</div>
+</div>
+</div>
+<div class="appendix informative section" id="markup-examples">
+<h2>
+<span class="secno">
+A.
+</span>
+Markup
+Examples
+</h2>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+JSON-LD
+is
+a
+specification
+for
+representing
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>
+in
+JSON.
+A
+common
+way
+of
+working
+with
+Linked
+Data
+is
+through
+<dfn title="rdf" id="dfn-rdf">
+RDF
+</dfn>,
+the
+Resource
+Description
+Framework.
+RDF
+can
+be
+expressed
+using
+JSON-LD
+by
+associating
+JSON-LD
+concepts
+such
+as
+<code>
+@id
+</code>
+and
+<code>
+@type
+</code>
+with
+the
+equivalent
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+s
+in
+RDF.
+Further
+information
+about
+RDF
+may
+be
+found
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDF-PRIMER">
+RDF-PRIMER
+</a>
+</cite>
+].
+</p>
+<p>
+The
+JSON-LD
+markup
+examples
+below
+demonstrate
+how
+JSON-LD
+can
+be
+used
+to
+express
+semantic
+data
+marked
+up
+in
+other
+languages
+such
+as
+Turtle,
+RDFa,
+Microformats,
+and
+Microdata.
+These
+sections
+are
+merely
+provided
+as
+proof
+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.
+Details
+of
+transforming
+JSON-LD
+into
+RDF
+are
+defined
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-JSON-LD-API">
+JSON-LD-API
+</a>
+</cite>
+].
+</p>
+<div id="turtle" class="section">
+<h3>
+<span class="secno">
+A.1
+</span>
+Turtle
+</h3>
+<p>
+The
+following
+are
+examples
+of
+representing
+<a class="tref internalDFN" title="rdf" href="#dfn-rdf">
+RDF
+</a>
+as
+expressed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-TURTLE">
+TURTLE
+</a>
+</cite>
+]
+into
+JSON-LD.
+</p>
+<div id="prefix-definitions" class="section">
+<h4>
+<span class="secno">
+A.1.1
+</span>
+Prefix
+definitions
+</h4>
+<p>
+The
+JSON-LD
+context
+has
+direct
+equivalents
+for
+the
+Turtle
+<code>
+@prefix
+</code>
+declaration:
+</p>
+<del class="diff-old">@prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt; .
+
+&lt;http://manu.sporny.org/i/public&gt; a foaf:Person;
+  foaf:name &quot;Manu Sporny&quot;;
+</del>
+<pre class="example">@prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt; .
+<ins class="diff-chg">&lt;http://manu.sporny.org/i/public&gt; a foaf:Person;
+  foaf:name &quot;Manu Sporny&quot;;
+</ins>
+foaf:homepage
+&lt;http://manu.sporny.org/&gt;
+.
+</pre>
+<del class="diff-old">{
+  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;
+  },
+  &quot;@id&quot;: &quot;http://manu.sporny.org/i/public&quot;,
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Manu Sporny&quot;,
+  &quot;foaf:homepage&quot;: { &quot;@id&quot;: &quot;http://manu.sporny.org/&quot; }
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;
+  },
+  &quot;@id&quot;: &quot;http://manu.sporny.org/i/public&quot;,
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Manu Sporny&quot;,
+  &quot;foaf:homepage&quot;: { &quot;@id&quot;: &quot;http://manu.sporny.org/&quot; }
+</ins>
+}
+</pre>
+<div class="note">
+<p>
+JSON-LD
+has
+no
+equivalent
+for
+the
+Turtle
+<code>
+@base
+</code>
+declaration.
+Authors
+could,
+of
+course,
+use
+a
+prefix
+definition
+to
+resolve
+<a class="tref internalDFN" title="relative_iri" href="#dfn-relative_iri">
+relative
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+s.
+For
+example,
+an
+empty
+prefix
+could
+be
+used
+to
+get
+a
+similar
+effect
+to
+<code>
+@base
+</code>:
+</p>
+<del class="diff-old">{
+  &quot;@context&quot;:
+  {
+
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;
+  },
+  &quot;@id&quot;: ,
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Manu Sporny&quot;,
+  &quot;foaf:homepage&quot;: { &quot;@id&quot;: }
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+</ins>    <span class="diff">&quot;&quot;: &quot;http://manu.sporny.org/&quot;,</span><ins class="diff-chg">
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;
+  },
+  &quot;@id&quot;: <span class="diff">&quot;:i/public&quot;</span>,
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Manu Sporny&quot;,
+  &quot;foaf:homepage&quot;: { &quot;@id&quot;: <span class="diff">&quot;:&quot; </span>}
+</ins>
+}
+</pre>
+</div>
+</div>
+<div id="embedding-1" class="section">
+<h4>
+<span class="secno">
+A.1.2
+</span>
+Embedding
+</h4>
+<p>
+Both
+Turtle
+and
+JSON-LD
+allow
+embedding
+of
+objects,
+although
+Turtle
+only
+allows
+embedding
+of
+objects
+which
+use
+unlabeled
+node
+identifiers.
+</p>
+</div>
+<del class="diff-old">@prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt; .
+
+&lt;http://manu.sporny.org/i/public&gt;
+  a foaf:Person;
+  foaf:name &quot;Manu Sporny&quot;;
+</del>
+<pre class="example">@prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt; .
+<ins class="diff-chg">&lt;http://manu.sporny.org/i/public&gt;
+  a foaf:Person;
+  foaf:name &quot;Manu Sporny&quot;;
+</ins>
+foaf:knows
+[
+a
+foaf:Person;
+foaf:name
+&quot;Gregg
+Kellogg&quot;
+]
+.
+</pre>
+<del class="diff-old">{
+  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;
+  },
+  &quot;@id&quot;: &quot;http://manu.sporny.org/i/public&quot;,
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Manu Sporny&quot;,
+  &quot;foaf:knows&quot;:
+  {
+    &quot;@type&quot;: &quot;foaf:Person&quot;,
+    &quot;foaf:name&quot;: &quot;Gregg Kellogg&quot;
+  }
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;
+  },
+  &quot;@id&quot;: &quot;http://manu.sporny.org/i/public&quot;,
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Manu Sporny&quot;,
+  &quot;foaf:knows&quot;:
+  {
+    &quot;@type&quot;: &quot;foaf:Person&quot;,
+    &quot;foaf:name&quot;: &quot;Gregg Kellogg&quot;
+  }
+</ins>
+}
+</pre>
+<div id="lists" class="section">
+<h4>
+<span class="secno">
+A.1.3
+</span>
+Lists
+</h4>
+<p>
+Both
+JSON-LD
+and
+Turtle
+can
+represent
+sequential
+lists
+of
+values.
+</p>
+<del class="diff-old">@prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt; .
+
+&lt;http://example.org/people#joebob&gt; a foaf:Person;
+  foaf:name &quot;Joe Bob&quot;;
+</del>
+<pre class="example">@prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt; .
+<ins class="diff-chg">&lt;http://example.org/people#joebob&gt; a foaf:Person;
+  foaf:name &quot;Joe Bob&quot;;
+</ins>
+foaf:nick
+(
+&quot;joe&quot;
+&quot;bob&quot;
+&quot;jaybee&quot;
+)
+.
+</pre>
+<del class="diff-old">{
+  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;
+  },
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Joe Bob&quot;,
+  &quot;foaf:nick&quot;:
+  {
+    &quot;@list&quot;: [ &quot;joe&quot;, &quot;bob&quot;, &quot;jaybe&quot; ]
+  }
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;
+  },
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Joe Bob&quot;,
+  &quot;foaf:nick&quot;:
+  {
+    &quot;@list&quot;: [ &quot;joe&quot;, &quot;bob&quot;, &quot;jaybe&quot; ]
+  }
+</ins>
+}
+</pre>
+</div>
+</div>
+<div id="rdfa" class="section">
+<h3>
+<span class="secno">
+A.2
+</span>
+RDFa
+</h3>
+<p>
+The
+following
+example
+describes
+three
+people
+with
+their
+respective
+names
+and
+homepages.
+</p>
+<del class="diff-old">&gt;
+   &lt;ul&gt;
+      &lt;li &gt;
+        &lt;a &gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li &gt;
+        &lt;a &gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li &gt;
+        &lt;a &gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+</del>
+<pre class="example">&lt;div <span class="diff">prefix=&quot;foaf: http://xmlns.com/foaf/0.1/&quot;</span>&gt;
+<ins class="diff-chg">   &lt;ul&gt;
+      &lt;li <span class="diff">typeof=&quot;foaf:Person&quot;</span>&gt;
+        &lt;a <span class="diff">rel=&quot;foaf:homepage&quot; href=&quot;http://example.com/bob/&quot; property=&quot;foaf:name&quot; </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof=&quot;foaf:Person&quot;</span>&gt;
+        &lt;a <span class="diff">rel=&quot;foaf:homepage&quot; href=&quot;http://example.com/eve/&quot; property=&quot;foaf:name&quot; </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof=&quot;foaf:Person&quot;</span>&gt;
+        &lt;a <span class="diff">rel=&quot;foaf:homepage&quot; href=&quot;http://example.com/manu/&quot; property=&quot;foaf:name&quot; </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+</ins>
+&lt;/div&gt;
+</pre>
+<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">The
+syntax
+to
+serialize
+multiple
+graphs
+is
+currently
+being
+discussed
+in
+Issue
+68
+.
+{
+  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;
+  },
+  &quot;@id&quot;:
+  [
+    {
+      &quot;@type&quot;: &quot;foaf:Person&quot;,
+      &quot;foaf:homepage&quot;: &quot;http://example.com/bob/&quot;,
+      &quot;foaf:name&quot;: &quot;Bob&quot;
+    },
+    {
+      &quot;@type&quot;: &quot;foaf:Person&quot;,
+      &quot;foaf:homepage&quot;: &quot;http://example.com/eve/&quot;,
+      &quot;foaf:name&quot;: &quot;Eve&quot;
+    },
+    {
+      &quot;@type&quot;: &quot;foaf:Person&quot;,
+      &quot;foaf:homepage&quot;: &quot;http://example.com/manu/&quot;,
+      &quot;foaf:name&quot;: &quot;Manu&quot;
+    }
+  ]
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;
+  },
+  &quot;@graph&quot;:
+  [
+    {
+      &quot;@type&quot;: &quot;foaf:Person&quot;,
+      &quot;foaf:homepage&quot;: &quot;http://example.com/bob/&quot;,
+      &quot;foaf:name&quot;: &quot;Bob&quot;
+    },
+    {
+      &quot;@type&quot;: &quot;foaf:Person&quot;,
+      &quot;foaf:homepage&quot;: &quot;http://example.com/eve/&quot;,
+      &quot;foaf:name&quot;: &quot;Eve&quot;
+    },
+    {
+      &quot;@type&quot;: &quot;foaf:Person&quot;,
+      &quot;foaf:homepage&quot;: &quot;http://example.com/manu/&quot;,
+      &quot;foaf:name&quot;: &quot;Manu&quot;
+    }
+  ]
+</ins>
+}
+</pre>
+</div>
+<div id="microformats" class="section">
+<h3>
+<span class="secno">
+A.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>
+<del class="diff-old">&lt;div class=&quot;vcard&quot;&gt;
+ &lt;a class=&quot;url fn&quot; href=&quot;http://www.markus-lanthaler.com/&quot;&gt;Markus Lanthaler&lt;/a&gt;
+</del>
+<pre class="example">&lt;div class=&quot;vcard&quot;&gt;
+<ins class="diff-chg"> &lt;a class=&quot;url fn&quot; href=&quot;http://www.markus-lanthaler.com/&quot;&gt;Markus Lanthaler&lt;/a&gt;
+</ins>
+&lt;/div&gt;
+</pre>
+<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">{
+  &quot;@context&quot;:
+  {
+    &quot;vcard&quot;: &quot;http://microformats.org/profile/hcard#vcard&quot;,
+    &quot;url&quot;:
+    {
+      &quot;@id&quot;: &quot;http://microformats.org/profile/hcard#url&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+    &quot;fn&quot;: &quot;http://microformats.org/profile/hcard#fn&quot;
+  },
+  &quot;@type&quot;: &quot;vcard&quot;,
+  &quot;url&quot;: &quot;http://www.markus-lanthaler.com/&quot;,
+  &quot;fn&quot;: &quot;Markus Lanthaler&quot;
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+    &quot;vcard&quot;: &quot;http://microformats.org/profile/hcard#vcard&quot;,
+    &quot;url&quot;:
+    {
+      &quot;@id&quot;: &quot;http://microformats.org/profile/hcard#url&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+    &quot;fn&quot;: &quot;http://microformats.org/profile/hcard#fn&quot;
+  },
+  &quot;@type&quot;: &quot;vcard&quot;,
+  &quot;url&quot;: &quot;http://www.markus-lanthaler.com/&quot;,
+  &quot;fn&quot;: &quot;Markus Lanthaler&quot;
+</ins>
+}
+</pre>
+</div>
+<div id="microdata" class="section">
+<h3>
+<span class="secno">
+A.4
+</span>
+Microdata
+</h3>
+<p>
+The
+microdata
+example
+below
+expresses
+book
+information
+as
+a
+microdata
+Work
+item.
+</p>
+<del class="diff-old">&lt;dl itemscope
+    itemtype=&quot;http://purl.org/vocab/frbr/core#Work&quot;
+    itemid=&quot;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&quot;&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop=&quot;http://purl.org/dc/terms/title&quot;&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop=&quot;http://purl.org/dc/terms/creator&quot;&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop=&quot;http://purl.org/vocab/frbr/core#realization&quot;
+     itemscope
+     itemtype=&quot;http://purl.org/vocab/frbr/core#Expression&quot;
+     itemid=&quot;http://purl.oreilly.com/products/9780596007683.BOOK&quot;&gt;
+  &lt;link itemprop=&quot;http://purl.org/dc/terms/type&quot; href=&quot;http://purl.oreilly.com/product-types/BOOK&quot;&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop=&quot;http://purl.org/vocab/frbr/core#realization&quot;
+     itemscope
+     itemtype=&quot;http://purl.org/vocab/frbr/core#Expression&quot;
+     itemid=&quot;http://purl.oreilly.com/products/9780596802189.EBOOK&quot;&gt;
+  &lt;link itemprop=&quot;http://purl.org/dc/terms/type&quot; href=&quot;http://purl.oreilly.com/product-types/EBOOK&quot;&gt;
+  Ebook
+ &lt;/dd&gt;
+</del>
+<pre class="example">&lt;dl itemscope
+<ins class="diff-chg">    itemtype=&quot;http://purl.org/vocab/frbr/core#Work&quot;
+    itemid=&quot;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&quot;&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop=&quot;http://purl.org/dc/terms/title&quot;&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop=&quot;http://purl.org/dc/terms/creator&quot;&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop=&quot;http://purl.org/vocab/frbr/core#realization&quot;
+     itemscope
+     itemtype=&quot;http://purl.org/vocab/frbr/core#Expression&quot;
+     itemid=&quot;http://purl.oreilly.com/products/9780596007683.BOOK&quot;&gt;
+  &lt;link itemprop=&quot;http://purl.org/dc/terms/type&quot; href=&quot;http://purl.oreilly.com/product-types/BOOK&quot;&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop=&quot;http://purl.org/vocab/frbr/core#realization&quot;
+     itemscope
+     itemtype=&quot;http://purl.org/vocab/frbr/core#Expression&quot;
+     itemid=&quot;http://purl.oreilly.com/products/9780596802189.EBOOK&quot;&gt;
+  &lt;link itemprop=&quot;http://purl.org/dc/terms/type&quot; href=&quot;http://purl.oreilly.com/product-types/EBOOK&quot;&gt;
+  Ebook
+ &lt;/dd&gt;
+</ins>
+&lt;/dl&gt;
+</pre>
+<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">[
+  {
+    &quot;@id&quot;: &quot;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&quot;,
+    &quot;@type&quot;: &quot;http://purl.org/vocab/frbr/core#Work&quot;,
+    &quot;http://purl.org/dc/terms/title&quot;: &quot;Just a Geek&quot;,
+    &quot;http://purl.org/dc/terms/creator&quot;: &quot;Whil Wheaton&quot;,
+    &quot;http://purl.org/vocab/frbr/core#realization&quot;:
+    [
+      &quot;http://purl.oreilly.com/products/9780596007683.BOOK&quot;,
+      &quot;http://purl.oreilly.com/products/9780596802189.EBOOK&quot;
+    ]
+  },
+  {
+    &quot;@id&quot;: &quot;http://purl.oreilly.com/products/9780596007683.BOOK&quot;,
+    &quot;@type&quot;: &quot;http://purl.org/vocab/frbr/core#Expression&quot;,
+    &quot;http://purl.org/dc/terms/type&quot;: &quot;http://purl.oreilly.com/product-types/BOOK&quot;
+  },
+  {
+    &quot;@id&quot;: &quot;http://purl.oreilly.com/products/9780596802189.EBOOK&quot;,
+    &quot;@type&quot;: &quot;http://purl.org/vocab/frbr/core#Expression&quot;,
+    &quot;http://purl.org/dc/terms/type&quot;: &quot;http://purl.oreilly.com/product-types/EBOOK&quot;
+  }
+</del>
+<pre class="example">[
+<ins class="diff-chg">  {
+    &quot;@id&quot;: &quot;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&quot;,
+    &quot;@type&quot;: &quot;http://purl.org/vocab/frbr/core#Work&quot;,
+    &quot;http://purl.org/dc/terms/title&quot;: &quot;Just a Geek&quot;,
+    &quot;http://purl.org/dc/terms/creator&quot;: &quot;Whil Wheaton&quot;,
+    &quot;http://purl.org/vocab/frbr/core#realization&quot;:
+    [
+      &quot;http://purl.oreilly.com/products/9780596007683.BOOK&quot;,
+      &quot;http://purl.oreilly.com/products/9780596802189.EBOOK&quot;
+    ]
+  },
+  {
+    &quot;@id&quot;: &quot;http://purl.oreilly.com/products/9780596007683.BOOK&quot;,
+    &quot;@type&quot;: &quot;http://purl.org/vocab/frbr/core#Expression&quot;,
+    &quot;http://purl.org/dc/terms/type&quot;: &quot;http://purl.oreilly.com/product-types/BOOK&quot;
+  },
+  {
+    &quot;@id&quot;: &quot;http://purl.oreilly.com/products/9780596802189.EBOOK&quot;,
+    &quot;@type&quot;: &quot;http://purl.org/vocab/frbr/core#Expression&quot;,
+    &quot;http://purl.org/dc/terms/type&quot;: &quot;http://purl.oreilly.com/product-types/EBOOK&quot;
+  }
+</ins>
+]
+</pre>
+</div>
+</div>
+<div class="appendix section" id="linked-data">
+<h2>
+<span class="secno">
+B.
+</span>
+Linked
+Data
+</h2>
+<p>
+The
+following
+definition
+for
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>
+is
+the
+one
+that
+will
+be
+used
+for
+this
+specification.
+</p>
+<ol>
+<li>
+<dfn title="linked_data" id="dfn-linked_data">
+Linked
+Data
+</dfn>
+is
+a
+set
+of
+documents,
+each
+containing
+a
+representation
+of
+a
+linked
+data
+graph.
+</li>
+<li>
+A
+<dfn title="linked_data_graph" id="dfn-linked_data_graph">
+linked
+data
+graph
+</dfn>
+is
+an
+unordered
+labeled
+directed
+graph,
+where
+nodes
+are
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>
+s
+or
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+s,
+and
+edges
+are
+properties.
+</li>
+<li>
+A
+<dfn title="subject" id="dfn-subject">
+subject
+</dfn>
+is
+any
+node
+in
+a
+<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
+linked
+data
+graph
+</a>
+with
+at
+least
+one
+outgoing
+edge.
+</li>
+<li>
+A
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</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>
+(an
+Internationalized
+Resource
+Identifier
+as
+described
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC3987">
+RFC3987
+</a>
+</cite>
+]).
+</li>
+<li>
+An
+<dfn title="object" id="dfn-object">
+object
+</dfn>
+is
+a
+node
+in
+a
+<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
+linked
+data
+graph
+</a>
+with
+at
+least
+one
+incoming
+edge.
+</li>
+<li>
+An
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+<em class="rfc2119" title="may">
+may
+</em>
+be
+labeled
+with
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+</li>
+<li>
+A
+node
+<em class="rfc2119" title="may">
+may
+</em>
+be
+a
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>
+and
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+at
+the
+same
+time.
+</li>
+<li>
+A
+<dfn title="property" id="dfn-property">
+property
+</dfn>
+is
+an
+edge
+of
+the
+<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
+linked
+data
+graph
+</a>.
+</li>
+<li>
+A
+<a class="tref internalDFN" title="property" href="#dfn-property">
+property
+</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>
+An
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+that
+is
+a
+label
+in
+a
+<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
+linked
+data
+graph
+</a>
+<em class="rfc2119" title="should">
+should
+</em>
+be
+dereferencable
+to
+a
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>
+document
+describing
+the
+labeled
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>,
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+or
+<a class="tref internalDFN" title="property" href="#dfn-property">
+property
+</a>.
+</li>
+<li>
+A
+<dfn title="value" id="dfn-value">
+value
+</dfn>
+is
+an
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+with
+a
+label
+that
+is
+not
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+</li>
+</ol>
+<p>
+Note
+that
+the
+definition
+for
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>
+above
+is
+silent
+on
+the
+topic
+of
+unlabeled
+nodes.
+Unlabeled
+nodes
+are
+not
+considered
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">
+Linked
+Data
+</a>.
+However,
+this
+specification
+allows
+for
+the
+expression
+of
+unlabled
+nodes,
+as
+most
+graph-based
+data
+sets
+on
+the
+Web
+contain
+a
+number
+of
+associated
+nodes
+that
+are
+not
+named
+and
+thus
+are
+not
+directly
+de-referenceable.
+</p>
+</div>
+<div class="appendix informative section" id="mashing-up-vocabularies">
+<h2>
+<span class="secno">
+C.
+</span>
+Mashing
+Up
+Vocabularies
+</h2>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+Developers
+benefit
+by
+being
+able
+to
+mash
+other
+<a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">
+vocabularies
+</a>
+into
+their
+JSON-LD
+markup.
+There
+are
+over
+200
+<a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">
+vocabularies
+</a>
+that
+are
+available
+for
+use
+on
+the
+Web
+today.
+Some
+of
+these
+<a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">
+vocabularies
+</a>
+include:
+</p>
+<ul>
+<li>
+RDF
+-
+for
+describing
+information
+about
+objects
+and
+concepts
+on
+the
+Web.
+</li>
+<li>
+RDFS
+-
+for
+expressing
+things
+like
+labels
+and
+comments.
+</li>
+<li>
+XSD
+-
+for
+specifying
+basic
+types
+like
+strings,
+integers,
+dates
+and
+times.
+</li>
+<li>
+Dublin
+Core
+-
+for
+describing
+creative
+works.
+</li>
+<li>
+FOAF
+-
+for
+describing
+social
+networks.
+</li>
+<li>
+Calendar
+-
+for
+specifying
+events.
+</li>
+<li>
+SIOC
+-
+for
+describing
+discussions
+on
+blogs
+and
+websites.
+</li>
+<li>
+CCrel
+-
+for
+describing
+Creative
+Commons
+and
+other
+types
+of
+licenses.
+</li>
+<li>
+GEO
+-
+for
+describing
+geographic
+location.
+</li>
+<li>
+VCard
+-
+for
+describing
+organizations
+and
+people.
+</li>
+<li>
+DOAP
+-
+for
+describing
+projects.
+</li>
+</ul>
+<p>
+You
+can
+use
+these
+<a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">
+vocabularies
+</a>
+in
+combination,
+like
+so:
+</p>
+<del class="diff-old">{
+  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;,
+    &quot;sioc&quot;: &quot;http://rdfs.org/sioc/ns#&quot;,
+    &quot;rdfs&quot;: &quot;http://www.w3.org/2000/01/rdf-schema#&quot;
+  },
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Manu Sporny&quot;,
+  &quot;foaf:homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;sioc:avatar&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;,
+  &quot;rdfs:comment&quot;: &quot;Likes puppies, unicorns and rainbows.&quot;
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;,<span class="diff">
+    &quot;sioc&quot;: &quot;http://rdfs.org/sioc/ns#&quot;,
+    &quot;rdfs&quot;: &quot;http://www.w3.org/2000/01/rdf-schema#&quot;</span>
+  },
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Manu Sporny&quot;,
+  &quot;foaf:homepage&quot;: &quot;http://manu.sporny.org/&quot;,<span class="diff">
+  &quot;sioc:avatar&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;,
+  &quot;rdfs:comment&quot;: &quot;Likes puppies, unicorns and rainbows.&quot;</span>
+</ins>
+}
+</pre>
+<p>
+Developers
+can
+also
+specify
+their
+own
+<a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">
+vocabulary
+</a>
+documents
+by
+modifying
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+in-line
+using
+the
+<code>
+@context
+</code>
+keyword,
+like
+so:
+</p>
+<del class="diff-old">{
+  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;,
+    &quot;sioc&quot;: &quot;http://rdfs.org/sioc/ns#&quot;,
+    &quot;rdfs&quot;: &quot;http://www.w3.org/2000/01/rdf-schema#&quot;,
+
+  },
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Manu Sporny&quot;,
+  &quot;foaf:homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;sioc:avatar&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;,
+  &quot;rdfs:comment&quot;: &quot;Likes puppies, unicorns and rainbows.&quot;
+
+</del>
+<pre class="example">{
+<ins class="diff-chg">  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;,
+    &quot;sioc&quot;: &quot;http://rdfs.org/sioc/ns#&quot;,
+    &quot;rdfs&quot;: &quot;http://www.w3.org/2000/01/rdf-schema#&quot;,
+</ins>    <span class="diff">&quot;myvocab&quot;: &quot;http://example.org/myvocab#&quot;</span><ins class="diff-chg">
+  },
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Manu Sporny&quot;,
+  &quot;foaf:homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;sioc:avatar&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;,
+  &quot;rdfs:comment&quot;: &quot;Likes puppies, unicorns and rainbows.&quot;
+</ins>  <span class="diff">&quot;myvocab:personality&quot;: &quot;friendly&quot;</span>
+}
+</pre>
+</div>
+<div class="appendix informative section" id="iana-considerations">
+<h2>
+<span class="secno">
+D.
+</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
+W3C
+Recommendation.
+</p>
+<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.
+<del class="diff-old">Valid
+values
+are
+</del>
+<ins class="diff-chg">The
+only
+valid
+value
+at
+the
+moment
+is
+</ins>
+<code>
+expanded
+<del class="diff-old">and
+normalized
+</del>
+</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
+<del class="diff-old">for
+</del>
+<ins class="diff-chg">in
+</ins>
+an
+HTTP
+<del class="diff-old">client,
+</del>
+<ins class="diff-chg">response,
+</ins>
+the
+form
+<em class="rfc2119" title="must not">
+must
+not
+</em>
+be
+assumed
+to
+take
+any
+particular
+form.
+</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
+&amp;
+email
+address
+to
+contact
+for
+further
+information:
+</dt>
+<dd>
+Manu
+Sporny
+&lt;msporny@digitalbazaar.com&gt;
+</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>
+W3C
+</dd>
+</dl>
+</div>
+<div class="appendix informative section" id="acknowledgements">
+<h2>
+<span class="secno">
+E.
+</span>
+Acknowledgements
+</h2>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+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,
+Dave
+Longley,
+Dave
+Lehn
+and
+Mike
+Johnson
+who
+reviewed,
+provided
+feedback,
+and
+performed
+several
+implementations
+of
+the
+specification,
+and
+Ian
+Davis,
+who
+created
+RDF/JSON.
+Thanks
+also
+to
+Nathan
+Rixham,
+Bradley
+P.
+Allen,
+Kingsley
+Idehen,
+Glenn
+McDonald,
+Alexandre
+Passant,
+Danny
+Ayers,
+Ted
+Thibodeau
+Jr.,
+Olivier
+Grisel,
+Niklas
+Lindström,
+Markus
+Lanthaler,
+and
+Richard
+Cyganiak
+for
+their
+input
+on
+the
+specification.
+</p>
+</div>
+<div id="references" class="appendix section">
+<h2>
+<span class="secno">
+F.
+</span>
+References
+</h2>
+<div id="normative-references" class="section">
+<h3>
+<span class="secno">
+F.1
+</span>
+Normative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-BCP47">
+[BCP47]
+</dt>
+<dd>
+A.
+Phillips,
+M.
+Davis.
+<del class="diff-old">&lt;a href="http://tools.ietf.org/rfc/bcp/
+</del>
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+<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/rfc/bcp/bcp47.txt"><ins class="diff-chg">
+http://tools.ietf.org/rfc/bcp/bcp47.txt
+</ins></a></dd><dt id="bib-JSON-LD-API"><ins class="diff-chg">
+[JSON-LD-API]
+</ins></dt><dd><ins class="diff-chg">
+Manu
+Sporny,
+Gregg
+Kellogg,
+Dave
+Longley,
+Markus
+Lanthaler,
+Eds.
+</ins><cite><a href="http://json-ld.org/spec/latest/json-ld-api/"><ins class="diff-chg">
+JSON-LD
+API
+</ins></a></cite><ins class="diff-chg">
+Latest.
+W3C
+Editor's
+Draft.
+URL:
+</ins><a href="http://json-ld.org/spec/latest/json-ld-api/"><ins class="diff-chg">
+http://json-ld.org/spec/latest/json-ld-api/
+</ins></a></dd><dt id="bib-RFC3987"><ins class="diff-chg">
+[RFC3987]
+</ins></dt><dd><ins class="diff-chg">
+M.
+Dürst;
+M.
+Suignard.
+</ins><a href="http://www.ietf.org/rfc/rfc3987.txt"><cite><ins class="diff-chg">
+Internationalized
+Resource
+Identifiers
+(IRIs).
+</ins></cite></a><ins class="diff-chg">
+January
+2005.
+Internet
+RFC
+3987.
+URL:
+</ins><a href="http://www.ietf.org/rfc/rfc3987.txt"><ins class="diff-chg">
+http://www.ietf.org/rfc/rfc3987.txt
+</ins></a></dd><dt id="bib-RFC4627"><ins class="diff-chg">
+[RFC4627]
+</ins></dt><dd><ins class="diff-chg">
+D.
+Crockford.
+</ins><a href="http://www.ietf.org/rfc/rfc4627.txt"><cite><ins class="diff-chg">
+The
+application/json
+Media
+Type
+for
+JavaScript
+Object
+Notation
+(JSON)
+</ins></cite></a><ins class="diff-chg">
+July
+2006.
+Internet
+RFC
+4627.
+URL:
+</ins><a href="http://www.ietf.org/rfc/rfc4627.txt"><ins class="diff-chg">
+http://www.ietf.org/rfc/rfc4627.txt
+</ins></a></dd><dt id="bib-RFC5988"><ins class="diff-chg">
+[RFC5988]
+</ins></dt><dd><ins class="diff-chg">
+M.
+Nottingham.
+</ins><a href="http://tools.ietf.org/rfc/rfc5988"><cite><ins class="diff-chg">
+Web
+Linking
+</ins></cite></a><ins class="diff-chg">
+October
+2010.
+IETF
+Standard.
+URL:
+</ins><a href="http://tools.ietf.org/rfc/rfc5988.txt"><ins class="diff-chg">
+http://tools.ietf.org/rfc/rfc5988.txt
+</ins></a></dd><dt id="bib-WEBIDL"><ins class="diff-chg">
+[WEBIDL]
+</ins></dt><dd><ins class="diff-chg">
+Cameron
+McCormack.
+</ins><a href="http://www.w3.org/TR/2011/WD-WebIDL-20110927/"><cite><ins class="diff-chg">
+Web
+IDL.
+</ins></cite></a><ins class="diff-chg">
+27
+September
+2011.
+W3C
+Working
+Draft.
+(Work
+in
+progress.)
+URL:
+</ins><a href="http://www.w3.org/TR/2011/WD
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20120426/index.html	Thu Apr 26 13:04:54 2012 +0200
@@ -0,0 +1,2853 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD Syntax 1.0</title>
+<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
+
+<!--
+  === 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>
+.diff { font-weight:bold; color:#0a3; }
+ol.algorithm.update { margin-left: 2em; }
+ol.algorithm.update>li { list-style-type: none; }
+ol.algorithm.update>li>span.list-number {
+  display:block;
+  float: left;
+  margin-left: -3.5em;
+}
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- 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;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- 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 {
+    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 {
+    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%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- 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;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+    }
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">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, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
+
+<body style="display: inherit;"><div class="head"><p></p><h1 id="title" class="title">JSON-LD Syntax 1.0</h1><h2 id="subtitle">A Context-based JSON Serialization for Linking Data</h2><h2 id="unofficial-draft-26-april-2012">Unofficial Draft 26 April 2012</h2><dl><dt>Editors:</dt><dd><a href="http://manu.sporny.org/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, <a href="http://kellogg-assoc.com/">Kellogg Associates</a></dd>
+<dd><a href="http://www.markus-lanthaler.com/">Markus Lanthaler</a>, <a href="http://www.tugraz.at/">Graz University of Technology</a></dd>
+<dt>Authors:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dd><a href="http://digitalbazaar.com/">Dave Longley</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, <a href="http://kellogg-assoc.com/">Kellogg Associates</a></dd>
+<dd><a href="http://www.markus-lanthaler.com/">Markus Lanthaler</a>, <a href="http://www.tugraz.at/">Graz University of Technology</a></dd>
+<dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
+</dl><p>This document is also available in this non-normative format: <a href="diff-20120318.html">diff to previous version</a>.</p><p class="copyright">This document is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/" class="subfoot">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
+<div id="abstract" class="introductory section"><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>
+</div><div class="introductory section" id="sotd"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
+<p>This document is an experimental work in progress.</p>
+
+<!--  <p>
+This document has been reviewed by W3C Members, by software
+developers, and by other W3C groups and interested parties, and is
+endorsed by the Director as a W3C Recommendation. It is a stable
+document and may be used as reference material or cited from another
+document. W3C's role in making the Recommendation is to draw attention
+to the specification and to promote its widespread deployment. This
+enhances the functionality and interoperability of the Web.
+</p>  -->
+
+</div><div id="toc" class="section"><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><li class="tocline"><a href="#syntax-tokens-and-keywords" class="tocxref"><span class="secno">1.2 </span>Syntax Tokens and Keywords</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.3 </span>Contributing</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="#basic-concepts" class="tocxref"><span class="secno">3. </span>Basic Concepts</a><ul class="toc"><li class="tocline"><a href="#linking-data" class="tocxref"><span class="secno">3.1 </span>Linking Data</a><ul class="toc"><li class="tocline"><a href="#the-context" class="tocxref"><span class="secno">3.1.1 </span>The Context</a></li><li class="tocline"><a href="#from-json-to-json-ld" class="tocxref"><span class="secno">3.1.2 </span>From JSON to JSON-LD</a></li></ul></li><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">3.2 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">3.3 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">3.4 </span>Specifying the Type</a></li><li class="tocline"><a href="#string-internationalization" class="tocxref"><span class="secno">3.5 </span>String Internationalization</a></li><li class="tocline"><a href="#sets-and-lists" class="tocxref"><span class="secno">3.6 </span>Sets and Lists</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">4. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#typed-values" class="tocxref"><span class="secno">4.1 </span>Typed Values</a></li><li class="tocline"><a href="#compact-iris" class="tocxref"><span class="secno">4.2 </span>Compact IRIs</a></li><li class="tocline"><a href="#external-contexts" class="tocxref"><span class="secno">4.3 </span>External Contexts</a></li><li class="tocline"><a href="#referencing-contexts-from-json-documents" class="tocxref"><span class="secno">4.4 </span>Referencing Contexts from JSON Documents</a></li><li class="tocline"><a href="#expanded-term-definition" class="tocxref"><span class="secno">4.5 </span>Expanded Term Definition</a></li><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">4.6 </span>Type Coercion</a></li><li class="tocline"><a href="#iri-expansion-within-a-context" class="tocxref"><span class="secno">4.7 </span><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion Within a Context</a></li><li class="tocline"><a href="#embedding" class="tocxref"><span class="secno">4.8 </span>Embedding</a></li><li class="tocline"><a href="#named-graphs" class="tocxref"><span class="secno">4.9 </span>Named Graphs</a></li><li class="tocline"><a href="#identifying-unlabeled-nodes" class="tocxref"><span class="secno">4.10 </span>Identifying Unlabeled Nodes</a></li><li class="tocline"><a href="#aliasing-keywords" class="tocxref"><span class="secno">4.11 </span>Aliasing Keywords</a></li><li class="tocline"><a href="#expansion" class="tocxref"><span class="secno">4.12 </span>Expansion</a></li><li class="tocline"><a href="#compaction" class="tocxref"><span class="secno">4.13 </span>Compaction</a></li><li class="tocline"><a href="#framing" class="tocxref"><span class="secno">4.14 </span>Framing</a><ul class="toc"><li class="tocline"><a href="#framing-operators" class="tocxref"><span class="secno">4.14.1 </span>Framing Operators</a></li></ul></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">A. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#turtle" class="tocxref"><span class="secno">A.1 </span>Turtle</a><ul class="toc"><li class="tocline"><a href="#prefix-definitions" class="tocxref"><span class="secno">A.1.1 </span>Prefix definitions</a></li><li class="tocline"><a href="#embedding-1" class="tocxref"><span class="secno">A.1.2 </span>Embedding</a></li><li class="tocline"><a href="#lists" class="tocxref"><span class="secno">A.1.3 </span>Lists</a></li></ul></li><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">A.2 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">A.3 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">A.4 </span>Microdata</a></li></ul></li><li class="tocline"><a href="#linked-data" class="tocxref"><span class="secno">B. </span>Linked Data</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">C. </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#iana-considerations" class="tocxref"><span class="secno">D. </span>IANA Considerations</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">E. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">F. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">F.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">F.2 </span>Informative references</a></li></ul></li></ul></div>
+
+
+
+<div class="informative section" id="introduction">
+
+<!-- OddPage -->
+<h2><span class="secno">1. </span>Introduction</h2><p><em>This section is non-normative.</em></p>
+
+<p>
+JSON, as specified in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>], is a simple language for representing
+data on the Web. <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a> is a technique for creating a graph of interlinked data across
+different
+documents or Web sites. Data entities are described using <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>s,
+which are typically dereferencable and thus may be used to find more
+information about an entity, creating a &quot;Web of Knowledge&quot;. JSON-LD is intended to be a simple
+publishing method for expressing not only Linked Data in JSON, but also for adding
+semantics to existing JSON.
+</p>
+
+<p>
+JSON-LD is designed as a lightweight syntax that can be used to express
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a>. It is primarily intended to be a way to use Linked Data
+in Javascript and other Web-based programming environments. It is also
+useful when building interoperable Web services and when storing Linked
+Data in JSON-based document storage engines. It is practical and designed
+to be as simple as possible, utilizing the large number of JSON parsers
+and libraries available today.
+</p>
+
+<p>
+The syntax does not necessarily require applications to change their JSON, but
+allows one to easily add meaning by simply adding or referencing a context.
+The syntax is designed to not disturb already deployed systems
+running on JSON, but provide a smooth upgrade path from JSON to JSON-LD with
+added semantics. Finally, the format is intended to be easy to parse, efficient
+to generate, and only requires a very small memory footprint in order to operate.
+</p>
+
+<div id="how-to-read-this-document" class="section">
+<h3><span class="secno">1.1 </span>How to Read this Document</h3>
+
+<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 way that is
+  cross-language compatible via 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" rel="biblioentry" 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" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>]. 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" rel="biblioentry" href="#bib-ECMA-262">ECMA-262</a></cite>] and
+WebIDL [<cite><a class="bibref" rel="biblioentry" href="#bib-WEBIDL">WEBIDL</a></cite>].</p>
+
+<p>
+  JSON [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] defines several terms which are used throughout this document:
+  </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 name/value pairs (or members). A name is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>. A single colon comes after
+      each name, separating the name from the value. A single comma separates a value
+      from a following name. The names within an object <em class="rfc2119" title="should">should</em> be unique.
+    </dd>
+    <dt><dfn title="array" id="dfn-array">array</dfn></dt>
+    <dd>
+      An array is an ordered collection of values. An array structure is represented as square brackets surrounding zero or more values (or elements). Elements are separated by commas.  Within JSON-LD, array order is not preserved by default, unless
+      specific markup is provided (see <a href="#sets-and-lists">Sets and Lists</a>). This is because the basic data model of JSON-LD
+      is a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a>, which is inherently unordered.
+    </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. A
+      character is represented as a single character string.
+    </dd>
+    <dt><dfn title="number" id="dfn-number">number</dfn></dt>
+    <dd>
+      A number is 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>
+      Unless otherwise specified, a JSON-LD processor <em class="rfc2119" title="must">must</em> act as if a key-value pair in the body of a JSON-LD document was never declared when the value equals <em>null</em>.
+      If <code>@value</code>, <code>@list</code>, or <code>@set</code> is set to <em>null</em> in expanded form, then the entire JSON object is ignored.
+      If <code>@context</code> is set to <em>null</em>, the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is reset and when used
+      within a <a class="tref internalDFN" title="context" href="#dfn-context">context</a>, it removes any definition associated with the key, unless otherwise specified.
+    </dd>
+    <dt><dfn title="subject_definition" id="dfn-subject_definition">subject definition</dfn></dt><dd>
+      A <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> used to represent a <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> and one or more properties
+      of that subject. A <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> is a subject definition if it does not contain they keys
+      <code>@value</code>, <code>@list</code> or <code>@set</code> and it has one or more keys other than <code>@id</code>.</dd>
+    <dt><dfn title="subject_reference" id="dfn-subject_reference">subject reference</dfn></dt><dd>
+      A <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> used to reference a subject having only the <code>@id</code> key.</dd>
+  </dl>
+<p></p>
+
+</div>
+
+<div id="syntax-tokens-and-keywords" class="section">
+  <h3><span class="secno">1.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 using
+  in all algorithms described in this section:</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">term</a>s 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">The Context</a>.</dd>
+  <dt><code>@graph</code></dt><dd>Used to explicitly express a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a>.</dd>
+  <dt><code>@id</code></dt>
+  <dd>Used to uniquely identify things that are being described in the document.
+    This keyword is described in the section titled
+    <a href="#identifying-the-subject">Identifying the Subject</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 the sections titled
+    <a href="#string-internationalization">String Internationalization</a> and
+    <a href="#typed-values">Typed Values</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">String Internationalization</a>.</dd>
+  <dt><code>@type</code></dt>
+  <dd>Used to set the data type of a <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</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">Typed Values</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">Sets and Lists</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">Sets and Lists</a>.</dd>
+  <dt><code>@set</code></dt>
+  <dd>Used to express an unordered set of data.
+    This keyword is described in the section titled <a href="#sets-and-lists">Sets and Lists</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>
+</div>
+
+<div id="contributing" class="section">
+<h3><span class="secno">1.3 </span>Contributing</h3>
+
+<p>There are a number of ways that one may participate in the development of
+this specification:</p>
+
+<ul>
+<li>Technical discussion typically occurs on the public 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 teleconferences</a> are held
+every week on Tuesdays at 1500 UTC.
+</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>.</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>
+
+</div>
+
+</div>
+
+<div class="informative section" 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 considerations were explored during the creation of this
+  markup language:</p>
+
+<dl>
+ <dt>Simplicity</dt>
+ <dd>Developers need only 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. No extra
+ processors or software libraries are necessary to use JSON-LD in its most
+ basic form. The language attempts to ensure that developers have an easy
+ learning curve.</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 provides a mechanism that allows developers to specify
+ <a class="tref internalDFN" title="context" href="#dfn-context">context</a> in a way that is out-of-band. This allows organizations that have
+ already deployed large JSON-based infrastructure to add meaning to their
+ JSON documents 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 esoteric markup, we chose not to support the use case
+ and support a simplified syntax instead. So, while Zero Edits is a 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>
+</dl>
+</div>
+
+<div id="basic-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">3. </span>Basic Concepts</h2>
+
+<p>JSON-LD is designed to ensure that <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a> 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 <a class="tref internalDFN" title="context" href="#dfn-context">context</a>. As more JSON-LD features are
+used, more semantics are added to the JSON markup.</p>
+
+<div id="linking-data" class="section">
+<h3><span class="secno">3.1 </span>Linking Data</h3>
+
+<p>
+An Internationalized Resource Identifier
+(<dfn title="iri" id="dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></dfn>),
+as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>], is a mechanism for representing unique
+identifiers on the Web. In <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a>, an <abbr title="Internationalized Resource Identifier">IRI</abbr> is commonly
+used for expressing a <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>, a <a class="tref internalDFN" title="property" href="#dfn-property">property</a> or an
+<a class="tref internalDFN" title="object" href="#dfn-object">object</a>.
+</p>
+
+<p>JSON-LD defines a mechanism to map JSON terms, i.e., keys and values, to IRIs. This does not mean
+that JSON-LD requires every key or value to be an <abbr title="Internationalized Resource Identifier">IRI</abbr>, but rather ensures that
+keys and values can be mapped to IRIs if the developer desires to transform
+their data into <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a>. There are a few techniques that can ensure
+that developers will generate good Linked Data for the Web. JSON-LD
+formalizes those techniques.
+</p>
+
+<p>We will be using the following JSON markup as the example for the
+rest of this section:
+</p>
+
+<pre class="example">{
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+}</pre>
+
+<div id="the-context" class="section">
+<h4><span class="secno">3.1.1 </span>The Context</h4>
+
+<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">term</a>s, i.e., properties with associated
+  values in an JSON document, to <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>s. A <dfn title="term" id="dfn-term">term</dfn> is a short word that expands to an
+  <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>. <a class="tref internalDFN" title="term" href="#dfn-term">Term</a>s <em class="rfc2119" title="may">may</em> be defined as any valid JSON <a class="tref internalDFN" title="string" href="#dfn-string">string</a> other
+  than a JSON-LD <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>. To avoid
+  forward-compatibility issues, <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s starting with an <code>@</code> character <em class="rfc2119" title="should not">should not</em> be used
+  as they might be used as <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keywords</a> in future versions of JSON-LD.</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">term</a>s 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">term</a>s to expand to IRIs so that
+  developers don't accidentally step on each other's <dfn title="vocabulary" id="dfn-vocabulary">vocabulary</dfn> terms. 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. Much like 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 name/value pairs while ensuring that the data is useful outside of the
+  page, API or database in which it resides. The value of a term mapping
+  <em class="rfc2119" title="must">must</em> be either; 1) a simple string with the lexical form of an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a> or
+  2) <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a>, or 3) an <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> containing an
+  <code>@id</code>, <code>@type</code>, <code>@language</code>, or <code>@container</code> keyword
+  (all other keywords are ignored by a JSON-LD processor).
+</p>
+
+<p>These Linked Data <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s are typically collected in a
+context document that would look something like this:</p>
+
+<pre class="example">{
+  &quot;@context&quot;:
+  {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;depiction&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/depiction&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+    &quot;homepage&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+  }
+}</pre>
+
+<p>Assuming that this context document can be retrieved at <code>http://json-ld.org/contexts/person</code>,
+  it can be referenced from a JSON-LD document by adding a single line. The JSON markup shown in the previous
+  section could be changed as follows:</p>
+
+<pre class="example">{
+  <span class="diff">&quot;@context&quot;: &quot;http://json-ld.org/contexts/person&quot;,</span>
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+}</pre>
+
+<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 information
+for certain <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s as well as other processing instructions for
+the JSON-LD processor.</p>
+
+<p>Contexts <em class="rfc2119" title="may">may</em> be specified in-line. This ensures that JSON-LD documents
+can be processed when a JSON-LD processor does not have access to the Web.</p>
+
+<pre class="example">{
+  <span class="diff">&quot;@context&quot;:
+  {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;depiction&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/depiction&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+    &quot;homepage&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+  },</span>
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+}</pre>
+
+<p>Contexts <em class="rfc2119" title="may">may</em> be used at any time a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> is defined.
+  A <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> <em class="rfc2119" title="may">may</em> specify multiple contexts, using an
+  <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, which is processed in order. 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">term</a>s <em class="rfc2119" title="must">must</em> be overridden using a last-defined-overrides
+  mechanism.</p>
+
+<p class="note">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. A <a class="tref internalDFN" title="term" href="#dfn-term">term</a> defined
+  in a previous context <em class="rfc2119" title="must">must</em> be removed, if it is re-defined to <code>null</code>.</p>
+
+<p>
+  The set of contexts defined within a specific <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> are
+  referred to as <dfn title="local_context" id="dfn-local_context">local context</dfn>s. Setting the context to <code>null</code>
+  effectively sets the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> to it's initial state. 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 context</a>s 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>
+
+<pre class="example">{
+  <span class="diff">&quot;@context&quot;: [
+    &quot;http://json-ld.org/contexts/person&quot;,
+    {
+      &quot;pic&quot;: &quot;http://xmlns.com/foaf/0.1/depiction&quot;
+    }
+  ],</span>
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  <span class="diff">&quot;pic&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;</span>
+}</pre>
+
+<p class="note">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 one-pass processors.</p>
+
+</div>
+
+<div id="from-json-to-json-ld" class="section">
+<h4><span class="secno">3.1.2 </span>From JSON to JSON-LD</h4>
+
+<p>If a set of <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s 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 JSON objects, machines are able to automatically expand the terms to
+something meaningful and unambiguous, like this:</p>
+
+<pre class="example">{
+  &quot;<span class="diff">http://xmlns.com/foaf/0.1/name</span>&quot;: &quot;Manu Sporny&quot;,
+  &quot;<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>&quot;: &quot;http://manu.sporny.org&quot;
+  &quot;<span class="diff">http://xmlns.com/foaf/0.1/depiction</span>&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+}</pre>
+
+<p>Doing this allows JSON to be unambiguously machine-readable without
+requiring developers to drastically change their workflow.</p>
+
+<p class="note">The example above does not use the <code>@id</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>
+to set the <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> of the node being described above. This type
+of node is called an <dfn title="unlabeled_node" id="dfn-unlabeled_node">unlabeled node</dfn> and is considered to be
+a weaker form of <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a>. It is advised that all nodes
+described in JSON-LD are given unique identifiers via the
+<code>@id</code> keyword unless the data is not intended to be linked to
+from other data sets.</p>
+
+<p>A <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> used to define property values is called a
+  <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a>. <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">Subject definitions</a>
+  do not require a <code>@id</code>, in which case they are considered to be an
+  <a class="tref internalDFN" title="unlabeled_node" href="#dfn-unlabeled_node">unlabeled node</a>.</p>
+
+</div>
+</div>
+
+<div id="iris" class="section">
+<h3><span class="secno">3.2 </span>IRIs</h3>
+
+<p>Expressing <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>s 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="subject" href="#dfn-subject">subject</a>s, all
+<a class="tref internalDFN" title="property" href="#dfn-property">properties</a> and many <a class="tref internalDFN" title="object" href="#dfn-object">object</a>s are
+identified. <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>s 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">term</a>s in the key position in
+    a <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> that have a mapping to an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a> or another <a class="tref internalDFN" title="term" href="#dfn-term">term</a> in the
+    <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> are expanded to an <abbr title="Internationalized Resource Identifier">IRI</abbr> by JSON-LD processors.</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>, a <a class="tref internalDFN" title="relative_iri" href="#dfn-relative_iri">relative <abbr title="Internationalized Resource Identifier">IRI</abbr></a>, 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>.</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" rel="biblioentry" 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 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.</p>
+
+<p>IRIs can be expressed directly in the key position like so:</p>
+
+<pre class="example">{
+...
+  &quot;<span class="diff">http://xmlns.com/foaf/0.1/name</span>&quot;: &quot;Manu Sporny&quot;,
+...
+}</pre>
+
+<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>, as
+opposed to being interpreted as a string.</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>
+
+<pre class="example">{
+  &quot;<span class="diff">@context</span>&quot;:
+  {
+    &quot;<span class="diff">name</span>&quot;: &quot;<span class="diff">http://xmlns.com/foaf/0.1/name</span>&quot;
+...
+  },
+  &quot;<span class="diff">name</span>&quot;: &quot;Manu Sporny&quot;,
+...
+}</pre>
+
+<p><a class="tref internalDFN" title="prefix" href="#dfn-prefix">Prefix</a>es are expanded when the form of the value <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a>
+  represented as is <code>prefix:suffix</code>, 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>
+
+<pre class="example">{
+  &quot;<span class="diff">@context</span>&quot;:
+  {
+    &quot;<span class="diff">foaf</span>&quot;: &quot;<span class="diff">http://xmlns.com/foaf/0.1/</span>&quot;
+...
+  },
+  &quot;<span class="diff">foaf:name</span>&quot;: &quot;Manu Sporny&quot;,
+...
+}</pre>
+
+<p><a class="tref internalDFN" title="term" href="#dfn-term">Term</a>s are case sensitive, and <em class="rfc2119" title="must">must</em> be matched using a case-sensitive comparison.</p>
+
+<p>Keys that do not expand to an absolute <abbr title="Internationalized Resource Identifier">IRI</abbr> are ignored.</p>
+
+<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">Compact IRIs</a> for more details.</p>
+
+<p>An <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> is generated when a value is associated with a key using
+the <code>@id</code> keyword:</p>
+
+<pre class="example">{
+...
+  &quot;homepage&quot;: { &quot;<span class="diff">@id</span>&quot;: &quot;http://manu.sporny.org&quot; }
+...
+}</pre>
+
+<p class="note">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 object using an
+  <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>. This facility <em class="rfc2119" title="may">may</em> also be used to link a
+  <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> with an <a class="tref internalDFN" title="object" href="#dfn-object">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">Embedding</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>
+
+<pre class="example">{<span class="diff">
+  &quot;@context&quot;:
+  {
+    ...
+    &quot;homepage&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+    ...
+  }</span>
+...
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+...
+}</pre>
+
+<p>Even though the value <code>http://manu.sporny.org/</code> is a
+<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 processed by a JSON-LD Processor.</p>
+
+</div>
+
+<div id="identifying-the-subject" class="section">
+<h3><span class="secno">3.3 </span>Identifying the Subject</h3>
+
+<p>
+  To be able to externally reference nodes, it is important that each node has
+  an unambiguous identifier. <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>s 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.
+  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>A <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>
+   of an object in JSON is declared using the <code>@id</code> key. The subject is the
+first piece of information needed by the JSON-LD processor in order to
+create the (subject, property, object) tuple, also known as a triple.</p>
+
+<pre class="example">{
+...
+  &quot;<span class="diff">@id</span>&quot;: &quot;<span class="diff">http://example.org/people#joebob</span>&quot;,
+...
+}</pre>
+
+<p>The example above would set the subject to the <abbr title="Internationalized Resource Identifier">IRI</abbr>
+<code>http://example.org/people#joebob</code>.
+</p>
+
+<p>A <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a> used to define property values is called a
+  <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a>. <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">Subject definitions</a>
+  do not require a <code>@id</code>, in which case they are considered to be an
+  <a class="tref internalDFN" title="unlabeled_node" href="#dfn-unlabeled_node">unlabeled node</a>.</p>
+
+<p class="note">To ensure the best possible performance, it is a best practice
+to put the <code>@id</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> before other key-value pairs in an object.
+If it isn't listed first, processors have to save each key-value pair until
+<code>@id</code> is processed before they can start generating triples.
+Not specifying the <code>@id</code> keyword first creates a memory and
+complexity burden for one-pass processors.</p>
+
+</div>
+
+<div id="specifying-the-type" class="section">
+<h3><span class="secno">3.4 </span>Specifying the Type</h3>
+
+<p>The type of a particular subject can be specified using the
+<code>@type</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>. Specifying the type in this way will generate a
+triple of the form (subject, type, type-<abbr title="Internationalized Resource Identifier">IRI</abbr>). To be considered
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a>, types <em class="rfc2119" title="must">must</em> be uniquely identified by
+an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.</p>
+
+<pre class="example">{
+...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;<span class="diff">@type</span>&quot;: &quot;<span class="diff">http://xmlns.com/foaf/0.1/Person</span>&quot;,
+...
+}</pre>
+</div>
+
+<div id="string-internationalization" class="section">
+<h3><span class="secno">3.5 </span>String Internationalization</h3>
+
+<p>In different scenarios 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>
+
+<pre class="example">{
+  <span class="diff">&quot;@context&quot;:
+  {
+    ...
+    &quot;@language&quot;: &quot;ja&quot;
+  },</span>
+  &quot;name&quot;: <span class="diff">&quot;花澄&quot;</span>,
+  &quot;occupation&quot;: <span class="diff">&quot;科学者&quot;</span>
+}</pre>
+
+<p>The example above would associate the <code>ja</code> language
+  code with the two <a class="tref internalDFN" title="string" href="#dfn-string">string</a>s <em>花澄</em> and <em>科学者</em>.
+  Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
+
+<p>It is possible to override the default language by using the expanded
+form of a value:</p>
+
+<pre class="example">{
+  &quot;@context&quot;: {
+    ...
+    &quot;@language&quot;: &quot;ja&quot;
+  },
+  &quot;name&quot;: &quot;花澄&quot;,
+  &quot;occupation&quot;: <span class="diff">{
+    &quot;@value&quot;: &quot;Scientist&quot;,
+    &quot;@language&quot;: &quot;en&quot;
+  }</span>
+}</pre>
+
+<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 expanded value:</p>
+
+<pre class="example">{
+  &quot;@context&quot;: {
+    ...
+    &quot;@language&quot;: &quot;ja&quot;
+  },
+  &quot;name&quot;: <span class="diff">{
+    &quot;@value&quot;: &quot;花澄&quot;
+  },</span>
+  &quot;occupation&quot;: <span class="diff"> {
+    &quot;@value&quot;: &quot;Ninja&quot;,
+    &quot;@language&quot;: &quot;en&quot;
+  }</span>,
+  &quot;speciality&quot;: &quot;手裏剣&quot;
+}</pre>
+
+<p class="note">Please note that language associations <em class="rfc2119" title="must">must</em> only be applied
+  to plain literal <a class="tref internalDFN" title="string" href="#dfn-string">string</a>s. That is, <a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">typed value</a>s
+  or values that are subject to <a href="#type-coercion">type coercion</a>
+  won't 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>
+
+<pre class="example">{
+  &quot;@context&quot;: {
+    ...
+    &quot;@language&quot;: &quot;ja&quot;
+  },
+  &quot;name&quot;: &quot;花澄&quot;,
+  &quot;details&quot;: {
+<span class="diff">    &quot;@context&quot;: {
+      &quot;@language&quot;: null
+    },</span>
+    &quot;occupation&quot;: &quot;Ninja&quot;
+  }
+}</pre>
+
+<p class="note">JSON-LD allows to associate language information with terms.
+  See <a href="#expanded-term-definition">Expanded Term Definition</a> for
+  more details.</p>
+
+</div>
+
+<div id="sets-and-lists" class="section">
+<h3><span class="secno">3.6 </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">array</a>s. But, because graphs do not describe ordering for links
+  between nodes, in contrast to plain JSON, arrays in JSON-LD do not provide
+  an ordering of the listed objects by default. For example, consider the
+  following
+  simple document:</p>
+<pre class="example">{
+...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;nick&quot;: <span class="diff">[ &quot;joe&quot;, &quot;bob&quot;, &quot;jaybee&quot; ]</span>,
+...
+}</pre>
+
+<p>The markup shown above would result in three triples being generated,
+  each relating the subject to an individual object, with no inherent order:</p>
+<pre class="example">&lt;http://example.org/people#joebob&gt;
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      &quot;joe&quot; .
+&lt;http://example.org/people#joebob&gt;
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      &quot;bob&quot; .
+&lt;http://example.org/people#joebob&gt;
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      &quot;jaybee&quot; .</pre>
+
+<p>Multiple values may also be expressed using the expanded object form:</p>
+
+<pre class="example">{
+  &quot;@id&quot;: &quot;http://example.org/articles/8&quot;,
+  &quot;dc:title&quot;: <span class="diff">
+  [
+    {
+      &quot;@value&quot;: &quot;Das Kapital&quot;,
+      &quot;@language&quot;: &quot;de&quot;
+    },
+    {
+      &quot;@value&quot;: &quot;Capital&quot;,
+      &quot;@language&quot;: &quot;en&quot;
+    }
+  ]</span>
+}</pre>
+
+<p>The markup shown above would generate the following triples, again with
+  no inherent order:</p>
+
+<pre class="example">&lt;http://example.org/articles/8&gt;
+   &lt;http://purl.org/dc/terms/title&gt;
+      &quot;Das Kapital&quot;@de .
+&lt;http://example.org/articles/8&gt;
+   &lt;http://purl.org/dc/terms/title&gt;
+      &quot;Capital&quot;@en .</pre>
+
+
+<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>
+<pre class="example">{
+...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;foaf:nick&quot;:
+  <span class="diff">{
+    &quot;@list&quot;: [ &quot;joe&quot;, &quot;bob&quot;, &quot;jaybee&quot; ]
+  }</span>,
+...
+}</pre>
+
+<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 through operations such as
+  <a href="#expansion">Expansion</a>, <a href="#compaction">Compaction</a>,
+  and <a href="#framing">Framing</a>. 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>
+<pre class="example">{
+  <span class="diff">&quot;@context&quot;:
+  {
+    ...
+    &quot;nick&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/nick&quot;,
+      &quot;@container&quot;: &quot;@list&quot;
+    }
+  }</span>,
+...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;nick&quot;: <span class="diff">[ &quot;joe&quot;, &quot;bob&quot;, &quot;jaybee&quot; ]</span>,
+...
+}</pre>
+
+<p class="note">List of lists are not allowed in this version of JSON-LD.
+  If a list of lists is detected, a JSON-LD processor will throw an exception.</p>
+
+<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 that <em class="rfc2119" title="must">must</em> be optimized away when processing
+  the document, it is very helpful for <a href="#compaction">Compaction</a>
+  and <a href="#framing">Framing</a>. The value of terms associated with a
+  <code>@set</code>- or <code>@list</code>-<code>@container</code> 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. This makes post-processing of the data easier as the data is
+  in a deterministic form. If no such <code>@container</code> is specified,
+  single values are optimized to a non-array form.</p>
+
+<p class="note">The use of <code>@container</code> in the body of a JSON-LD
+  document, i.e., outside <code>@context</code> is ignored by JSON-LD processors.</p>
+
+</div>
+
+</div>
+
+<div id="advanced-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">4. </span>Advanced Concepts</h2>
+
+<p>JSON-LD has a number of features that provide functionality above and beyond
+the core functionality described above. The following sections outline the
+features that are specific to JSON-LD.
+</p>
+
+<div id="typed-values" class="section">
+<h3><span class="secno">4.1 </span>Typed Values</h3>
+
+<p>
+  A value with an associated type, also known as a
+  <dfn title="typed_value" id="dfn-typed_value">typed value</dfn>, 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 the expanded form for specifying objects.</li>
+  <li>By using a native JSON type.</li>
+</ol>
+
+<p>The first example uses the <code>@type</code> keyword to express a typed value:</p>
+
+<pre class="example">{
+  <span class="diff">&quot;@context&quot;:
+  {
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+    &quot;modified&quot;:
+    {
+      &quot;@id&quot;: &quot;http://purl.org/dc/terms/modified&quot;,
+      &quot;@type&quot;: &quot;xsd:dateTime&quot;
+    }
+  }</span>
+...
+  &quot;modified&quot;: &quot;2010-05-29T14:17:39+02:00&quot;,
+...
+}</pre>
+
+<p>The second example uses the expanded form for specifying objects:</p>
+
+<pre class="example">{
+...
+  &quot;modified&quot;:
+  <span class="diff">{
+    &quot;@value&quot;: &quot;2010-05-29T14:17:39+02:00&quot;,
+    &quot;@type&quot;: &quot;xsd:dateTime&quot;
+  }</span>
+...
+}</pre>
+
+<p>Both examples above would generate an object with the value of
+<code>2010-05-29T14:17:39+02:00</code> and the type of
+<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
+
+<p>The third example uses a built-in native JSON type, a
+  <a class="tref internalDFN" title="number" href="#dfn-number">number</a>, to express a type:</p>
+
+<pre class="example">{
+...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;age&quot;: <span class="diff">31</span>
+...
+}</pre>
+
+<p>The example above is really just a shorthand for the following:</p>
+
+<pre class="example">{
+...
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;age&quot;:
+  <span class="diff">{
+    &quot;@value&quot;: &quot;31&quot;,
+    &quot;@type&quot;: &quot;http://www.w3.org/2001/XMLSchema#integer&quot;
+  }</span>
+...
+}</pre>
+
+<p class="note">
+  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="subject" href="#dfn-subject">subject</a>. Although the same keyword is used in both places,
+  the concept of an <em>object type</em> and a <em>value type</em>
+  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>
+
+<div id="compact-iris" class="section">
+  <h3><span class="secno">4.2 </span>Compact IRIs</h3>
+  <p>
+    <a class="tref internalDFN" title="term" href="#dfn-term">Term</a>s 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 term 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">term</a>s that are used across an
+    application. This is a concern for at least three reasons: the
+    first is the cognitive load on the developer of remembering all of the
+    <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s, the second is the serialized size of the
+    <a class="tref internalDFN" title="context" href="#dfn-context">context</a> if it is specified inline, the third is
+    future-proofing embedded application <a class="tref internalDFN" title="context" href="#dfn-context">context</a>s that may not
+    be easy to change after they are deployed. 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>.
+    Generally, these prefixes are used by concatenating the <em>prefix</em> and
+    a <em>suffix</em>, which is separated by a colon (<code>:</code>).
+    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 <abbr title="Internationalized Resource Identifier">IRI</abbr></a>s 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. This effectively means that every term
+    containing a colon will be interpreted by a JSON-LD processor as an <abbr title="Internationalized Resource Identifier">IRI</abbr>.
+  </p>
+  <p>
+    The ability to use <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact IRIs</a> reduces the need for developers
+    to declare every <a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">vocabulary</a> term that they intend to use in
+    the JSON-LD <a class="tref internalDFN" title="context" href="#dfn-context">context</a>. This reduces stand-alone JSON-LD
+    document serialization size because every <a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">vocabulary</a> term
+    need not be declared in the embedded context.
+    <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">Compact IRIs</a> also
+    reduces the cognitive load on the developer. It is far easier to
+    remember <code>foaf:name</code> than it is to remember
+    <code>http://xmlns.com/foaf/0.1/name</code>. The use of prefixes also
+    ensures that a <a class="tref internalDFN" title="context" href="#dfn-context">context</a> document does not have to be updated
+    in lock-step with an externally defined <a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">vocabulary</a>.
+    Without prefixes, a developer would need to keep their application
+    context terms in lock-step with an externally defined vocabulary. Rather,
+    by just declaring the <a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">vocabulary</a> prefix, one can use new
+    terms as they're declared without having to update the application's
+    JSON-LD <a class="tref internalDFN" title="context" href="#dfn-context">context</a>.
+  </p>
+  <p>Consider the following example:</p>
+  <pre class="example">{
+  &quot;@context&quot;:
+  {
+    <span class="diff">&quot;dc&quot;: &quot;http://purl.org/dc/elements/1.1/&quot;,</span>
+    <span class="diff">&quot;ex&quot;: &quot;http://example.org/vocab#&quot;</span>
+  },
+  &quot;@id&quot;: &quot;http://example.org/library&quot;,
+  &quot;@type&quot;: <span class="diff">&quot;ex:Library&quot;</span>,
+  <span class="diff">&quot;ex:contains&quot;</span>:
+  {
+    &quot;@id&quot;: &quot;http://example.org/library/the-republic&quot;,
+    &quot;@type&quot;: <span class="diff">&quot;ex:Book&quot;</span>,
+    <span class="diff">&quot;dc:creator&quot;</span>: &quot;Plato&quot;,
+    <span class="diff">&quot;dc:title&quot;</span>: &quot;The Republic&quot;,
+    <span class="diff">&quot;ex:contains&quot;</span>:
+    {
+      &quot;@id&quot;: &quot;http://example.org/library/the-republic#introduction&quot;,
+      &quot;@type&quot;: <span class="diff">&quot;ex:Chapter&quot;</span>,
+      <span class="diff">&quot;dc:description&quot;</span>: &quot;An introductory chapter on The Republic.&quot;,
+      <span class="diff">&quot;dc:title&quot;</span>: &quot;The Introduction&quot;
+    }
+  }
+}</pre>
+  <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>
+  <pre class="example">{
+  &quot;@context&quot;:
+  {
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;,
+    <span class="diff">&quot;foaf:homepage&quot;</span>: { &quot;@type&quot;: &quot;@id&quot; },
+    &quot;picture&quot;: { &quot;@id&quot;: <span class="diff">&quot;foaf:depiction&quot;</span>, &quot;@type&quot;: &quot;@id&quot; }
+  },
+  &quot;@subject&quot;: &quot;http://me.markus-lanthaler.com/&quot;,
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Markus Lanthaler&quot;,
+  &quot;foaf:homepage&quot;: &quot;http://www.markus-lanthaler.com/&quot;,
+  &quot;picture&quot;: &quot;http://twitter.com/account/profile_image/markuslanthaler&quot;
+}</pre>
+  <p>
+    <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">Compact IRIs</a>, also known as CURIEs, are defined more formally in RDFa Core 1.1,
+    <cite><a href="http://www.w3.org/TR/rdfa-core/#s_curies">Section 6
+    &quot;CURIE Syntax Definition&quot;</a></cite> [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>].
+    JSON-LD does not support the square-bracketed CURIE syntax as the
+    mechanism is not required to disambiguate <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>s in a JSON-LD
+    document like it is in HTML documents.
+  </p>
+</div>
+
+<div id="external-contexts" class="section">
+<h3><span class="secno">4.3 </span>External Contexts</h3>
+
+<p>Authors may choose to declare JSON-LD <a class="tref internalDFN" title="context" href="#dfn-context">context</a>s in external
+documents to promote re-use of contexts as well as reduce the size of JSON-LD
+documents.
+</p>
+
+<p>
+In order to use an external context, 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 JSON-LD document. The referenced document <em class="rfc2119" title="must">must</em> have a
+top-level <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>. The value of any <code>@context</code> key
+within that object is substituted for the <abbr title="Internationalized Resource Identifier">IRI</abbr> within the referencing document
+to have the same effect as if the value were specified inline within the
+referencing document.</p>
+
+<p>The following example demonstrates the use of an external context:</p>
+
+<pre class="example">{
+  <span class="diff">&quot;@context&quot;: &quot;http://json-ld.org/contexts/person&quot;</span>,
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+}</pre>
+
+<p>Authors may also import multiple contexts or a combination of external
+and local contexts by specifying a list of contexts:</p>
+
+<pre class="example">{
+  <span class="diff">&quot;@context&quot;:
+  [
+    &quot;http://json-ld.org/contexts/person&quot;,
+    {
+      &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;
+    },
+    &quot;http://json-ld.org/contexts/event&quot;,
+  ]</span>
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+  <span class="diff">&quot;celebrates&quot;:
+  {
+    &quot;@type&quot;: &quot;Event&quot;,
+    &quot;description&quot;: &quot;International Talk Like a Pirate Day&quot;,
+    &quot;date&quot;: &quot;R/2011-09-19&quot;
+  }</span>
+}</pre>
+
+<p>Each context in a list will be evaluated in-order. Duplicate mappings among
+the <a class="tref internalDFN" title="context" href="#dfn-context">context</a>s <em class="rfc2119" title="must">must</em> be overwritten on a last-defined-overrides
+basis. The context list <em class="rfc2119" title="must">must</em> contain either de-referenceable <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>s
+or <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>s that conform to the <a class="tref internalDFN" title="context" href="#dfn-context">context</a> syntax
+as described in this document.</p>
+
+<p>An author may nest contexts within <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>s, with the
+more deeply nested contexts overriding the values in previously defined
+contexts:</p>
+
+<pre class="example">{
+  <span class="diff">&quot;@context&quot;:
+  {
+    &quot;name&quot;: &quot;http://example.com/person#name&quot;,
+    &quot;details&quot;: &quot;http://example.com/person#details&quot;
+  },</span>
+  &quot;<span class="diff">name</span>&quot;: &quot;Markus Lanthaler&quot;,
+  ...
+  &quot;details&quot;:
+  {
+    <span class="diff">&quot;@context&quot;: { &quot;name&quot;: &quot;http://example.com/organization#name&quot; },</span>
+    &quot;<span class="diff">name</span>&quot;: &quot;Graz University of Technology&quot;
+  }
+}</pre>
+
+<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 the
+JSON object has legacy applications using the structure of the object.</p>
+
+<p>External JSON-LD context documents <em class="rfc2119" title="may">may</em> contain extra information located
+outside of the <code>@context</code> key, such as
+documentation about the <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefixes</a> declared in the document.
+When importing a <code>@context</code> value from an external JSON-LD context
+document, any extra information contained outside of the
+<code>@context</code> value <em class="rfc2119" title="must">must</em> be discarded. It is
+also <em class="rfc2119" title="recommended">recommended</em> that a human-readable document encoded in HTML+RDFa
+[<cite><a class="bibref" rel="biblioentry" href="#bib-HTML-RDFA">HTML-RDFA</a></cite>] or other Linked Data compatible format is served as well to
+explain the correct usage of the JSON-LD context document.
+</p>
+</div>
+
+<div id="referencing-contexts-from-json-documents" class="section">
+<h3><span class="secno">4.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 JSON-LD document in an HTTP Link
+Header [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC5988">RFC5988</a></cite>] using the <code>describedby</code> link relation.
+
+The referenced document <em class="rfc2119" title="must">must</em> have a top-level <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>. The
+<code>@context</code> subtree within that object is added to the top-level
+object of the referencing document. If an array is at the top-level of the
+referencing document and its items are objects, the <code>@context</code>
+subtree is added to all array 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>
+
+<pre class="example">GET /ordinary-json-document.json HTTP/1.1
+Host: example.com
+Accept: application/json,*/*;q=0.1
+
+====================================
+
+HTTP/1.0 200 OK
+...
+Content-Type: application/json
+<span class="diff">Link: &lt;http://json-ld.org/contexts/person&gt;; rel=&quot;describedby&quot;; type=&quot;application/ld+json&quot;</span>
+
+{
+  &quot;name&quot;: &quot;Markus Lanthaler&quot;,
+  &quot;homepage&quot;: &quot;http://www.markus-lanthaler.com/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/markuslanthaler&quot;
+}</pre>
+
+<p class="note">JSON-LD documents 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.</p>
+</div>
+
+<div id="expanded-term-definition" class="section">
+<h3><span class="secno">4.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">term</a>s <em class="rfc2119" title="may">may</em> be
+   defined using an expanded notation to allow for additional information
+   associated with the term to be specified (see also
+   <a href="#type-coercion">Type Coercion</a> and
+   <a href="#sets-and-lists">Sets and Lists</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> <em class="rfc2119" title="may">may</em> be
+specified using an object having an <code>@id</code> key.
+The value of the <code>@id</code> key <em class="rfc2119" title="must">must</em> be either a <a class="tref internalDFN" title="term" href="#dfn-term">term</a>, a
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>:suffix value, or an <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a>. Type information
+may be specified</p>
+
+<pre class="example">{
+  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: <span class="diff">{ &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/&quot; }</span>,
+    &quot;name&quot;: <span class="diff">{ &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot; }</span>,
+    &quot;homepage&quot;: <span class="diff">{ &quot;@id&quot;: &quot;foaf:homepage&quot; }</span>,
+    &quot;depiction&quot;: <span class="diff">{ &quot;@id&quot;: &quot;foaf:depiction&quot; }</span>
+  },
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;depiction&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;
+}</pre>
+
+<p>This allows additional information to be associated with the term. This
+  <em class="rfc2119" title="may">may</em> be used for <a href="#type-coercion">Type Coercion</a>,
+  <a href="#sets-and-lists">Sets and Lists</a>), or to associate language
+  information with a term as shown in the following example:</p>
+
+<pre class="example">{
+  &quot;@context&quot;: {
+    ...
+    &quot;ex&quot;: &quot;http://example.com/&quot;,
+    &quot;@language&quot;: &quot;ja&quot;,
+    &quot;name&quot;: { &quot;@id&quot;: &quot;ex:name&quot;, <span class="diff">&quot;@language&quot;: null</span> },
+    &quot;occupation&quot;: { &quot;@id&quot;: &quot;ex:occupation&quot; },
+    &quot;occupation_en&quot;: { &quot;@id&quot;: &quot;ex:occupation&quot;, <span class="diff">&quot;@language&quot;: &quot;en&quot;</span> },
+    &quot;occupation_de&quot;: { &quot;@id&quot;: &quot;ex:occupation&quot;, <span class="diff">&quot;@language&quot;: &quot;cs&quot;</span> }
+  },
+  <span class="diff">&quot;name&quot;: &quot;Yagyū Muneyoshi&quot;,
+  &quot;occupation&quot;: &quot;忍者&quot;,
+  &quot;occupation_en&quot;: &quot;Ninja&quot;,
+  &quot;occupation_cs&quot;: &quot;Nindža&quot;,</span>
+  ...
+}</pre>
+
+<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 it was reset in the expanded term
+  definition.</p>
+
+<p>Expanded terms <em class="rfc2119" title="may">may</em> also be defined using <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">Compact IRIs</a> or
+  <a class="tref internalDFN" title="iri" href="#dfn-iri">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 active context.</p>
+
+<p class="note">Although 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 <abbr title="Internationalized Resource Identifier">IRI</abbr> to expand to some
+  other <abbr title="Internationalized Resource Identifier">IRI</abbr>, such usage is strongly discouraged.</p>
+</div>
+
+<div id="type-coercion" class="section">
+<h3><span class="secno">4.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 types to the proper data type based on a mapping of data type <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>s to
+property types. Using type coercion, value representation is preserved without requiring
+the data type to be specified with each usage.</p>
+
+<p>Type coercion is specified within an <a href="#expanded-term-definition">expanded term definition</a>
+  using the <code>@type</code> key. The values of this key represent type IRIs and <em class="rfc2119" title="must">must</em> take the form of
+  <a class="tref internalDFN" title="term" href="#dfn-term">term</a>, <a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">compact <abbr title="Internationalized Resource Identifier">IRI</abbr></a>, <a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">absolute <abbr title="Internationalized Resource Identifier">IRI</abbr></a> or the <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> <code>@id</code>. Specifying
+  <code>@id</code> indicates that within the body of a JSON-LD document, string values of keys coerced as
+  <code>@id</code> are to be interpreted as <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>s.</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 <em class="rfc2119" title="may">may</em> be defined within the same context.</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 value</a>s, IRIs and lists.</p>
+
+<pre class="example">{
+  &quot;@context&quot;:
+  {
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;age&quot;:
+    <span class="diff">{
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/age&quot;,
+      &quot;@type&quot;: &quot;xsd:integer&quot;
+    }</span>,
+    &quot;homepage&quot;:
+    <span class="diff">{
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;,
+      &quot;@container&quot;: &quot;@list&quot;
+    }</span>
+  },
+  &quot;name&quot;: &quot;John Smith&quot;,
+  &quot;age&quot;: <span class="diff">&quot;41&quot;</span>,
+  &quot;homepage&quot;:
+  <span class="diff">[
+    &quot;http://personal.example.org/&quot;,
+    &quot;http://work.example.com/jsmith/&quot;
+  ]</span>
+}</pre>
+
+<p>The example above would generate the following Turtle:</p>
+
+<pre class="example">@prefix xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt; .
+
+[ foaf:name &quot;John Smith&quot;;
+  foaf:age  &quot;41&quot;^^xsd:integer;
+  foaf:homepage ( &lt;http://personal.example.org/&gt; &lt;http://work.example.com/jsmith/&gt; )
+] .</pre>
+
+<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 by applied to keys which are not represented as a simple <a class="tref internalDFN" title="term" href="#dfn-term">term</a>.
+  For example:</p>
+
+<pre class="example">{
+  &quot;@context&quot;:
+  {
+    <span class="diff">&quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;</span>,
+    &quot;<span class="diff">foaf:age</span>&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;&quot;,
+      &quot;@type&quot;: &quot;xsd:integer&quot;
+    },
+    &quot;<span class="diff">foaf:homepage</span>&quot;:
+    <span class="diff">{
+      &quot;@type&quot;: &quot;@id&quot;
+    }</span>
+}</pre>
+
+<p>In this case, the <code>@id</code> 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 term so that the actual definition of a <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> becomes unnecessary.</p>
+
+<p class="note">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. This allows multiple representations for the same expanded <abbr title="Internationalized Resource Identifier">IRI</abbr>, which may be
+  useful for establishing different type coercion 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, but this usage is discouraged.</p>
+
+<p>Type coercion is performed using the unexpanded value of the key, which <em class="rfc2119" title="must">must</em> exactly match a coercion
+  rule in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</p>
+
+</div>
+
+<div id="iri-expansion-within-a-context" class="section">
+  <h3><span class="secno">4.7 </span><abbr title="Internationalized Resource Identifier">IRI</abbr> Expansion Within a Context</h3>
+  <p>To be consistent with JSON-LD, in general, anywhere an <abbr title="Internationalized Resource Identifier">IRI</abbr> is expected,
+    normal <abbr title="Internationalized Resource Identifier">IRI</abbr> expansion rules apply (see <a href="#iris">IRIs</a>). Within
+    a <a class="tref internalDFN" title="context" href="#dfn-context">context</a> definition, this can mean that terms defined
+    within a given context <em class="rfc2119" title="may">may</em> 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>
+<pre class="example">{
+  &quot;@context&quot;:
+  {
+    <span class="diff">&quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;</span>,
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;age&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/age&quot;,
+      &quot;@type&quot;: <span class="diff">&quot;xsd:integer&quot;</span>
+    },
+    &quot;homepage&quot;:
+    {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  },
+  ...
+}</pre>
+<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">Term</a>s <em class="rfc2119" title="may">may</em> 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>
+
+<pre class="example">{
+  &quot;@context&quot;:
+  {
+    <span class="diff">&quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;</span>,
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+    &quot;name&quot;: <span class="diff">&quot;foaf:name&quot;</span>,
+    &quot;age&quot;:
+    {
+      &quot;@id&quot;: <span class="diff">&quot;foaf:age&quot;</span>,
+      &quot;@type&quot;: &quot;xsd:integer&quot;
+    },
+    &quot;homepage&quot;:
+    {
+      &quot;@id&quot;: <span class="diff">&quot;foaf:homepage&quot;</span>,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  },
+  ...
+}</pre>
+
+<p>Not only <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s, but also <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> <em class="rfc2119" title="may">may</em> be used on the left-hand side of a definition.</p>
+
+<pre class="example">{
+  &quot;@context&quot;:
+  {
+    <span class="diff">&quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;</span>,
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+    &quot;name&quot;: &quot;foaf:name&quot;,
+    &quot;<span class="diff">foaf:age</span>&quot;:
+    {
+      &quot;@id&quot;: &quot;foaf:age&quot;,
+      &quot;@type&quot;: &quot;xsd:integer&quot;
+    },
+    &quot;<span class="diff">foaf:homepage</span>&quot;:
+    <span class="diff">{
+      &quot;@type&quot;: &quot;@id&quot;
+    }</span>
+  },
+  ...
+}</pre>
+
+<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.
+The first way, as shown with <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 term (using short-form) as well as the
+<code>@type</code> associated with the <a class="tref internalDFN" title="term" href="#dfn-term">term</a>. The second way, only
+declares the <code>@type</code> associated with the <a class="tref internalDFN" title="term" href="#dfn-term">term</a>. In the
+second case, the JSON-LD processor will still derive the full <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>
+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> for <code>foaf:homepage</code>.
+</p>
+
+<p>
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">Absolute IRIs</a> <em class="rfc2119" title="may">may</em> also be used on the left-hand side of a <a class="tref internalDFN" title="context" href="#dfn-context">context</a>:
+</p>
+
+<pre class="example">{
+  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;,
+    &quot;xsd&quot;: &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+    &quot;name&quot;: &quot;foaf:name&quot;,
+    &quot;foaf:age&quot;:
+    {
+      &quot;@id&quot;: &quot;foaf:age&quot;,
+      &quot;@type&quot;: &quot;xsd:integer&quot;
+    },
+    &quot;<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>&quot;:
+    {
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  },
+  ...
+}</pre>
+
+<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> <em class="rfc2119" title="must">must</em> also
+be used in the JSON-LD document. Also note that <code>foaf:homepage</code>
+will not use the <code>{ &quot;@type&quot;: &quot;@id&quot; }</code> declaration because
+<code>foaf:homepage</code> is not the same as
+<code>http://xmlns.com/foaf/0.1/homepage</code>. That is, a JSON-LD
+processor will use direct string comparison when looking up
+<a class="tref internalDFN" title="term" href="#dfn-term">term</a>s in a <a class="tref internalDFN" title="context" href="#dfn-context">context</a> before it applies the
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> lookup mechanism.
+</p>
+
+<p>The only exception for using terms in the <a class="tref internalDFN" title="context" href="#dfn-context">context</a> is that
+  they <em class="rfc2119" title="must not">must not</em> be used in a circular manner. That is,
+  a definition of <em>term-1</em> <em class="rfc2119" title="must not">must not</em> 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>
+<pre class="example">{
+  &quot;@context&quot;:
+  {
+    <span class="diff">&quot;term1&quot;: &quot;term2:foo&quot;,
+    &quot;term2&quot;: &quot;term1:bar&quot;</span>
+  },
+  ...
+}</pre>
+</div>
+
+<div id="embedding" class="section">
+  <h3><span class="secno">4.8 </span>Embedding</h3>
+  <p>
+    Object <dfn title="embedding" id="dfn-embedding">embedding</dfn> is a JSON-LD feature that allows an author to
+    use the definition of JSON-LD objects 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="subject" href="#dfn-subject">subject</a>s.
+  </p>
+  <p>The example shows two subjects related by a property from the first subject:</p>
+
+  <pre class="example">{
+...
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;<span class="diff">knows</span>&quot;:
+  {
+    &quot;<span class="diff">@type</span>&quot;: &quot;<span class="diff">Person</span>&quot;,
+    &quot;<span class="diff">name</span>&quot;: &quot;<span class="diff">Gregg Kellogg</span>&quot;,
+  }
+...
+}</pre>
+
+  <p>
+    An object definition, like the one used above, <em class="rfc2119" title="may">may</em> be used as a
+    JSON value at any point in JSON-LD.
+  </p>
+</div>
+
+<div id="named-graphs" class="section">
+  <h3><span class="secno">4.9 </span>Named Graphs</h3>
+  <p>The <code>@graph</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> is used to identify a set of JSON-LD object
+    definitions that may not be directly related through a property, or where
+    <a class="tref internalDFN" title="embedding" href="#dfn-embedding">embedding</a> is not appropriate. For example:</p>
+
+  <pre class="example">{
+  &quot;@context&quot;: ...,
+  &quot;<span class="diff">@graph</span>&quot;:
+  [
+    {
+      &quot;@id&quot;: &quot;http://manu.sporny.org/i/public&quot;,
+      &quot;@type&quot;: &quot;foaf:Person&quot;,
+      &quot;name&quot;: &quot;Manu Sporny&quot;,
+      &quot;knows&quot; &quot;http://greggkellogg.net/foaf#me&quot;
+    },
+    {
+      &quot;@id&quot;: &quot;http://greggkellogg.net/foaf#me&quot;,
+      &quot;@type&quot;: &quot;foaf:Person&quot;,
+      &quot;name&quot;: &quot;Gregg Kellogg&quot;,
+      &quot;knows&quot; &quot;http://manu.sporny.org/i/public&quot;
+    }
+  ]
+}</pre>
+
+  <p>In this case, embedding doesn't work as each JSON-LD object references the other.
+    Using the <code>@graph</code>
+    <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> allows multiple resources 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="json_object" href="#dfn-json_object">JSON object</a>
+    definitions in array and defining the <code>@context</code> within each object:</p>
+
+  <pre class="example"><span class="diff">[</span>
+  {
+    <span class="diff">&quot;@context&quot;: ...,</span>
+    &quot;@id&quot;: &quot;http://manu.sporny.org/i/public&quot;,
+    &quot;@type&quot;: &quot;foaf:Person&quot;,
+    &quot;name&quot;: &quot;Manu Sporny&quot;,
+    &quot;knows&quot; &quot;http://greggkellogg.net/foaf#me&quot;
+  },
+  {
+    <span class="diff">&quot;@context&quot;: ...,</span>
+    &quot;@id&quot;: &quot;http://greggkellogg.net/foaf#me&quot;,
+    &quot;@type&quot;: &quot;foaf:Person&quot;,
+    &quot;name&quot;: &quot;Gregg Kellogg&quot;,
+    &quot;knows&quot; &quot;http://manu.sporny.org/i/public&quot;
+  }
+<span class="diff">]</span></pre>
+
+  <p>The <code>@graph</code> <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a> takes on additional meaning when it
+    is used along with other properties, or is used within an embedded JSON-LD
+    object. In this case, the set of <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definitions</a>,
+    or <a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">subject references</a>
+    contained within a <code>@graph</code> is given a <em>name</em>, based on
+    the label of the JSON-LD object containing a <code>@graph</code> property,
+    either an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>, or an <a class="tref internalDFN" title="unlabeled_node" href="#dfn-unlabeled_node">unlabeled node</a>. This allows
+    statements to be made about an entire <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a>,
+    rather than just a single JSON-LD object.</p>
+
+  <pre class="example">{
+  &quot;@context&quot;: ...,
+  <span class="diff">&quot;@id&quot;: &quot;http://example.org/linked-data-graph&quot;,
+  &quot;asOf&quot;: { &quot;@value&quot;: &quot;2012-04-09&quot;, &quot;@type&quot;: &quot;xsd:date&quot; },
+  &quot;@graph&quot;:</span>
+  [
+    {
+      &quot;@id&quot;: &quot;http://manu.sporny.org/i/public&quot;,
+      &quot;@type&quot;: &quot;foaf:Person&quot;,
+      &quot;name&quot;: &quot;Manu Sporny&quot;,
+      &quot;knows&quot; &quot;http://greggkellogg.net/foaf#me&quot;
+    },
+    {
+      &quot;@id&quot;: &quot;http://greggkellogg.net/foaf#me&quot;,
+      &quot;@type&quot;: &quot;foaf:Person&quot;,
+      &quot;name&quot;: &quot;Gregg Kellogg&quot;,
+      &quot;knows&quot; &quot;http://manu.sporny.org/i/public&quot;
+    },
+    &quot;http://www.markus-lanthaler.com/&quot;
+  ]
+}</pre>
+
+  <p>This example says that there is a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> identified by
+    <code>http://example.org/linked-data-graph</code> which is composed of the
+    statements about Manu and Gregg and a reference to another <abbr title="Internationalized Resource Identifier">IRI</abbr>, which could
+    make statements about Markus. Additionally, there is information about the
+    graph itself, which indicates a time at which this information as asserted
+    to be true.</p>
+
+</div>
+
+<div id="identifying-unlabeled-nodes" class="section">
+<h3><span class="secno">4.10 </span>Identifying Unlabeled Nodes</h3>
+
+<p>At times, it becomes necessary to be able to express information without
+being able to specify the subject. Typically, this type of node is called
+an <a class="tref internalDFN" title="unlabeled_node" href="#dfn-unlabeled_node">unlabeled node</a> or a blank node. In JSON-LD, <a class="tref internalDFN" title="unlabeled_node" href="#dfn-unlabeled_node">unlabeled node</a> identifiers are
+automatically created if a subject 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
+unlabeled nodes by using the special <code>_</code> (underscore)
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>. This allows to reference the node locally within the
+document but not in an external document.</p>
+
+<pre class="example">{
+...
+  &quot;@id&quot;: &quot;<span class="diff">_:foo</span>&quot;,
+...
+}</pre>
+
+<p>The example above would set the subject to <code>_:foo</code>, which can
+then be used later on in the JSON-LD markup to refer back to the
+<a class="tref internalDFN" title="unlabeled_node" href="#dfn-unlabeled_node">unlabeled node</a>. This practice, however, is usually frowned upon when
+generating <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a>. If a developer finds that they refer to the unlabeled
+node more than once, they should consider naming the node using a de-referenceable
+<a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.
+</p>
+
+</div>
+
+<div id="aliasing-keywords" class="section">
+<h3><span class="secno">4.11 </span>Aliasing Keywords</h3>
+
+<p>JSON-LD allows all of the syntax <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keywords</a>, except for <code>@context</code>,
+to be aliased. This feature allows more legacy JSON content to be supported
+by JSON-LD. It 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>
+
+<pre class="example">{
+  &quot;@context&quot;:
+  {
+     <span class="diff">&quot;url&quot;: &quot;@id&quot;</span>,
+     <span class="diff">&quot;a&quot;: &quot;@type&quot;</span>,
+     &quot;name&quot;: &quot;http://schema.org/name&quot;
+  },
+  &quot;url&quot;: &quot;http://example.com/about#gregg&quot;,
+  &quot;a&quot;: &quot;http://schema.org/Person&quot;,
+  &quot;name&quot;: &quot;Gregg Kellogg&quot;
+}</pre>
+
+<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>
+
+</div>
+
+<div id="expansion" class="section">
+<h3><span class="secno">4.12 </span>Expansion</h3>
+<p>The JSON-LD API [<cite><a class="bibref" rel="biblioentry" 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
+  context such that all IRIs, 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 <a href="#framing">Framing</a>.</p>
+
+<p>For example, assume the following JSON-LD input document:</p>
+
+<pre class="example">{
+   &quot;@context&quot;:
+   {
+      &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+      &quot;homepage&quot;: {
+        &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+        &quot;@type&quot;, &quot;@id&quot;
+      }
+   },
+   &quot;name&quot;: &quot;Manu Sporny&quot;,
+   &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;
+}</pre>
+
+<p>Running the JSON-LD Expansion algorithm against the JSON-LD input document
+  provided above would result in the following output:</p>
+
+<pre class="example">[
+  {
+    &quot;http://xmlns.com/foaf/0.1/name&quot;: [ &quot;Manu Sporny&quot; ],
+    &quot;http://xmlns.com/foaf/0.1/homepage&quot;: [
+      {
+       &quot;@id&quot;: &quot;http://manu.sporny.org/&quot;
+      }
+    ]
+  }
+]</pre>
+</div>
+
+<div id="compaction" class="section">
+<h3><span class="secno">4.13 </span>Compaction</h3>
+<p>The JSON-LD API [<cite><a class="bibref" rel="biblioentry" 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>
+
+<pre class="example">[
+  {
+    &quot;http://xmlns.com/foaf/0.1/name&quot;: [ &quot;Manu Sporny&quot; ],
+    &quot;http://xmlns.com/foaf/0.1/homepage&quot;: [
+      {
+       &quot;@id&quot;: &quot;http://manu.sporny.org/&quot;
+      }
+    ]
+  }
+]</pre>
+
+<p>Additionally, assume the following developer-supplied JSON-LD context:</p>
+
+<pre class="example">{
+  &quot;@context&quot;: {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;homepage&quot;: {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  }
+}</pre>
+
+<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>
+
+<pre class="example">{
+  &quot;@context&quot;: {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;homepage&quot;: {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  },
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;
+}</pre>
+
+<p>The compaction algorithm also enables the developer to map any expanded
+  format into an application-specific compacted format. 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.</p>
+</div>
+
+<div id="framing" class="section">
+<h3><span class="secno">4.14 </span>Framing</h3>
+<p>The JSON-LD API [<cite><a class="bibref" rel="biblioentry" href="#bib-JSON-LD-API">JSON-LD-API</a></cite>] defines an method for <em>framing</em> a JSON-LD document.
+  This allows developers to query by example and force a specific tree layout to a JSON-LD document.</p>
+
+<p>A JSON-LD document is a representation of a directed graph. A single
+  directed graph can have many different serializations, each expressing
+  exactly the same information. Developers typically work with trees, represented as
+  <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>s. While mapping a graph to
+  a tree can be done, the layout of the end result must be specified in advance.
+  A <dfn title="frame" id="dfn-frame">Frame</dfn> can be used by a developer on a JSON-LD document to
+  specify a deterministic layout for a graph.</p>
+
+<p>Framing is the process of taking a JSON-LD document, which expresses a
+  graph of information, and applying a specific graph layout
+  (called a <a class="tref internalDFN" title="frame" href="#dfn-frame">Frame</a>).</p>
+
+<p>The JSON-LD document below expresses a library, a book and a chapter:</p>
+
+<pre class="example">{
+  &quot;@context&quot;: {
+    &quot;Book&quot;:         &quot;http://example.org/vocab#Book&quot;,
+    &quot;Chapter&quot;:      &quot;http://example.org/vocab#Chapter&quot;,
+    &quot;contains&quot;:     {
+      &quot;@id&quot;: &quot;http://example.org/vocab#contains&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+    &quot;creator&quot;:      &quot;http://purl.org/dc/terms/creator&quot;,
+    &quot;description&quot;:  &quot;http://purl.org/dc/terms/description&quot;,
+    &quot;Library&quot;:      &quot;http://example.org/vocab#Library&quot;,
+    &quot;title&quot;:        &quot;http://purl.org/dc/terms/title&quot;
+  },
+  &quot;@graph&quot;:
+  [{
+    &quot;@id&quot;: &quot;http://example.com/library&quot;,
+    &quot;@type&quot;: &quot;Library&quot;,
+    &quot;contains&quot;: &quot;http://example.org/library/the-republic&quot;
+  },
+  {
+    &quot;@id&quot;: &quot;http://example.org/library/the-republic&quot;,
+    &quot;@type&quot;: &quot;Book&quot;,
+    &quot;creator&quot;: &quot;Plato&quot;,
+    &quot;title&quot;: &quot;The Republic&quot;,
+    &quot;contains&quot;: &quot;http://example.org/library/the-republic#introduction&quot;
+  },
+  {
+    &quot;@id&quot;: &quot;http://example.org/library/the-republic#introduction&quot;,
+    &quot;@type&quot;: &quot;Chapter&quot;,
+    &quot;description&quot;: &quot;An introductory chapter on The Republic.&quot;,
+    &quot;title&quot;: &quot;The Introduction&quot;
+  }]
+}</pre>
+
+<p>Developers typically like to operate on items in a hierarchical, tree-based
+  fashion. Ideally, a developer would want the data above sorted into top-level
+  libraries, then the books that are contained in each library, and then the
+  chapters contained in each book. To achieve that layout, the developer can
+  define the following <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a>:</p>
+
+<pre class="example">{
+  &quot;@context&quot;: {
+    &quot;Book&quot;:         &quot;http://example.org/vocab#Book&quot;,
+    &quot;Chapter&quot;:      &quot;http://example.org/vocab#Chapter&quot;,
+    &quot;contains&quot;:     &quot;http://example.org/vocab#contains&quot;,
+    &quot;creator&quot;:      &quot;http://purl.org/dc/terms/creator&quot;,
+    &quot;description&quot;:  &quot;http://purl.org/dc/terms/description&quot;,
+    &quot;Library&quot;:      &quot;http://example.org/vocab#Library&quot;,
+    &quot;title&quot;:        &quot;http://purl.org/dc/terms/title&quot;
+  },
+  &quot;@type&quot;: &quot;Library&quot;,
+  &quot;contains&quot;: {
+    &quot;@type&quot;: &quot;Book&quot;,
+    &quot;contains&quot;: {
+      &quot;@type&quot;: &quot;Chapter&quot;
+    }
+  }
+}</pre>
+
+<p>When the framing algorithm is run against the previously defined
+  JSON-LD document, paired with the <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> above, the following
+  JSON-LD document is the end result:</p>
+
+<pre class="example">{
+  &quot;@context&quot;: {
+    &quot;Book&quot;:         &quot;http://example.org/vocab#Book&quot;,
+    &quot;Chapter&quot;:      &quot;http://example.org/vocab#Chapter&quot;,
+    &quot;contains&quot;:     &quot;http://example.org/vocab#contains&quot;,
+    &quot;creator&quot;:      &quot;http://purl.org/dc/terms/creator&quot;
+    &quot;description&quot;:  &quot;http://purl.org/dc/terms/description&quot;
+    &quot;Library&quot;:      &quot;http://example.org/vocab#Library&quot;,
+    &quot;title&quot;:        &quot;http://purl.org/dc/terms/title&quot;
+  },
+  &quot;@id&quot;: &quot;http://example.org/library&quot;,
+  &quot;@type&quot;: &quot;Library&quot;,
+  &quot;contains&quot;: {
+    <span class="diff">&quot;@id&quot;: &quot;http://example.org/library/the-republic&quot;,</span>
+    &quot;@type&quot;: &quot;Book&quot;,
+    <span class="diff">&quot;creator&quot;: &quot;Plato&quot;,</span>
+    <span class="diff">&quot;title&quot;: &quot;The Republic&quot;,</span>
+    &quot;contains&quot;: {
+      <span class="diff">&quot;@id&quot;: &quot;http://example.org/library/the-republic#introduction&quot;,</span>
+      &quot;@type&quot;: &quot;Chapter&quot;,
+      <span class="diff">&quot;description&quot;: &quot;An introductory chapter on The Republic.&quot;,</span>
+      <span class="diff">&quot;title&quot;: &quot;The Introduction&quot;</span>
+    },
+  },
+}</pre>
+
+<div id="framing-operators" class="section">
+<h4><span class="secno">4.14.1 </span>Framing Operators</h4>
+<p>A <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> is a JSON-LD document with some extra syntactic elements used to match against
+  parts of an input document. These operators work by matching on elements of
+  <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definitions</a> comprising the document.</p>
+<dl>
+  <dt>Type Matching</dt><dd>
+    A <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> including a <code>@type</code> with one or more values
+    matches any <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a> having a <code>@type</code> property that includes
+    the specified type.</dd>
+  <dt>Type Wildcard</dt><dd>
+    A <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> including a <code>@type</code> having only an empty <a class="tref internalDFN" title="json_object" href="#dfn-json_object">JSON object</a>
+    matches any <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a> having a <code>@type</code> property with
+    any value.</dd>
+  <dt>Duck Typing</dt><dd>
+    A <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> without a <code>@type</code> definition but with other non-<a class="tref internalDFN" title="keyword" href="#dfn-keyword">keyword</a>
+    property definitions matches any <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definition</a> having at least the
+    same set of properties.
+  </dd><dt>Embedding</dt><dd>
+    A <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> including a property which references another <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> causes
+    <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definitions</a> containing that property
+    and referencing either other <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definitions</a>
+    or <a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">subject references</a> to embed
+    <a class="tref internalDFN" title="subject_definition" href="#dfn-subject_definition">subject definitions</a> matching the embed <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a>
+    to be defined within that property. <a class="tref internalDFN" title="subject_reference" href="#dfn-subject_reference">Subject references</a>
+    that don't match the embed <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> are dropped.</dd>
+</dl>
+<p>The [<cite><a class="bibref" rel="biblioentry" href="#bib-JSON-LD-API">JSON-LD-API</a></cite>] describes other flags and <a class="tref internalDFN" title="keyword" href="#dfn-keyword">keywords</a>
+  that are used to gain even more control over the framed output.</p>
+</div>
+</div>
+
+</div>
+
+<div class="appendix informative section" id="markup-examples">
+
+<!-- OddPage -->
+<h2><span class="secno">A. </span>Markup Examples</h2><p><em>This section is non-normative.</em></p>
+
+<p>JSON-LD is a specification for representing <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a> in JSON. A common
+  way of working with Linked Data is through <dfn title="rdf" id="dfn-rdf">RDF</dfn>, the Resource Description Framework.
+  RDF can be expressed using JSON-LD by associating JSON-LD concepts such as <code>@id</code>
+  and <code>@type</code> with the equivalent <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>s in RDF. Further information about
+  RDF may be found in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-PRIMER">RDF-PRIMER</a></cite>].</p>
+
+<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
+  express semantic data marked up in other languages such as Turtle, RDFa, Microformats,
+  and Microdata. These sections are merely provided as proof 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.
+  Details of transforming JSON-LD into RDF are defined in [<cite><a class="bibref" rel="biblioentry" href="#bib-JSON-LD-API">JSON-LD-API</a></cite>].</p>
+
+<div id="turtle" class="section">
+  <h3><span class="secno">A.1 </span>Turtle</h3>
+
+  <p>The following are examples of representing <a class="tref internalDFN" title="rdf" href="#dfn-rdf">RDF</a> as expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-TURTLE">TURTLE</a></cite>] into JSON-LD.</p>
+
+<div id="prefix-definitions" class="section">
+<h4><span class="secno">A.1.1 </span>Prefix definitions</h4>
+<p>The JSON-LD context has direct equivalents for the Turtle <code>@prefix</code> declaration:</p>
+
+<pre class="example">@prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt; .
+
+&lt;http://manu.sporny.org/i/public&gt; a foaf:Person;
+  foaf:name &quot;Manu Sporny&quot;;
+  foaf:homepage &lt;http://manu.sporny.org/&gt; .</pre>
+
+<pre class="example">{
+  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;
+  },
+  &quot;@id&quot;: &quot;http://manu.sporny.org/i/public&quot;,
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Manu Sporny&quot;,
+  &quot;foaf:homepage&quot;: { &quot;@id&quot;: &quot;http://manu.sporny.org/&quot; }
+}</pre>
+
+<div class="note">
+<p>JSON-LD has no equivalent for the Turtle <code>@base</code> declaration. Authors could, of course,
+  use a prefix definition to resolve <a class="tref internalDFN" title="relative_iri" href="#dfn-relative_iri">relative <abbr title="Internationalized Resource Identifier">IRI</abbr></a>s. For example, an empty prefix could be used
+  to get a similar effect to <code>@base</code>:</p>
+<pre class="example">{
+  &quot;@context&quot;:
+  {
+    <span class="diff">&quot;&quot;: &quot;http://manu.sporny.org/&quot;,</span>
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;
+  },
+  &quot;@id&quot;: <span class="diff">&quot;:i/public&quot;</span>,
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Manu Sporny&quot;,
+  &quot;foaf:homepage&quot;: { &quot;@id&quot;: <span class="diff">&quot;:&quot; </span>}
+}</pre>
+</div>
+</div>
+
+<div id="embedding-1" class="section">
+<h4><span class="secno">A.1.2 </span>Embedding</h4>
+<p>Both Turtle and JSON-LD allow embedding of objects, although Turtle only allows embedding of objects which
+  use unlabeled node identifiers.</p>
+</div>
+
+<pre class="example">@prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt; .
+
+&lt;http://manu.sporny.org/i/public&gt;
+  a foaf:Person;
+  foaf:name &quot;Manu Sporny&quot;;
+  foaf:knows [ a foaf:Person; foaf:name &quot;Gregg Kellogg&quot; ] .</pre>
+
+<pre class="example">{
+  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;
+  },
+  &quot;@id&quot;: &quot;http://manu.sporny.org/i/public&quot;,
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Manu Sporny&quot;,
+  &quot;foaf:knows&quot;:
+  {
+    &quot;@type&quot;: &quot;foaf:Person&quot;,
+    &quot;foaf:name&quot;: &quot;Gregg Kellogg&quot;
+  }
+}</pre>
+<div id="lists" class="section">
+<h4><span class="secno">A.1.3 </span>Lists</h4>
+<p>Both JSON-LD and Turtle can represent sequential lists of values.</p>
+
+<pre class="example">@prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt; .
+
+&lt;http://example.org/people#joebob&gt; a foaf:Person;
+  foaf:name &quot;Joe Bob&quot;;
+  foaf:nick ( &quot;joe&quot; &quot;bob&quot; &quot;jaybee&quot; ) .</pre>
+
+<pre class="example">{
+  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;
+  },
+  &quot;@id&quot;: &quot;http://example.org/people#joebob&quot;,
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Joe Bob&quot;,
+  &quot;foaf:nick&quot;:
+  {
+    &quot;@list&quot;: [ &quot;joe&quot;, &quot;bob&quot;, &quot;jaybe&quot; ]
+  }
+}</pre>
+</div>
+
+</div>
+
+<div id="rdfa" class="section">
+<h3><span class="secno">A.2 </span>RDFa</h3>
+
+<p>The following example describes three people with their respective names and
+homepages.</p>
+
+<pre class="example">&lt;div <span class="diff">prefix=&quot;foaf: http://xmlns.com/foaf/0.1/&quot;</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof=&quot;foaf:Person&quot;</span>&gt;
+        &lt;a <span class="diff">rel=&quot;foaf:homepage&quot; href=&quot;http://example.com/bob/&quot; property=&quot;foaf:name&quot; </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof=&quot;foaf:Person&quot;</span>&gt;
+        &lt;a <span class="diff">rel=&quot;foaf:homepage&quot; href=&quot;http://example.com/eve/&quot; property=&quot;foaf:name&quot; </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof=&quot;foaf:Person&quot;</span>&gt;
+        &lt;a <span class="diff">rel=&quot;foaf:homepage&quot; href=&quot;http://example.com/manu/&quot; property=&quot;foaf:name&quot; </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;</pre>
+
+<p>An example JSON-LD implementation using a single <a class="tref internalDFN" title="context" href="#dfn-context">context</a> is
+described below.</p>
+
+<pre class="example">{
+  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;
+  },
+  &quot;@graph&quot;:
+  [
+    {
+      &quot;@type&quot;: &quot;foaf:Person&quot;,
+      &quot;foaf:homepage&quot;: &quot;http://example.com/bob/&quot;,
+      &quot;foaf:name&quot;: &quot;Bob&quot;
+    },
+    {
+      &quot;@type&quot;: &quot;foaf:Person&quot;,
+      &quot;foaf:homepage&quot;: &quot;http://example.com/eve/&quot;,
+      &quot;foaf:name&quot;: &quot;Eve&quot;
+    },
+    {
+      &quot;@type&quot;: &quot;foaf:Person&quot;,
+      &quot;foaf:homepage&quot;: &quot;http://example.com/manu/&quot;,
+      &quot;foaf:name&quot;: &quot;Manu&quot;
+    }
+  ]
+}</pre>
+
+</div>
+
+<div id="microformats" class="section">
+<h3><span class="secno">A.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>
+
+<pre class="example">&lt;div class=&quot;vcard&quot;&gt;
+ &lt;a class=&quot;url fn&quot; href=&quot;http://www.markus-lanthaler.com/&quot;&gt;Markus Lanthaler&lt;/a&gt;
+&lt;/div&gt;</pre>
+
+<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>
+
+<pre class="example">{
+  &quot;@context&quot;:
+  {
+    &quot;vcard&quot;: &quot;http://microformats.org/profile/hcard#vcard&quot;,
+    &quot;url&quot;:
+    {
+      &quot;@id&quot;: &quot;http://microformats.org/profile/hcard#url&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    },
+    &quot;fn&quot;: &quot;http://microformats.org/profile/hcard#fn&quot;
+  },
+  &quot;@type&quot;: &quot;vcard&quot;,
+  &quot;url&quot;: &quot;http://www.markus-lanthaler.com/&quot;,
+  &quot;fn&quot;: &quot;Markus Lanthaler&quot;
+}</pre>
+
+</div>
+
+<div id="microdata" class="section">
+<h3><span class="secno">A.4 </span>Microdata</h3>
+
+<p>The microdata example below expresses book information as a microdata Work
+item.
+</p>
+
+<pre class="example">&lt;dl itemscope
+    itemtype=&quot;http://purl.org/vocab/frbr/core#Work&quot;
+    itemid=&quot;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&quot;&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop=&quot;http://purl.org/dc/terms/title&quot;&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop=&quot;http://purl.org/dc/terms/creator&quot;&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop=&quot;http://purl.org/vocab/frbr/core#realization&quot;
+     itemscope
+     itemtype=&quot;http://purl.org/vocab/frbr/core#Expression&quot;
+     itemid=&quot;http://purl.oreilly.com/products/9780596007683.BOOK&quot;&gt;
+  &lt;link itemprop=&quot;http://purl.org/dc/terms/type&quot; href=&quot;http://purl.oreilly.com/product-types/BOOK&quot;&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop=&quot;http://purl.org/vocab/frbr/core#realization&quot;
+     itemscope
+     itemtype=&quot;http://purl.org/vocab/frbr/core#Expression&quot;
+     itemid=&quot;http://purl.oreilly.com/products/9780596802189.EBOOK&quot;&gt;
+  &lt;link itemprop=&quot;http://purl.org/dc/terms/type&quot; href=&quot;http://purl.oreilly.com/product-types/EBOOK&quot;&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;</pre>
+
+<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>
+
+<pre class="example">[
+  {
+    &quot;@id&quot;: &quot;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&quot;,
+    &quot;@type&quot;: &quot;http://purl.org/vocab/frbr/core#Work&quot;,
+    &quot;http://purl.org/dc/terms/title&quot;: &quot;Just a Geek&quot;,
+    &quot;http://purl.org/dc/terms/creator&quot;: &quot;Whil Wheaton&quot;,
+    &quot;http://purl.org/vocab/frbr/core#realization&quot;:
+    [
+      &quot;http://purl.oreilly.com/products/9780596007683.BOOK&quot;,
+      &quot;http://purl.oreilly.com/products/9780596802189.EBOOK&quot;
+    ]
+  },
+  {
+    &quot;@id&quot;: &quot;http://purl.oreilly.com/products/9780596007683.BOOK&quot;,
+    &quot;@type&quot;: &quot;http://purl.org/vocab/frbr/core#Expression&quot;,
+    &quot;http://purl.org/dc/terms/type&quot;: &quot;http://purl.oreilly.com/product-types/BOOK&quot;
+  },
+  {
+    &quot;@id&quot;: &quot;http://purl.oreilly.com/products/9780596802189.EBOOK&quot;,
+    &quot;@type&quot;: &quot;http://purl.org/vocab/frbr/core#Expression&quot;,
+    &quot;http://purl.org/dc/terms/type&quot;: &quot;http://purl.oreilly.com/product-types/EBOOK&quot;
+  }
+]</pre>
+</div>
+</div>
+
+<div class="appendix section" id="linked-data">
+
+<!-- OddPage -->
+<h2><span class="secno">B. </span>Linked Data</h2>
+<p>
+The following definition for <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a> is the one that will
+be used for this specification.
+</p>
+<ol>
+  <li><dfn title="linked_data" id="dfn-linked_data">Linked Data</dfn> is a set of documents, each containing a representation of a linked data graph.</li>
+  <li>A <dfn title="linked_data_graph" id="dfn-linked_data_graph">linked data graph</dfn> is an unordered labeled directed graph, where nodes are <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s or <a class="tref internalDFN" title="object" href="#dfn-object">object</a>s, and edges are properties.</li>
+  <li>A <dfn title="subject" id="dfn-subject">subject</dfn> is any node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> with at least one outgoing edge.</li>
+  <li>A <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</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> (an Internationalized Resource Identifier as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>]).</li>
+  <li>An <dfn title="object" id="dfn-object">object</dfn> is a node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> with at least one incoming edge.</li>
+  <li>An <a class="tref internalDFN" title="object" href="#dfn-object">object</a> <em class="rfc2119" title="may">may</em> be labeled with an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a>.</li>
+  <li>A node <em class="rfc2119" title="may">may</em> be a <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> and <a class="tref internalDFN" title="object" href="#dfn-object">object</a> at the same time.</li>
+  <li>A <dfn title="property" id="dfn-property">property</dfn> is an edge of the <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a>.</li>
+  <li>A <a class="tref internalDFN" title="property" href="#dfn-property">property</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>An <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a> that is a label in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> <em class="rfc2119" title="should">should</em> be dereferencable to a <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a> document describing the labeled <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>, <a class="tref internalDFN" title="object" href="#dfn-object">object</a> or <a class="tref internalDFN" title="property" href="#dfn-property">property</a>.</li>
+  <li>A <dfn title="value" id="dfn-value">value</dfn> is an <a class="tref internalDFN" title="object" href="#dfn-object">object</a> with a label that is not an <a class="tref internalDFN" title="iri" href="#dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></a></li>
+</ol>
+
+<p>
+Note that the definition for <a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a> above is silent on the
+topic of unlabeled nodes. Unlabeled nodes are not considered
+<a class="tref internalDFN" title="linked_data" href="#dfn-linked_data">Linked Data</a>. However, this specification allows for the expression
+of unlabled nodes, as most graph-based data sets on the Web contain a number
+of associated nodes that are not named and thus are not directly
+de-referenceable.
+</p>
+</div>
+
+<div class="appendix informative section" id="mashing-up-vocabularies">
+
+<!-- OddPage -->
+<h2><span class="secno">C. </span>Mashing Up Vocabularies</h2><p><em>This section is non-normative.</em></p>
+
+<p>Developers benefit by being able to mash other
+<a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">vocabularies</a> into their
+JSON-LD markup. There are over 200
+<a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">vocabularies</a> that are available for use
+on the Web today. Some of these <a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">vocabularies</a>
+include:
+</p>
+
+<ul>
+   <li>RDF - for describing information about objects and concepts on the Web.</li>
+   <li>RDFS - for expressing things like labels and comments.</li>
+   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
+   <li>Dublin Core - for describing creative works.</li>
+   <li>FOAF - for describing social networks.</li>
+   <li>Calendar - for specifying events.</li>
+   <li>SIOC - for describing discussions on blogs and websites.</li>
+   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
+   <li>GEO - for describing geographic location.</li>
+   <li>VCard - for describing organizations and people.</li>
+   <li>DOAP - for describing projects.</li>
+</ul>
+
+<p>You can use these <a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">vocabularies</a> in
+combination, like so:</p>
+
+<pre class="example">{
+  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;,<span class="diff">
+    &quot;sioc&quot;: &quot;http://rdfs.org/sioc/ns#&quot;,
+    &quot;rdfs&quot;: &quot;http://www.w3.org/2000/01/rdf-schema#&quot;</span>
+  },
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Manu Sporny&quot;,
+  &quot;foaf:homepage&quot;: &quot;http://manu.sporny.org/&quot;,<span class="diff">
+  &quot;sioc:avatar&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;,
+  &quot;rdfs:comment&quot;: &quot;Likes puppies, unicorns and rainbows.&quot;</span>
+}</pre>
+
+<p>Developers can also specify their own <a class="tref internalDFN" title="vocabulary" href="#dfn-vocabulary">vocabulary</a> documents
+by modifying the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> in-line using
+the <code>@context</code> keyword, like so:</p>
+
+<pre class="example">{
+  &quot;@context&quot;:
+  {
+    &quot;foaf&quot;: &quot;http://xmlns.com/foaf/0.1/&quot;,
+    &quot;sioc&quot;: &quot;http://rdfs.org/sioc/ns#&quot;,
+    &quot;rdfs&quot;: &quot;http://www.w3.org/2000/01/rdf-schema#&quot;,
+    <span class="diff">&quot;myvocab&quot;: &quot;http://example.org/myvocab#&quot;</span>
+  },
+  &quot;@type&quot;: &quot;foaf:Person&quot;,
+  &quot;foaf:name&quot;: &quot;Manu Sporny&quot;,
+  &quot;foaf:homepage&quot;: &quot;http://manu.sporny.org/&quot;,
+  &quot;sioc:avatar&quot;: &quot;http://twitter.com/account/profile_image/manusporny&quot;,
+  &quot;rdfs:comment&quot;: &quot;Likes puppies, unicorns and rainbows.&quot;
+  <span class="diff">&quot;myvocab:personality&quot;: &quot;friendly&quot;</span>
+}</pre>
+
+</div>
+
+<div class="appendix informative section" id="iana-considerations">
+
+<!-- OddPage -->
+<h2><span class="secno">D. </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 W3C Recommendation.</p>
+
+<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>
+  </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 &amp; email address to contact for further information:</dt>
+  <dd>Manu Sporny &lt;msporny@digitalbazaar.com&gt;</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>W3C</dd>
+</dl>
+
+</div>
+
+<div class="appendix informative section" id="acknowledgements">
+
+<!-- OddPage -->
+<h2><span class="secno">E. </span>Acknowledgements</h2><p><em>This section is non-normative.</em></p>
+
+<p>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,
+Dave Longley, Dave Lehn and Mike Johnson who reviewed, provided feedback, and
+performed several implementations of the specification, and Ian Davis, who
+created RDF/JSON. Thanks also to Nathan Rixham, Bradley P. Allen,
+Kingsley Idehen, Glenn McDonald, Alexandre Passant, Danny Ayers, Ted
+Thibodeau Jr., Olivier Grisel, Niklas Lindström, Markus Lanthaler, and Richard
+Cyganiak for their input on the specification.
+</p>
+</div>
+
+
+
+<div id="references" class="appendix section">
+<!-- OddPage -->
+<h2><span class="secno">F. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">F.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
+</dd><dt id="bib-JSON-LD-API">[JSON-LD-API]</dt><dd>Manu Sporny, Gregg Kellogg, Dave Longley, Markus Lanthaler, Eds. <cite><a href="http://json-ld.org/spec/latest/json-ld-api/">JSON-LD API</a></cite> Latest. W3C Editor's Draft. URL: <a href="http://json-ld.org/spec/latest/json-ld-api/">http://json-ld.org/spec/latest/json-ld-api/</a>
+</dd><dt id="bib-RFC3987">[RFC3987]</dt><dd>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>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>M. Nottingham. <a href="http://tools.ietf.org/rfc/rfc5988"><cite>Web Linking</cite></a> October 2010. IETF Standard. URL: <a href="http://tools.ietf.org/rfc/rfc5988.txt">http://tools.ietf.org/rfc/rfc5988.txt</a>
+</dd><dt id="bib-WEBIDL">[WEBIDL]</dt><dd>Cameron McCormack. <a href="http://www.w3.org/TR/2011/WD-WebIDL-20110927/"><cite>Web IDL.</cite></a> 27 September 2011. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2011/WD-WebIDL-20110927/">http://www.w3.org/TR/2011/WD-WebIDL-20110927/</a>
+</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">F.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-ECMA-262">[ECMA-262]</dt><dd><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><cite>ECMAScript Language Specification.</cite></a> December 1999. 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-HTML-RDFA">[HTML-RDFA]</dt><dd>Manu Sporny; et al. <a href="http://www.w3.org/TR/rdfa-in-html/"><cite>HTML+RDFa</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/rdfa-in-html/">http://www.w3.org/TR/rdfa-in-html/</a>
+</dd><dt id="bib-RDF-PRIMER">[RDF-PRIMER]</dt><dd>Frank Manola; Eric Miller. <a href="http://www.w3.org/TR/2004/REC-rdf-primer-20040210/"><cite>RDF Primer.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-primer-20040210/">http://www.w3.org/TR/2004/REC-rdf-primer-20040210/</a>
+</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2012/CR-rdfa-core-20120313/"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a> 13 March 2012. W3C Candidate Recommendation. URL: <a href="http://www.w3.org/TR/2012/CR-rdfa-core-20120313/">http://www.w3.org/TR/2012/CR-rdfa-core-20120313/</a>
+</dd><dt id="bib-TURTLE">[TURTLE]</dt><dd>David Beckett, Tim Berners-Lee. <a href="http://www.w3.org/TeamSubmission/turtle/"><cite>Turtle: Terse RDF Triple Language.</cite></a> January 2008. W3C Team Submission. URL: <a href="http://www.w3.org/TeamSubmission/turtle/">http://www.w3.org/TeamSubmission/turtle/</a>
+</dd></dl></div></div></body></html>
--- a/spec/latest/json-ld-api/index.html	Thu Apr 26 12:03:57 2012 +0200
+++ b/spec/latest/json-ld-api/index.html	Thu Apr 26 13:04:54 2012 +0200
@@ -162,9 +162,9 @@
 
           // if there is a previously published draft, uncomment this and set its YYYY-MM-DD date
           // and its maturity status
-          previousPublishDate:  "2012-01-12",
+          previousPublishDate:  "2012-04-26",
           previousMaturity:     "ED",
-          previousDiffURI:      "http://json-ld.org/spec/ED/json-ld-api/20120112/index.html",
+          previousDiffURI:      "http://json-ld.org/spec/ED/json-ld-api/20120426/index.html",
           diffTool:             "http://www.aptest.com/standards/htmldiff/htmldiff.pl",
 
           // if there a publicly available Editor's Draft, this is the link
@@ -225,7 +225,7 @@
           wgPatentURI:  "",
           maxTocLevel: 4,
           preProcess: [ preProc ],
-          alternateFormats: [ {uri: "diff-20120112.html", label: "diff to previous version"} ],
+          alternateFormats: [ {uri: "diff-20120426.html", label: "diff to previous version"} ],
       };
 
       function updateExample(doc, content) {
--- a/spec/latest/json-ld-syntax/index.html	Thu Apr 26 12:03:57 2012 +0200
+++ b/spec/latest/json-ld-syntax/index.html	Thu Apr 26 13:04:54 2012 +0200
@@ -162,9 +162,9 @@
 
           // if there is a previously published draft, uncomment this and set its YYYY-MM-DD date
           // and its maturity status
-          previousPublishDate:  "2012-03-18",
+          previousPublishDate:  "2012-04-26",
           previousMaturity:     "ED",
-          previousDiffURI:      "http://json-ld.org/spec/ED/json-ld-syntax/20120318/index.html",
+          previousDiffURI:      "http://json-ld.org/spec/ED/json-ld-syntax/20120426/index.html",
           diffTool:             "http://www.aptest.com/standards/htmldiff/htmldiff.pl",
 
           // if there a publicly available Editor's Draft, this is the link
@@ -224,7 +224,7 @@
           wgPatentURI:  "",
           maxTocLevel: 4,
           preProcess: [ preProc ],
-          alternateFormats: [ {uri: "diff-20120318.html", label: "diff to previous version"} ],
+          alternateFormats: [ {uri: "diff-20120426.html", label: "diff to previous version"} ],
       };
 
       function updateExample(doc, content) {