Simplify flattening example in introduction
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Sun, 17 Feb 2013 14:44:39 +0100
changeset 1285 de96adbad82e
parent 1284 246d44385d11
child 1286 0e68189c977e
Simplify flattening example in introduction

@dlongley, does this address your concerns about the complexity of the example. There's now only a single blank node which gets assigned a bnode label. I still believe it's important to show that.
spec/latest/json-ld-api/index.html
--- a/spec/latest/json-ld-api/index.html	Sun Feb 17 14:17:03 2013 +0100
+++ b/spec/latest/json-ld-api/index.html	Sun Feb 17 14:44:39 2013 +0100
@@ -418,14 +418,7 @@
       "name": "Markus Lanthaler",
       "knows": [
         {
-          "name": "Manu Sporny",
-          "knows": {
-            "@id": "http://greggkellogg.net/foaf#me"
-          }
-        },
-        {
-          "@id": "http://greggkellogg.net/foaf#me",
-          "name": "Gregg Kellogg"
+          "name": "Dave Longley"
         }
       ]
     }
@@ -441,28 +434,18 @@
     <!--
     [
       {
+        "@id": "_:t0",
+        "http://xmlns.com/foaf/0.1/name": [
+          {"@value": "Dave Longley" }
+        ]
+      },
+      {
         "@id": "http://me.markus-lanthaler.com/",
         "http://xmlns.com/foaf/0.1/name": [
           { "@value": "Markus Lanthaler" }
         ],
         "http://xmlns.com/foaf/0.1/knows": [
-          { "@id": "_:t0" },
-          { "@id": "http://greggkellogg.net/foaf#me" }
-        ]
-      },
-      {
-        "@id": "_:t0",
-        "http://xmlns.com/foaf/0.1/name": [
-          { "@value": "Manu Sporny" }
-        ],
-        "http://xmlns.com/foaf/0.1/knows": [
-          { "@id": "http://greggkellogg.net/foaf#me" }
-        ]
-      },
-      {
-        "@id": "http://greggkellogg.net/foaf#me",
-        "http://xmlns.com/foaf/0.1/name": [
-          { "@value": "Gregg Kellogg" }
+          { "@id": "_:t0" }
         ]
       }
     ]
@@ -471,7 +454,7 @@
 
     <p>Note how in the output above all properties of a <tref>node</tref> are collected in a
       single <tref>JSON object</tref> and how the <tref>blank node</tref> representing
-      &quot;Manu Sporny&quot; has been assigned the <tref>blank node identifier</tref>
+      &quot;Dave Longley&quot; has been assigned the <tref>blank node identifier</tref>
       <code>_:t0</code>.</p>
 
     <p>To make it easier for humans to read or for certain applications to
@@ -489,32 +472,24 @@
       },
       "@graph": [
         {
-          "@id": "http://me.markus-lanthaler.com/",
-          "name": "Markus Lanthaler",
-          "knows": [
-            { "@id": "_:t0" },
-            { "@id": "http://greggkellogg.net/foaf#me" }
-          ]
+          "@id": "_:t0",
+          "name": "Dave Longley"
         },
         {
-          "@id": "_:t0",
-          "name": "Manu Sporny",
+          "@id": "http://me.markus-lanthaler.com/",
+          "name": "Markus Lanthaler",
           "knows": {
-            "@id": "http://greggkellogg.net/foaf#me"
+            "@id": "_:t0"
           }
-        },
-        {
-          "@id": "http://greggkellogg.net/foaf#me",
-          "name": "Gregg Kellogg"
         }
       ]
     }
     -->
     </pre>
 
-    <p>Please note that the flattened and compacted result will explicitly
-      designate the default graph by the <code>@graph</code> member in the top-level
-      <tref>JSON object</tref>, except if its value contains just one item.</p>
+    <p>Please note that the flattened and compacted result always explicitly
+      designates the default graph by the <code>@graph</code> member in the
+      top-level <tref>JSON object</tref>.</p>
   </section>
 
   <section class="informative">