Re: Querying JSON-LD on client side

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-javascript/

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.

On Thu, Jul 16, 2015 at 5:03 PM, Nicholas Bollweg
<nick.bollweg@gmail.com> wrote:
> rdfstore.js is the most full-featured one in the browser:
> https://github.com/antoniogarrote/rdfstore-js#query-execution
>
> it's creaky and broken and weird, but it will load JSON-LD and let you run
> SPARQL against it without a server.
>
> levelgraph-jsonld is more supported and robust, and will also run in the
> browser:
> https://github.com/mcollina/levelgraph-jsonld#searching-with-levelgraph
>
> but uses a gremlin-like declarative search language that is nonetheless
> pretty powerful.
>
>
> On Thu, Jul 16, 2015 at 7:42 AM Ruben Verborgh <ruben.verborgh@ugent.be>
> wrote:
>>
>> Hi Immanuel,
>>
>> > is there a javascript-lib that allows to query JSON-LD graphs on client
>> > side?
>>
>> The Triple Pattern Fragments client [1] is a JavaScript library and app
>> (demo [2])
>> that executes SPARQL queries over a REST API, namely the Triple Pattern
>> Fragments API [3].
>> Our implementation of the client [1] and the server [4] support JSON-LD,
>> in addition to other RDF serializations.
>> More than 600,000 datasets are available through this API [5].
>>
>> This might be what you want because of the client-side query executor.
>> It might not be entirely what you want, because of the specific interface.
>>
>> > The reason I'd like to have this client-side query facility is this
>> > design approach: a client can only request through a REST API JSON-LD data.
>>
>> That was exactly the idea behind the TPF interface, so maybe you should
>> consider giving it a try?
>> Let me know if we can help out!
>>
>> Best,
>>
>> Ruben
>>
>> [1] https://github.com/LinkedDataFragments/Client.js
>> [2] http://client.linkeddatafragments.org/
>> [3] http://www.hydra-cg.com/spec/latest/triple-pattern-fragments/
>> [4] https://github.com/LinkedDataFragments/Server.js
>> [5] http://linkeddatafragments.org/data/
>>
>

Received on Thursday, 16 July 2015 19:33:28 UTC