Always use @value in expanded form.
authorDave Longley <dlongley@digitalbazaar.com>
Tue, 08 May 2012 14:58:32 -0400
changeset 635 40db458d795d
parent 634 ee1bf5e4b3dc
child 636 25d2884c6667
Always use @value in expanded form.
test-suite/tests/expand-0002-out.jsonld
test-suite/tests/expand-0004-in.jsonld
test-suite/tests/expand-0004-out.jsonld
test-suite/tests/expand-0005-out.jsonld
test-suite/tests/expand-0006-out.jsonld
test-suite/tests/expand-0008-in.jsonld
test-suite/tests/expand-0008-out.jsonld
test-suite/tests/expand-0009-out.jsonld
test-suite/tests/expand-0010-out.jsonld
test-suite/tests/expand-0011-out.jsonld
test-suite/tests/expand-0012-out.jsonld
test-suite/tests/expand-0013-out.jsonld
test-suite/tests/expand-0014-out.jsonld
test-suite/tests/expand-0015-out.jsonld
test-suite/tests/expand-0016-out.jsonld
test-suite/tests/expand-0017-out.jsonld
test-suite/tests/expand-0018-out.jsonld
test-suite/tests/expand-0020-out.jsonld
test-suite/tests/expand-0021-out.jsonld
test-suite/tests/expand-0024-out.jsonld
--- a/test-suite/tests/expand-0002-out.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0002-out.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -1,9 +1,9 @@
 [{
   "@id": "http://example.com/id1",
   "@type": ["http://example.com/t1"],
-  "http://example.com/term1": ["v1"],
+  "http://example.com/term1": [{"@value": "v1"}],
   "http://example.com/term2": [{"@value": "v2", "@type": "http://example.com/t2"}],
   "http://example.com/term3": [{"@value": "v3", "@language": "en"}],
-  "http://example.com/term4": [4],
-  "http://example.com/term5": [50, 51]
+  "http://example.com/term4": [{"@value": 4}],
+  "http://example.com/term5": [{"@value": 50}, {"@value": 51}]
 }]
\ No newline at end of file
--- a/test-suite/tests/expand-0004-in.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0004-in.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -10,8 +10,8 @@
   "mylist2": "one item",
   "myset2": { "@set": [ ] },
   "myset3": [ "v1" ],
-  "http://example.org/list1": { "@list": [] },
-  "http://example.org/list2": { "@list": [ null ] },
+  "http://example.org/list1": { "@list": [ null ] },
+  "http://example.org/list2": { "@list": [ {"@value": null} ] },
   "http://example.org/set1": { "@set": [ ] },
   "http://example.org/set1": { "@set": [ null ] },
   "http://example.org/set3": [ ],
--- a/test-suite/tests/expand-0004-out.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0004-out.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -1,15 +1,15 @@
 [{
   "@id": "http://example.org/id",
   "http://example.com/mylist1": [ { "@list": [ ] } ],
-  "http://example.com/mylist2": [ { "@list": [ "one item" ] } ],
+  "http://example.com/mylist2": [ { "@list": [ {"@value": "one item"} ] } ],
   "http://example.com/myset2": [ ],
-  "http://example.com/myset3": [ "v1" ],
+  "http://example.com/myset3": [ {"@value": "v1"} ],
   "http://example.org/list1": [ { "@list": [ ] } ],
   "http://example.org/list2": [ { "@list": [ ] } ],
   "http://example.org/set1": [ ],
   "http://example.org/set1": [ ],
   "http://example.org/set3": [ ],
   "http://example.org/set4": [ ],
-  "http://example.org/set5": [ "one item" ],
-  "http://example.org/property": [ { "@list": [ "one item" ] } ]
+  "http://example.org/set5": [ {"@value": "one item"} ],
+  "http://example.org/property": [ { "@list": [ {"@value": "one item"} ] } ]
 }]
