The guidance for JSON states that JSON representations should have a type:

   rdf:type A resource can have multiple types, so this is a JSON Array of
   objects, each with an rdf:resource field that is a type of the resource.

Looking over the examples, it appears that rdf:type is not an array:

   {
      "prefixes" : {
         "oslc": "http://open-services.net/ns/core#";,
         "rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#";,
         "foaf" : "http://http://xmlns.com/foaf/0.1/";,
         "dcterms" : "http://purl.org/dc/terms/";
      },
      "rdf:type" : { "rdf:resource" :
   "http://open-services.net/ns/bogus/blogs#Entry"; },
      "rdf:about" : "http://example.com/blogs/entry/1";,
      "dcterms:title" : "I love trash",
      "dcterms:modified" : "2002-10-10T12:00:00-05:00",
      "dcterms:content" : "Anything dirty or dingy or dusty. \\nAnything
   ragged or rotten or rusty.",
      "dcterms:creator" : {
         "foaf:name" : "Oscar T. Grouch"
      },
   }

I am thinking the following is the correct example:

   {
      "prefixes" : {
         "oslc": "http://open-services.net/ns/core#";,
         "rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#";,
         "foaf" : "http://http://xmlns.com/foaf/0.1/";,
         "dcterms" : "http://purl.org/dc/terms/";
      },
      "rdf:type" : [ { "rdf:resource" :
   "http://open-services.net/ns/bogus/blogs#Entry"; } ],
      "rdf:about" : "http://example.com/blogs/entry/1";,
      "dcterms:title" : "I love trash",
      "dcterms:modified" : "2002-10-10T12:00:00-05:00",
      "dcterms:content" : "Anything dirty or dingy or dusty. \\nAnything
   ragged or rotten or rusty.",
      "dcterms:creator" : {
         "foaf:name" : "Oscar T. Grouch"
      },
   }

Is this an error in the example, or in my understanding of spec?




<jim/>

jim conallen
CAM Lead Architect, OSLC AM Lead
[email protected]
Rational Software, IBM Software Group

Reply via email to