W3C home > Mailing lists > Public > public-linked-json@w3.org > June 2011

Re: experiences promoting a JSON format for RDF

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Wed, 01 Jun 2011 22:59:46 -0400
Message-ID: <4DE6FCA2.3000603@digitalbazaar.com>
To: public-linked-json@w3.org
Ed,

Just some quick input on what we do in JSON-LD for the questions that
you asked Brian.

On 05/31/2011 09:57 AM, Ed Summers wrote:
> What would it look like if you happened to mix together two profiles? 

We had played around with the concept of allowing multiple profiles in
JSON-LD, like so:

  "@profile": [
     "http://example.org/profiles/contacts",
     "http://example.org/profiles/geo",
     "http://example.org/profiles/movies"
  ]

The profiles would be loaded start-to-finish, with duplicate values
being overridden by latter profiles. So, if "name" was declared in both
"contacts" and "movies", the declaration from "movies" would win. We
didn't know if this would be a popular feature. We're still waiting for
RDFa 1.1 to get some field use before we discover if people use the RDFa
Profiles feature, or if they don't find it that useful. We thought it
would be useful for people that subscribed to the Microformats philosophy.

> Or is
> the idea that there would be a resource would only be associated with
> one profile, and would like to other resources that have a different
> profile?

We thought that this would be standard practice and decided to not
support multiple values in @profile until people started asking for it.
That said, seems kinda lame to limit an object to use only one profile.

The downside to profiles is that the processor has to go out to the
network and fetch each one. It's not a big deal if there are a small
number of frequently used profiles. However, if there are many profiles
or, even worse, the profiles are auto-generated and have their own URL
/or/ don't use ETags/caching correctly, it can be a disaster for the
processor.

> In your implementation have you decided to allow GETs to
> http://ex.org/vocabs/hr/profile, and if you do, what do you return?

In JSON-LD, we return a standard JSON-LD context, something that looks
like this:

{
  "@context":
  {
    "name": "http://example.org/vocab#name",
    "phoneNumber": "http://example.org/vocab#phoneNumber",
    ...
  }
}

We've thought about removing the outer { "@context: ... } markup, but
also thought that it might clue people in that this document is supposed
to be used as a JSON-LD context.

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: PaySwarm Developer Tools and Demo Released
http://digitalbazaar.com/2011/05/05/payswarm-sandbox/
Received on Thursday, 2 June 2011 03:00:22 GMT

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