--- a/test-suite/tests/expand-0005-out.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0005-out.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -3,13 +3,13 @@
   "http://xmlns.com/foaf/0.1/knows": [
     {
       "@id": "http://example.com/bob#me",
-      "http://xmlns.com/foaf/0.1/name": ["Bob"],
+      "http://xmlns.com/foaf/0.1/name": [{"@value": "Bob"}],
       "http://xmlns.com/foaf/0.1/homepage": [{
         "@id": "http://example.com/bob"
       }]
     }, {
       "@id": "http://example.com/alice#me",
-      "http://xmlns.com/foaf/0.1/name": ["Alice"],
+      "http://xmlns.com/foaf/0.1/name": [{"@value": "Alice"}],
       "http://xmlns.com/foaf/0.1/homepage": [{
         "@id": "http://example.com/alice"
       }]
--- a/test-suite/tests/expand-0006-out.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0006-out.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -2,7 +2,7 @@
   "@id": "http://example.org/test#example1",
   "http://example.org/test#property1": [{
     "@id": "http://example.org/test#example2",
-    "http://example.org/test#property4": ["foo"]
+    "http://example.org/test#property4": [{"@value": "foo"}]
   }],
   "http://example.org/test#property2": [{
     "@id": "http://example.org/test#example3"
--- a/test-suite/tests/expand-0008-in.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0008-in.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -5,5 +5,5 @@
   "@id": "http://example.org/test",
   "ex:test": { "@value": "test",  "@language": "en" },
   "ex:drop-lang-only": { "@language": "en" },
-  "ex:simplify-value-only": { "@value": "only value" }
+  "ex:keep-full-value": { "@value": "only value" }
 }
--- a/test-suite/tests/expand-0008-out.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0008-out.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -2,6 +2,6 @@
   {
     "@id": "http://example.org/test",
     "http://example.org/vocab#test": [ { "@value": "test", "@language": "en" } ],
-    "http://example.org/vocab#simplify-value-only": [ "only value" ]
+    "http://example.org/vocab#keep-full-value": [ {"@value": "only value"} ]
   }
 ]
--- a/test-suite/tests/expand-0009-out.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0009-out.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -1,19 +1,19 @@
 [
   {
     "@id": "http://example.org/test#chapter",
-    "http://purl.org/dc/elements/1.1/description": ["Fun"],
-    "http://purl.org/dc/elements/1.1/title": ["Chapter One"]
+    "http://purl.org/dc/elements/1.1/description": [{"@value": "Fun"}],
+    "http://purl.org/dc/elements/1.1/title": [{"@value": "Chapter One"}]
   },
   {
     "@id": "http://example.org/test#jane",
     "http://example.org/vocab#authored": [{
       "@id": "http://example.org/test#chapter"
     }],
-    "http://xmlns.com/foaf/0.1/name": ["Jane"]
+    "http://xmlns.com/foaf/0.1/name": [{"@value": "Jane"}]
   },
   {
     "@id": "http://example.org/test#john",
-    "http://xmlns.com/foaf/0.1/name": ["John"]
+    "http://xmlns.com/foaf/0.1/name": [{"@value": "John"}]
   },
   {
     "@id": "http://example.org/test#library",
@@ -22,8 +22,8 @@
       "http://example.org/vocab#contains": [{
         "@id": "http://example.org/test#chapter"
       }],
-      "http://purl.org/dc/elements/1.1/contributor": ["Writer"],
-      "http://purl.org/dc/elements/1.1/title": ["My Book"]
+      "http://purl.org/dc/elements/1.1/contributor": [{"@value": "Writer"}],
+      "http://purl.org/dc/elements/1.1/title": [{"@value": "My Book"}]
     }]
   }
 ]
\ No newline at end of file
--- a/test-suite/tests/expand-0010-out.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0010-out.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -1,5 +1,5 @@
 [{
   "@id": "http://example.org/test",
-  "http://example.org/vocab#bool": [true],
-  "http://example.org/vocab#int": [123]
+  "http://example.org/vocab#bool": [{"@value": true}],
+  "http://example.org/vocab#int": [{"@value": 123}]
 }]
\ No newline at end of file
--- a/test-suite/tests/expand-0011-out.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0011-out.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -3,5 +3,5 @@
   "http://example.org/vocab#contains": [{
     "@id": "http://example.org/test#chapter"
   }],
