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

Re: [JSON] the simple pivotal choice

From: Ivan Herman <ivan@w3.org>
Date: Fri, 11 Mar 2011 09:53:18 +0100
Cc: Nathan Rixham <nathan@webr3.org>, RDF WG <public-rdf-wg@w3.org>
Message-Id: <24455001-4A84-494A-8875-77A8D614E1E6@w3.org>
To: Thomas Steiner <tomac@google.com>

On Mar 11, 2011, at 09:42 , Thomas Steiner wrote:

> Hi Ivan, all,
> Thanks for chiming in! Comments below.
>> Are these really disjoint issues?
>> I guess JSON-LD is the type of
>> {
>>  "name" : "Nathan"
>> }
>> syntax. It seems (if my understanding is correct) that JSON-LD has the option of defining prefix and term mappings either in the file itself up in the hierarchy (that is the "#" key), but it also refers to a bunch of possible 'default' mapping that a processor may take into account.
> This makes definitively sense for the given use case, however, as soon
> as you start mixing vocabularies foaf:name and ex:name, we are back to
> the old XML problem of namespaces. JSON-LD suggests
> (http://json-ld.org/spec/latest/#mashing-up-vocabularies) the use of
> "ex:name", which breaks the dot-notation JavaScripters love (you can't
> write someObj.foaf:name).

Let us not go into a syntax issue, because I believe that is one. Obviously, the solution to avoid the terminology mixup is URI-s and we will have to come up with some syntax to handle them and prefixes, etc. And, clearly, that is the argument that we can use to vanilla json users to put on the RDF goggles.

The fundamental choice we seem to have (and, caveat, I am neither an experienced Javascript nor JSON user...) is whether we go the way of spelling out triples, something like

  "subject" : "uri1",
  "predicate" : "uri2",
  "object" : "something"

or whether we think in terms of JSON objects (is that the word?) where the keys are the same as our RDF predicates, and the values for those keys are our RDF objects, plus some extra to set an explicit subject if needed. Once we have decided that, we can worry about the details of the syntax...


>> (I guess Manu and Mark were pretty much inspired by what is happening in RDFa 1.1). What this means is that, for example,
>> {
>>  "name" : "Nathan"
>> }
>> may stand by 'itself' in the JSON world, if the data is integrated into RDF via a JSON-LD processor, that may be turned into a
>> [] foaf:name "Nathan" .
>> triple. The JSON-LD processor would then act as an RDF goggle  la Nathan.
> Again, I'm very much in favor of establishing well-known prefixes (so
> that it is known that foaf stands for http://xmlns.com/foaf/0.1/ by
> FIXED default), or even default namespaces (so that name would be
> known to be foaf:name by FLEXIBLE default).
>> I just try to be a bit more specific in our design options...
> And again repeating myself, I think we should try to think the Perl
> way: "Easy things should be easy and hard things should be possible"
> (last quote at http://en.wikiquote.org/wiki/Larry_Wall#Other)
> Cheers,
> Tom
> -- 
> Thomas Steiner, Research Scientist, Google Inc.
> http://blog.tomayac.com, http://twitter.com/tomayac

Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Friday, 11 March 2011 08:51:48 UTC

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