Lists with Identity

Dear all,

In two projects* I've run into a pattern which is perhaps a common issue
that could benefit from being more broadly discussed.

If there is an rdf:List resource that has identity of its own, perhaps with
other statements about it, then it seems like rdf:first and rdf:rest need
to be instantiated directly within the JSON rather simply as a JSON list.

For example:

<foo:mySequence> a sc:Sequence, rdf:List ;
  rdfs:label "Default Order of Resources" ;
  rdf:first <resource1> ;
  rdf:rest _:b1.
...

Which gets turned into something like:

{
  "@id":"foo:mySequence",
  "@type":["sc:Sequence","rdf:List"],
  "label": "Default Order of Resources",
  "first": "x:resource1",
  "rest": ["x:resource2", ...]
}

Which pushes some of the RDF model in the face of the JSON developer that
would be nice to avoid.  Thus the question is whether something like:

{
  "@id":"foo:mySequence",
  "@new-list-keyword-here": ["x:resource1", "x:resource2", ...]
}

might be more convenient?  Unless I've just missed something like this in
the documentation?


Many thanks,

Rob Sanderson

* http://www.openannotation.org/spec/core/multiplicity.html#List
and http://www.shared-canvas.org/datamodel/iiif-metadata.html#Sequence

Received on Monday, 29 April 2013 21:37:06 UTC