W3C home > Mailing lists > Public > public-rdf-wg@w3.org > April 2011

[JSON] A starting point...

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Tue, 05 Apr 2011 20:50:38 -0400
Message-ID: <4D9BB8DE.4040609@digitalbazaar.com>
To: RDF Working Group <public-rdf-wg@w3.org>
I really liked Nathan's proposal a few weeks ago:

http://lists.w3.org/Archives/Public/public-rdf-wg/2011Mar/0565.html

Tom's serialization work is also excellent, and is a must read before
diving any further into this e-mail:

http://www.w3.org/2011/rdf-wg/wiki/JSON-Serialization-Examples

I'd like to see if we can come to some sort of consensus on a starting
point based on Nathan's proposal. I'm going to remove things that raised
issues w/ some people and see if we can all agree if the result could be
the starting point for the JSON work.

Note that this proposal is imperfect by design - it is only here to
capture the things that the majority of the group seem to agree upon.
It's merely meant to put a stake in the ground so that we may start
building on top of it. If we can get agreement on these 5 principles,
then we can add on features as the group discusses them:

1: Constrain JSON [1] to be an (optionally nested) sequence of one or
   more objects (where one, no enclosing [] is needed).

2: constrain object keys to be strings with no white space.

3: add recognition for a special "@id" property who's value is an IRI
   (sets the subject of the object when present).

4: add recognition for a special "@type" property who's value is a
   simple string. The value is looked up in the @context.

5: Support a "@context" property that allows for a set of mappings from
   JSON keys to IRIs.

{
  "@context":
  {
     "Person": "http://xmlns.com/0.1/foaf/Person",
     "name": "http://xmlns.com/0.1/foaf/name",
  },
  "@id": "http://jondoe.example.org/#me",
  "@type": "Person",
  "name": "Nathan Rixham"
}

That's it - please +1 below each number if you support the general
direction of the feature. -1 if you don't, please explain if you don't.
It's been around 2 weeks, so hopefully some of us have had time to let
these ideas kick around in our heads for a while. I'll try to setup a
Doodle poll to have a discussion about this proposal later on in the
week as well as discuss some of the serialization work that Tom has done.

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: The PaySwarm Vocabulary
http://digitalbazaar.com/2011/03/31/payswarm-vocab/
Received on Wednesday, 6 April 2011 00:51:02 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:25:41 GMT