Re: JSON-LD - Universal Linked Data markup for Web Services

On 05/31/2010 06:40 AM, Robin Berjon wrote:
> I don't want to speak for this WG, and I'd rather we looked more
> closely at technology before thinking about publication. I think we
> ought to point out that rechartering WebApps isn't the easiest thing
> ever, so that adding deliverables might prove tricky no matter what.

Understandable... never hurts to ask. :)

> - This is an interesting project, but I don't think that you want to
> set out with the goal of producing a replacement for SOAP. 

Sorry, didn't mean to make it seem like it was a complete replacement
for SOAP. JSON-LD, combined with a number of other design patterns that
are starting to become standard on the web, could do something similar
to what SOAP was and is used for today.

> You want
> your goal to be something like the exchange of semantically rich
> information using JSON that addresses the needs of a large segment of
> the Web community. If it helps bring SOAP to the horrible death it so
> dearly deserves, fine, but that's a side-effect.

Agreed.

> - Your approach is built on the idea of encoding RDF or RDF-like
> models into JSON. That has the downside of requiring people who
> already have and use JSON-based exchange systems to change their
> data. 

Actually, it doesn't require developers to change their data. At least,
it doesn't require them to change immediately - they can do so at their
leisure. It's not clear in the spec right now, but all a Web Service
that consumes data needs to do to be JSON-LD compatible is declare a
default context. Therefore, if their input data was something like this
before:

{
   "IsMember" : true,
   "Name" : "John",
   "Age" : 24
}

Their service could define a default context like so:

{
   "a" : "Context",
   "IsMember" : "http://example.org/vocabs#member",
   "Name" : "http://xmlns.com/foaf/0.1/name",
   "Age" : "http://xmlns.com/foaf/0.1/age",
   "ex" : "http://example.org/vocabs#",
   "foaf" : "http://xmlns.com/foaf/0.1/"
}

So the data that they send up is the same as before, but it gets
automatically translated (at some point) to this:

{
   "http://example.org/vocabs#member" : true,
   "http://xmlns.com/foaf/0.1/name" : "John",
   "http://xmlns.com/foaf/0.1/age" : 24
}

or they can mix/match:

{
   "IsMember" : true,
   "foaf:name" : "John",
   "http://xmlns.com/foaf/0.1/age" : 24
}

or they can use the new markup:

{
   "ex:member" : true,
   "foaf:name" : "John",
   "foaf:age" : 24
}

All of these are valid in JSON-LD and they don't require the data source
to change their ways. The data consumer is the only one that needs to
change (and they would be the one that chooses to use JSON-LD).

> Experience tends to show that that's rarely a very popular
> option. 

Which is why it was avoided :P

> Have you considered taking a more GRDDL-like road and
> providing a way to map existing JSON to a richer, more contextualised
> semantic model? 

I think that's the approach that was taken, right?

> I'd
> recommend taking a good look at JSON Schema in this context. Notably,
> they've been adding ways of mapping simple values to links from the
> schema, and those links can be typed (as in @rel). I haven't gone
> through the motions, but I think that this gives you a lot of power
> in mapping JSON to something RDFy.

I had looked at JSON Schema before, but not in this context. I looked at
it again and nothing popped to mind. I'll study it a bit more deeply the
next time I work on the JSON-LD specification.

Thanks for the input, Robin! It was very helpful in pointing out the
things that need to be explained in more detail in the spec. I need to
explain the "you can continue to use the JSON that you've been using"
concept more thoroughly.

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: Bitmunk 3.2.2 - Good Relations and Ditching Apache+PHP
http://blog.digitalbazaar.com/2010/05/06/bitmunk-3-2-2/2/

Received on Wednesday, 2 June 2010 03:47:51 UTC