W3C home > Mailing lists > Public > public-linked-json@w3.org > November 2014

Question about serializing a graph to different JSON structures

From: Olivier Rossel <olivier.rossel@gmail.com>
Date: Mon, 24 Nov 2014 11:52:58 +0100
Message-ID: <CAM0wMfQaXpTHEz6ccn5Pa-rhTay+FLWZ04N1JxAJQWJsUDvX7Q@mail.gmail.com>
To: public-linked-json <public-linked-json@w3.org>
Hi guys.

I might be a little off-topic here.
But I hope you can help me figure out the JSON-way of doing things.

I maintain a small search engine at search.datao.net.
Try for example http://search.datao.net/?q=tom+cruise

The returned data is JSON.
The tree structure is fixed at the moment:
an array of objects with a _id, a endpoint object, some rdfslabels,
some rdfstypes, some owlsameas.

Now I need to propose different tree structures over the same data.
For example, I want to provide a JSON structure that looks like a map
of "endoints to the objects
of that endpoint".
Or, for example, a JSON structure that looks like a map of "rdfstypes
to the objects of that rdfstype".

I have no clue how to do that.

My idea is to convert the JSON-LD into a graph structure.
And provide a traversal pattern that serializes that graph into the
given tree structure.
(may be Gremlin can help, there?)

Does it sound like something easy to do?
Or something already available off-the-shelf in JSON-LD tools?
Received on Monday, 24 November 2014 10:53:45 UTC

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