Describing JSON-LD context
authorYves Raimond <yves.raimond@bbc.co.uk>
Fri, 21 Feb 2014 10:53:55 +0000
changeset 1988 66317e6afd44
parent 1987 7d19e6194fec
child 1989 47a3733f4058
Describing JSON-LD context
rdf-primer/index.html
--- a/rdf-primer/index.html	Fri Feb 21 10:16:57 2014 +0000
+++ b/rdf-primer/index.html	Fri Feb 21 10:53:55 2014 +0000
@@ -993,6 +993,8 @@
       on line 8. We then describe various properties of that painting
       from line 9 to line 11. </p>
 
+      <p>The JSON-LD context used in this example is given below.</p>
+
 <pre class="example" title="JSON-LD context specification">
 <span class="linenum">01</span>  {
 <span class="linenum">02</span>    "@context": {
@@ -1021,10 +1023,26 @@
 <span class="linenum">25</span>  }
 </pre>
 
-      For example, it will specify that the <code>birthdataorn</code> key
-      maps to the <code>schema:birthDate</code> property IRI, and that
-      its value can be mapped to an <code>xsd:date</code>
-      datatype.</p>
+      <p>This context describes how a JSON-LD document can be mapped
+      to an RDF graph. On lines 4 to 9 it will describe how to map
+      <code>Person</code>, <code>interest</code> and <code>knows</code>
+      to types and properties in the FOAF namespace defined
+      on line 3. We also specify on line 8 that the <code>knows</code>
+      key has a value that will be interpreted as an IRI, through
+      the use of the <code>@type</code> and <code>@id</code> keywords.</p>
+
+      <p>From line 10 to line 12 we map <code>birthdate</code> to
+      a schema.org property IRI and specify that its value can
+      be mapped to an <code>xsd:date</code> datatype. </p>
+
+      <p>From line 16 to line 23 we describe how to map
+      <code>title</code>, <code>creator</code> and <code>subject_of</code>
+      to Dublin Core property IRIs. In particular the <code>@reverse</code>
+      keyword on line 21 means that whenever we
+      encounter <code>"subject_of": "x"</code> in a JSON-LD document using this
+      context we will map it to an RDF triple which subject is the <code>x</code>
+      IRI, which property is <code>dcterms:subject</code> and
+      which object is the resource corresponding to the parent JSON object.</p>
 
 </section>