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

Re: JSON-LD for search.datao.net

From: John Walker <john.walker@semaku.com>
Date: Tue, 11 Nov 2014 09:26:01 +0100 (CET)
To: public-linked-json@w3.org, Olivier Rossel <olivier.rossel@gmail.com>
Message-ID: <1856788654.1636917.1415694361317.open-xchange@oxweb03.eigbox.net>
Hi Olivier,

Nice initiative.

I tried to make a request via curl like this:

curl "http://91.121.4.203/" -H "Accept: application/ld+json"

However it returns HTML with the JSON-LD in <pre> element.
Also it is not clear to me how I should send the query text string.

With regards the the _id, you can map this to the @id key using the JSON-LD
context as described here:
http://www.w3.org/TR/json-ld/#aliasing-keywords

Cheers,
John


> On November 11, 2014 at 3:34 AM Olivier Rossel <olivier.rossel@gmail.com>
> wrote:
>
>
> Hi everyone.
>
> I have hacked a small search engine for the Linked Data.
> It is available here: http://search.datao.net/
>
> Just type a resource label in the search bar.
> And the search engine will (hopefully) return
> the corresponding resources of the Linked Data.
>
> For example, typing "CNN" returns a JSON result set.
> With each entry formatted like this:
>
> {
> "_id":"http://dbpedia.org/resource/Category:CNN",
> "rdfslabel":[
> "CNN"
> ],
> "endpoint":{
> "url":"http://data-observatory.org/lod-profiles/sparql",
> "namedgraph":"http://dbpedia.org/full_data"
> },
> "rdftype":[
> "http://www.w3.org/2004/02/skos/core#Concept"
> ]
> }
>
>
> Basically, this JSON snippet translates into:
> "Resource with URI 'http://dbpedia.org/resource/Category:CNN' is
> available at endpoint
> 'http://data-observatory.org/lod-profiles/sparql' in named graph
> 'http://dbpedia.org/full_data'. Its labels are ['CNN'] and its types
> are ['http://www.w3.org/2004/02/skos/core#Concept']".
>
> No big deal.
>
> But now I wish to make the result set to be as JSON-LD compliant as possible.
>
> As far as I understand, renaming the '_id' property into '@id' is one
> step in the right direction.
>
> But I would very much appreciate your expertise about the other things
> to tweak in order to return
> results compliant with the JSON-LD philosophy.
>
> Your help and comments are very welcome.
>
> Cheers...
>
Received on Tuesday, 11 November 2014 08:46:26 UTC

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