W3C home > Mailing lists > Public > public-linked-json@w3.org > July 2013

RE: LevelGraph and JSONLD

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Thu, 18 Jul 2013 14:04:52 +0200
To: <public-linked-json@w3.org>
Message-ID: <011801ce83af$02c651b0$0852f510$@lanthaler@gmx.net>
On Thursday, July 18, 2013 1:02 PM, Matteo Collina wrote:
> I got the principle and the possibility intrigues me a lot, and it
> seems feasible to implement it on top of LevelGraph-JSONLD as a query
> language. I still do not get what the output might be, given some
> input documents and a frame. After I have a full example I can write
> the support for it in LevelGraph-JSONLD. You should put a full framing
> example in the playground, and update the spec, too!
> 
> If you want to build it yourself, you can do a pull-request or I can
> just give you committer access to LevelGraph-JSONLD :).

Have a look at my playground:

  http://www.markus-lanthaler.com/jsonld/playground/

And click on the "Library" example at the top. Then make sure that the
"Framed" tab is selected. If you look at the input document on the left side
you'll see that the data isn't nested at all, the result however is. This is
done according the specified frame on the right hand side.

In my implementation you can also filter by @id, e.g., so if you would have
multiple libraries, you could select the one you are interested in.

There's no documentation for this right now but maybe looking at my
implementation helps!? The interesting parts are in the nodeMatchesFrame
method:

  https://github.com/lanthaler/JsonLD/blob/master/Processor.php#L2278

It still needs a bit of love and doesn't handle certain things yet (lists,
reverse properties) but you should get the idea. Probably it's much easier
to implement in LevelGraph since you can query more easily over triples.
Dunno. Unfortunately I don't have the time right now to get my hands dirty
but I can at least answer questions you may have :-P

The other resource you might wanna look at are the framing tests:
  https://github.com/json-ld/json-ld.org/tree/master/test-suite/tests


I do not pass all the tests since I modified some behavior, most of my
modifications are described here
  - value matching (https://github.com/json-ld/json-ld.org/issues/110)
  - deep-filtering (https://github.com/json-ld/json-ld.org/issues/110)
  - aggressive re-embedding
(https://github.com/json-ld/json-ld.org/issues/119)
  - named graphs (https://github.com/json-ld/json-ld.org/issues/118)



--
Markus Lanthaler
@markuslanthaler
Received on Thursday, 18 July 2013 12:05:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:18:38 UTC