Re: JSON-LD for search.datao.net

On 11/10/14 9:34 PM, Olivier Rossel 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...

Nice job!

If you are using Virtuoso, you can simply use a SPARQL Protocol URL to 
return JSON-LD as the preferred output format for a SPARQL DESCRIBE 
query etc..



-- 
Regards,

Kingsley Idehen 
Founder & CEO
OpenLink Software
Company Web: http://www.openlinksw.com
Personal Weblog 1: http://kidehen.blogspot.com
Personal Weblog 2: http://www.openlinksw.com/blog/~kidehen
Twitter Profile: https://twitter.com/kidehen
Google+ Profile: https://plus.google.com/+KingsleyIdehen/about
LinkedIn Profile: http://www.linkedin.com/in/kidehen
Personal WebID: http://kingsley.idehen.net/dataspace/person/kidehen#this

Received on Tuesday, 11 November 2014 12:58:49 UTC