Re: [JSON] RDF collections and JSON arrays

On 03/24/2011 07:25 PM, Pat Hayes wrote:
> Um... I am not sure if this is trivial or obvious, but has the WG
> thought about the RDF collections vocabulary in the JSON context?

The WG has not discussed it yet, but Nathan raised the issue in JSN3
around a year ago:

(look at section 2.2: Basic structure - list)
http://webr3.org/apps/specs/jsn3/

and I thought that it may be a good idea and placed an issue marker in
the JSON-LD spec:

(scroll all the way to the ISSUE at the bottom of the processing algorithm)
http://json-ld.org/spec/ED/20110201/#the-json-ld-processing-algorithm

> Since this is supposed to correspond as nearly as possible to a LISP
> list, it seems it would be 'natural' for an RDF collection to map
> into a JSON array. And if this is to round-trip, then these arrays
> must be somehow marked as coming from an RDF collection so that they
> can be mapped back into one.

Yep, that was one possibility.

> I wish I had something more constructive to offer on this point, but
> I don't, other than to suggest it might turn out to be important,
> since the collection vocabulary is used to extensively in the OWL/RDF
> syntax. While OWL is not a prime target for our WG, it would seem to
> be a good idea to define a JSON mapping which does not completely
> screw up OWL, if at all possible.

Nathan and I though that the double array syntax might work well for
some folks:

{
   "ex:mylist": [["1", "2", "3"]]
}

It's the first time that I looked at an RDF serialization that had lists
in them and didn't immediately feel sick. That said, don't know how
important this is. I know that one of the complaints from our developers
is the dismal support for specifying simple ordered sets in RDF. It's
also interesting that so many people get by without these types of
simple ordered sets.

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: Payment Standards and Competition
http://digitalbazaar.com/2011/02/28/payment-standards/

Received on Friday, 25 March 2011 01:55:28 UTC