RE: Querying JSON-LD on client side

On 16 Jul 2015 at 21:32, Olivier Rossel wrote:
> If the API accepts to return RDF/N3, you can use the N3 parser here:
> http://ruben.verborgh.org/blog/2013/04/30/lightning-fast-rdf-in-javascrip
> t/
> 
> and retrieve your data as a graph of javascript objects on the client side.
> You can then traverse that graph in whatever way you want.

Niklas (CC'ed) implemented the same for JSON-LD:

  https://github.com/niklasl/rdfa-lab/blob/gh-pages/js/ld.js

Here's an example of how it can be used:

  https://github.com/niklasl/rdfa-lab/blob/gh-pages/test/test_ld.js

He even went as far as writing a simple spec for it:

  http://json-ld.org/spec/latest/json-ld-connect/

It's quite straightforward. 


Cheers,
Markus


--
Markus Lanthaler
@markuslanthaler

Received on Friday, 17 July 2015 17:12:07 UTC