This wiki is locked. Future workgroup activity and specification development must take place at our new wiki. For more information, see this blog post about the new governance model and this post about changes to the website.

Evaluation of JSON-LD for OSLC Usage

Status of this Document: Informational purposes only

Purpose of this page is to determine if the standardization work for defining a JSON format for RDF would be acceptable for OSLC needs. There a number of factors to consider which will be outlined below.

Capability Supported? Notes
Namespace Supported Also has a way to do so by adding namespace prefix definitions that doesn't collide with OSLC's
Content type Supported Either application/ld+json or application/json is supported. OSLC uses application/json so no conflict
Blank nodes Supported Needed for OSLC Link Labels

Samples

oslc_cm:ChangeRequest as OSLC JSON

{
  "prefixes" : {
    "dcterms" : "http://purl.org/dc/terms/",
    "oslc"     : "http://open-services.net/ns/core#",
    "oslc_cm" : "http://open-services.net/ns/cm#",
    "ex"       : "http://example.com/bugtracker"
  },
  "rdf:about"           : "http://example.com/bugs/2314",
  "rdf:type" : [{
    "rdf:resource" : "http://open-services.net/ns/cm#ChangeRequest"
  }],
  "dcterms:identifier"  : "00002314",
  "oslc:shortTitle"     : "Bug 2314",
  "dcterms:title"       : "Invalid installation instructions",
  "oslc:instanceShape" : {
    "rdf:resource" : "http://example.com/shapes/defect"
  },
  "dcterms:description" : "Invalid installation instructions indicating invalid patches to be applied.",
  "dcterms:creator" : [{
    "rdf:resource" : "http://myserver/mycmapp/users/joe"
  }],
  "dcterms:contributor" : [{
    "rdf:resource" : "http://myserver/mycmapp/users/bob"
  }],
  "dcterms:modified" : "2008-09-16T08:42:11.265Z",
  "dcterms:created" : "2008-07-04T11:00:00.000Z",
  "oslc_cm:status" : "InProgress",
  "oslc_cm:tracksRequirement" : [{
    "rdf:resource" : "http://myserver/reqtool/req/34ef31af",
    "dcterms:title" : "Link label for local req"
  },
  { "rdf:resource" : "http://remoteserver/reqrepo/project1/req456",
    "dcterms:title" : "Req456: Link label for remote requirement"
  }],
  "ex:priority" : "Medium",
  "ex:severity" : "Normal"
}

oslc_cm:ChangeRequest as OSLC JSON + JSON-LD

{
  "@context" : {
    "dcterms" : "http://purl.org/dc/terms/",
    "oslc"     : "http://open-services.net/ns/core#",
    "oslc_cm" : "http://open-services.net/ns/cm#",
    "ex"       : "http://example.com/bugtracker"
  },
 "@id"       : "http://example.com/bugs/2314",
 "@type"   : "http://open-services.net/ns/cm#ChangeRequest",
  "prefixes" : {
    "dcterms" : "http://purl.org/dc/terms/",
    "oslc"     : "http://open-services.net/ns/core#",
    "oslc_cm" : "http://open-services.net/ns/cm#",
    "ex"       : "http://example.com/bugtracker"
  },
  "rdf:about"           : "http://example.com/bugs/2314",
  "rdf:type" : [{
    "rdf:resource" : "http://open-services.net/ns/cm#ChangeRequest"
  }],
  "dcterms:identifier"  : "00002314",
  "oslc:shortTitle"     : "Bug 2314",
  "dcterms:title"       : "Invalid installation instructions",
  "oslc:instanceShape" : {
    "rdf:resource" : "http://example.com/shapes/defect"
  },
  "dcterms:description" : "Invalid installation instructions indicating invalid patches to be applied.",
  "dcterms:creator" : [{
    "rdf:resource" : "http://myserver/mycmapp/users/joe"
  }],
  "dcterms:contributor" : [{
    "rdf:resource" : "http://myserver/mycmapp/users/bob"
  }],
  "dcterms:modified" : "2008-09-16T08:42:11.265Z",
  "dcterms:created" : "2008-07-04T11:00:00.000Z",
  "oslc_cm:status" : "InProgress",
  "oslc_cm:tracksRequirement" : [{
    "rdf:resource" : "http://myserver/reqtool/req/34ef31af",
    "dcterms:title" : "Link label for local req"
  },
  { "rdf:resource" : "http://remoteserver/reqrepo/project1/req456",
    "dcterms:title" : "Req456: Link label for remote requirement"
  }],
  "ex:priority" : "Medium",
  "ex:severity" : "Normal"
}

Issues

  1. What happens when a server returns any variant of JSON-LD it wants: compact, expanded, compact IRI
  2. Why is @type not defined to be same semantics as rdf:type ? see type defn It also appears to overload the definition of value type and resource type using @type, a problem?
  3. Appears that @type object doesn't support multi-values, i.e. doesn't allow for multi-typed resources.
  4. TODO: determine if how "link labels" will be represented and/or round tripped (likewise for other concepts such as bnodes)
  5. Still have the problem knowing objects vs. arrays ahead of time to ease consumers?
  6. Recommend this as 3.0 JSON format and how to migrate (or content negotiation)

Issues have been sent to the public-rdf-comments@w3.org maillist

References

Topic revision: r5 - 22 Aug 2012 - 18:51:24 - SteveSpeicher
 
This site is powered by the TWiki collaboration platform Copyright � by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Contributions are governed by our Terms of Use
Ideas, requests, problems regarding this site? Send feedback