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

Re: Question about serializing a graph to different JSON structures

From: Anders Riutta <anders.riutta@gladstone.ucsf.edu>
Date: Thu, 11 Dec 2014 11:57:57 -0800 (PST)
To: Olivier Rossel <olivier.rossel@gmail.com>
Cc: public-linked-json <public-linked-json@w3.org>
Message-ID: <1876079130.9118466.1418327877416.JavaMail.zimbra@gladstone.ucsf.edu>
Hi Olivier,

Didn't see any other responses, so here are two pointers that might be useful as starting points.

JSON-LD framing (be warned it's not yet fully fleshed out):
http://json-ld.org/spec/latest/json-ld-framing/

JSON-LD macros:
https://github.com/antoniogarrote/json-ld-macros
https://github.com/ariutta/json-ld-macros (my fork has a working demo)

Anders Riutta

----- Original Message -----
> From: "Olivier Rossel" <olivier.rossel@gmail.com>
> To: "public-linked-json" <public-linked-json@w3.org>
> Sent: Monday, November 24, 2014 2:52:58 AM
> Subject: Question about serializing a graph to different JSON structures
> 
> 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 Thursday, 11 December 2014 19:58:21 UTC

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