-  "http://purl.org/dc/elements/1.1/title": ["Title"]
+  "http://purl.org/dc/elements/1.1/title": [{"@value": "Title"}]
 }]
\ No newline at end of file
--- a/test-suite/tests/expand-0012-out.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0012-out.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -1,19 +1,19 @@
 [
   {
     "@id": "http://example.org/test#chapter",
-    "http://purl.org/dc/elements/1.1/description": ["Fun"],
-    "http://purl.org/dc/elements/1.1/title": ["Chapter One"]
+    "http://purl.org/dc/elements/1.1/description": [{"@value": "Fun"}],
+    "http://purl.org/dc/elements/1.1/title": [{"@value": "Chapter One"}]
   },
   {
     "@id": "http://example.org/test#jane",
     "http://example.org/vocab#authored": [{
       "@id": "http://example.org/test#chapter"
     }],
-    "http://xmlns.com/foaf/0.1/name": ["Jane"]
+    "http://xmlns.com/foaf/0.1/name": [{"@value": "Jane"}]
   },
   {
     "@id": "http://example.org/test#john",
-    "http://xmlns.com/foaf/0.1/name": ["John"]
+    "http://xmlns.com/foaf/0.1/name": [{"@value": "John"}]
   },
   {
     "@id": "http://example.org/test#library",
@@ -22,8 +22,8 @@
       "http://example.org/vocab#contains": [{
         "@id": "http://example.org/test#chapter"
       }],
-      "http://purl.org/dc/elements/1.1/contributor": ["Writer"],
-      "http://purl.org/dc/elements/1.1/title": ["My Book"]
+      "http://purl.org/dc/elements/1.1/contributor": [{"@value": "Writer"}],
+      "http://purl.org/dc/elements/1.1/title": [{"@value": "My Book"}]
     }]
   }
 ]
\ No newline at end of file
--- a/test-suite/tests/expand-0013-out.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0013-out.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -1,9 +1,9 @@
 [{
   "@id": "http://example.com/id1",
   "@type": ["http://example.com/t1"],
-  "http://example.com/term1": ["v1"],
+  "http://example.com/term1": [{"@value": "v1"}],
   "http://example.com/term2": [{"@value": "v2", "@type": "http://example.com/t2"}],
   "http://example.com/term3": [{"@value": "v3", "@language": "en"}],
-  "http://example.com/term4": [4],
-  "http://example.com/term5": [50, 51]
+  "http://example.com/term4": [{"@value": 4}],
+  "http://example.com/term5": [{"@value": 50}, {"@value": 51}]
 }]
\ No newline at end of file
--- a/test-suite/tests/expand-0014-out.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0014-out.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -4,7 +4,7 @@
       {
         "@id": "http://example.org/test#example2",
         "http://example.org/test#property4": [
-          "foo"
+          {"@value": "foo"}
         ]
       }
     ],
--- a/test-suite/tests/expand-0015-out.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0015-out.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -4,6 +4,11 @@
     "http://example.com/mylist1": [ { "@list": [] } ],
     "http://example.com/myset1": [ ],
     "http://example.com/myset2": [ ],
-    "http://example.com/myset3": [ "hello", "this", "will", "be", "collapsed" ]
+    "http://example.com/myset3": [
+      {"@value": "hello"},
+      {"@value": "this"},
+      {"@value": "will"},
+      {"@value": "be"},
+      {"@value": "collapsed"} ]
   }
 ]
