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

Re: What is the JSON-LD API?

From: Danny Ayers <danny.ayers@gmail.com>
Date: Thu, 1 Sep 2011 00:23:30 +0200
Message-ID: <CAM=Pv=S9OrMhuqb1+nN-nAdU1gf1p5PLPh1HX6M8meN6XY7G1A@mail.gmail.com>
To: Dave Longley <dlongley@digitalbazaar.com>
Cc: public-linked-json@w3.org
On 31 August 2011 22:37, Dave Longley <dlongley@digitalbazaar.com> wrote:

> This is the point of JSON-LD framing:
>
> Regular JSON developer version:
>
>   var object = JSON.parse( /* JSON */ );
>   var title = object.book.title;
>
> JSON-LD developer version:
>
>   var frame = {/* custom frame for an object containing a book */ };
>   var object = jsonld.frame(JSON.parse( /* JSON-LD */ ), frame);
>   var title = object.book.title;
>
> A JSON-LD frame allows a developer to provide the specific structure they
> would like the incoming object to take on. The frame API then essentially
> "fills out" the frame using the incoming JSON-LD data.

So essentially this is a transformation language & engine. Doesn't the
fact that this level of engineering is needed suggest that the input
format is too complex?

If significant transformation is to take place, surely e.g. a kind of
J-triples syntax could be used for the interchange format. At least
that simplifies things for the producer.

Wouldn't it be better to simplify the format so the developer can
"rely on structure" (as you put it) directly?

I really fail to see how this is taking advantage of the simplicity of
JSON. I mean, the same end result could be fulfilled by passing Turtle
format over the wire and providing developers with a parsing &
templating library that makes JSON objects.

I don't know, this seems to be so contrary to what I imagine would be
a good design that I can only assume I'm looking at it the wrong way.
So I'm going to just sit back and watch what happens :)

Cheers,
Danny.

-- 
http://dannyayers.com
Received on Wednesday, 31 August 2011 22:24:08 GMT

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