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

[JSON] The best of both worlds?

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Sun, 20 Mar 2011 22:25:02 -0400
Message-ID: <4D86B6FE.7020403@digitalbazaar.com>
To: RDF Working Group <public-rdf-wg@w3.org>
Thinking a bit more about how this object-based vs. triple-based
approach has turned into a divisive discussion (partly my fault, I'm
sure). There is another option - we support both approaches in a single
format by providing something in the default context to switch between
the two mechanisms, so object based would be this:

   "#": { "name": "http://xmlns.com/foaf/0.1/name" },
   "@": "http://example.com/people#david",
   "name": "David Wood@en"

and triple-based would be something like this:

         "subject": "http://example.org/people#david"
         "predicate": "http://xmlns.com/foaf/0.1/name"
            "value": "David Wood"
            "language": "en"

The framing of these objects above is a bit ugly, but it's something
that I know would work in JSON-LD (just as a proof of concept).

Basically, the RDF in JSON processor would have two modes of operation,
the first is the object-based mechanism. The second is the triple-based
mechanism. The interesting thing with this approach is that you could
switch between the two fairly easily. The other way that we could do
this is by switching off of the top-level JSON object:

{ ... } -> object-based processing mode
[ ... ] -> triple-based processing mode

So, we may not have to pick - this approach could effectively combine
RDF/JSON / Flat Triples / JTriples with JSON-LD / JSN3 / RDFj.

We could call it: FlatJTriplesinJSONwithRDFandJSN3jGRDDLforLinkedData :P

-- manu

Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: Payment Standards and Competition
Received on Monday, 21 March 2011 02:25:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:04:04 UTC