--- a/test-suite/tests/expand-0016-out.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0016-out.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -2,13 +2,15 @@
   {
     "@id": "http://example.org/id1",
     "http://example.com/mylist1": [ { "@list": [] } ],
-    "http://example.com/mylist2": [ { "@list": [ 2, "hi" ] } ],
+    "http://example.com/mylist2": [
+      { "@list": [ {"@value": 2}, {"@value": "hi"} ] }
+    ],
     "http://example.com/myset1": [ ],
     "http://example.com/myset2": [ ],
     "http://example.com/myproperty": [
       {
         "@id": "http://example.org/id2",
-        "http://example.org/myproperty2": [ "ok" ]
+        "http://example.org/myproperty2": [ {"@value": "ok"} ]
       }
     ],
     "http://example.com/emptyobj": [ { } ]
--- a/test-suite/tests/expand-0017-out.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0017-out.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -1,19 +1,19 @@
 [
   {
     "@id": "http://example.org/test#chapter",
-    "http://purl.org/dc/elements/1.1/description": ["Fun"],
-    "http://purl.org/dc/elements/1.1/title": ["Chapter One"]
+    "http://purl.org/dc/elements/1.1/description": [{"@value": "Fun"}],
+    "http://purl.org/dc/elements/1.1/title": [{"@value": "Chapter One"}]
   },
   {
     "@id": "http://example.org/test#jane",
     "http://example.org/vocab#authored": [{
       "@id": "http://example.org/test#chapter"
     }],
-    "http://xmlns.com/foaf/0.1/name": ["Jane"]
+    "http://xmlns.com/foaf/0.1/name": [{"@value": "Jane"}]
   },
   {
     "@id": "http://example.org/test#john",
-    "http://xmlns.com/foaf/0.1/name": ["John"]
+    "http://xmlns.com/foaf/0.1/name": [{"@value": "John"}]
   },
   {
     "@id": "http://example.org/test#library",
@@ -22,8 +22,8 @@
       "http://example.org/vocab#contains": [{
         "@id": "http://example.org/test#chapter"
       }],
-      "http://purl.org/dc/elements/1.1/contributor": ["Writer"],
-      "http://purl.org/dc/elements/1.1/title": ["My Book"]
+      "http://purl.org/dc/elements/1.1/contributor": [{"@value": "Writer"}],
+      "http://purl.org/dc/elements/1.1/title": [{"@value": "My Book"}]
     }]
   }
 ]
\ No newline at end of file
--- a/test-suite/tests/expand-0018-out.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0018-out.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -3,6 +3,6 @@
     "@id": "http://example.org/test",
     "http://example.org/vocab#test-default": [ { "@value": "hello", "@language": "en" } ],
     "http://example.org/vocab#german": [ { "@value": "hallo", "@language": "de" } ],
-    "http://example.org/vocab#nolang": [ "no language" ]
+    "http://example.org/vocab#nolang": [ {"@value": "no language"} ]
   }
 ]
--- a/test-suite/tests/expand-0020-out.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0020-out.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -1,19 +1,19 @@
 [
   {
     "@id": "http://example.org/test#jane",
-    "http://xmlns.com/foaf/0.1/name": [ "Jane" ],
+    "http://xmlns.com/foaf/0.1/name": [ {"@value": "Jane"} ],
     "http://example.org/vocab#authored": [
       {
         "@graph": [
           {
             "@id": "http://example.org/test#chapter1",
-            "http://purl.org/dc/elements/1.1/description": [ "Fun" ],
-            "http://purl.org/dc/elements/1.1/title": [ "Chapter One" ]
+            "http://purl.org/dc/elements/1.1/description": [ {"@value": "Fun"} ],
+            "http://purl.org/dc/elements/1.1/title": [ {"@value": "Chapter One"} ]
           },
           {
             "@id": "http://example.org/test#chapter2",
-            "http://purl.org/dc/elements/1.1/description": [ "More fun" ],
-            "http://purl.org/dc/elements/1.1/title": [ "Chapter Two" ]
+            "http://purl.org/dc/elements/1.1/description": [ {"@value": "More fun"} ],
+            "http://purl.org/dc/elements/1.1/title": [ {"@value": "Chapter Two"} ]
           }
         ]
       }
@@ -21,7 +21,7 @@
   },
   {
     "@id": "http://example.org/test#john",
-    "http://xmlns.com/foaf/0.1/name": [ "John" ]
+    "http://xmlns.com/foaf/0.1/name": [ {"@value": "John"} ]
   },
   {
     "@id": "http://example.org/test#library",
@@ -29,8 +29,8 @@
       {
         "@id": "http://example.org/test#book",
         "http://example.org/vocab#contains": [ { "@id": "http://example.org/test#chapter" } ],
-        "http://purl.org/dc/elements/1.1/contributor": [ "Writer" ],
-        "http://purl.org/dc/elements/1.1/title": [ "My Book" ]
+        "http://purl.org/dc/elements/1.1/contributor": [ {"@value": "Writer"} ],
+        "http://purl.org/dc/elements/1.1/title": [ {"@value": "My Book"} ]
       }
     ]
   }
--- a/test-suite/tests/expand-0021-out.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0021-out.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -1,31 +1,31 @@
 [
   {
-    "http://purl.org/dc/elements/1.1/title": [ "My first graph" ],
+    "http://purl.org/dc/elements/1.1/title": [ {"@value": "My first graph"} ],
     "@graph": [
       {
         "@id": "http://example.org/test#jane",
-        "http://xmlns.com/foaf/0.1/name": [ "Jane" ],
+        "http://xmlns.com/foaf/0.1/name": [ {"@value": "Jane"} ],
         "http://example.org/vocab#authored": [
           {
             "@graph": [
               {
                 "@id": "http://example.org/test#chapter1",
-                "http://purl.org/dc/elements/1.1/description": [ "Fun" ],
-                "http://purl.org/dc/elements/1.1/title": [ "Chapter One" ]
+                "http://purl.org/dc/elements/1.1/description": [ {"@value": "Fun"} ],
+                "http://purl.org/dc/elements/1.1/title": [ {"@value": "Chapter One"} ]
               },
               {
                 "@id": "http://example.org/test#chapter2",
-                "http://purl.org/dc/elements/1.1/description": [ "More fun" ],
-                "http://purl.org/dc/elements/1.1/title": [ "Chapter Two" ]
+                "http://purl.org/dc/elements/1.1/description": [ {"@value": "More fun"} ],
+                "http://purl.org/dc/elements/1.1/title": [ {"@value": "Chapter Two"} ]
               },
-              "http://example.org/test#chapter3"
+              {"@id": "http://example.org/test#chapter3"}
             ]
           }
         ]
       },
       {
         "@id": "http://example.org/test#john",
-        "http://xmlns.com/foaf/0.1/name": [ "John" ]
+        "http://xmlns.com/foaf/0.1/name": [ {"@value": "John"} ]
       },
       {
         "@id": "http://example.org/test#library",
@@ -33,8 +33,8 @@
           {
             "@id": "http://example.org/test#book",
             "http://example.org/vocab#contains": [ { "@id": "http://example.org/test#chapter" } ],
-            "http://purl.org/dc/elements/1.1/contributor": [ "Writer" ],
-            "http://purl.org/dc/elements/1.1/title": [ "My Book" ]
+            "http://purl.org/dc/elements/1.1/contributor": [ {"@value": "Writer"} ],
+            "http://purl.org/dc/elements/1.1/title": [ {"@value": "My Book"} ]
           }
         ]
       }
--- a/test-suite/tests/expand-0024-out.jsonld	Mon May 07 15:52:11 2012 -0400
+++ b/test-suite/tests/expand-0024-out.jsonld	Tue May 08 14:58:32 2012 -0400
@@ -1,7 +1,7 @@
 [{
   "@id": "http://example.com/speakers#Alice",
-  "http://xmlns.com/foaf/0.1/name": ["Alice"],
+  "http://xmlns.com/foaf/0.1/name": [{"@value": "Alice"}],
   "http://xmlns.com/foaf/0.1/homepage": [{"@id": "http://xkcd.com/177/"}],
-  "http://www.w3.org/2002/12/cal/ical#summary": ["Alice Talk"],
-  "http://www.w3.org/2002/12/cal/ical#location": ["Lyon Convention Centre, Lyon, France"]
+  "http://www.w3.org/2002/12/cal/ical#summary": [{"@value": "Alice Talk"}],
+  "http://www.w3.org/2002/12/cal/ical#location": [{"@value": "Lyon Convention Centre, Lyon, France"}]
 }]
\ No newline at end of file