W3C home > Mailing lists > Public > public-linked-json@w3.org > August 2016

Giving a "base" to non base uri's depending on a property?

From: Jerven Tjalling Bolleman <jerven.bolleman@sib.swiss>
Date: Fri, 29 Jul 2016 15:31:22 +0200
To: public-linked-json@w3.org
Message-ID: <e78079ed-6bba-b980-f36c-592cf2cd19f9@sib.swiss>
Dear JSON-LD developers,

After a very long hiatus I have some time to improve the UniProt RDF/JSON-LD

I was wondering if I can further JSONify this simple example.


This is correct and the translation is as well. Yet, I would like to get
rid of this prefixed taxon:9606 uri.

The main UniProt identifiers are dealt with by having set the base.
But for some specific properties I know that I will only have ids with a
certain prefix. I can't think of a way to express that in JSON-LD, does 
have any ideas?

e.g. I would like to have something like this.

   "@context": {
     "@base": "http://purl.uniprot.org/uniprot/",
     "id": "@id",
     "a": "@type",
     "name": "http://purl.uniprot.org/core/name",
     "taxon": "http://purl.uniprot.org/taxonomy/",
     "organism": {
       "@id": "http://purl.uniprot.org/core/organism",
       "@MORE JSON-LD MAGIC" : "taxon"
   "id": "P12345",
   "organism": {
     "id": "9606",
     "name": "Human"

That should translate to this

taxon:9606 up:name "Human" .
<P12345> up:organism taxon:9606 .

instead of this

<9606> up:name "Human" .
<P12345> up:organism <9606> .

Would love to hear suggestions.

In any case our JSON-LD will look a lot better soon (september 9th).

Jerven Bolleman                        Jerven.Bolleman@sib.swiss
SIB Swiss Institute of Bioinformatics  Tel: +41 (0)22 379 58 85
CMU, rue Michel Servet 1               Fax: +41 (0)22 379 58 58
1211 Geneve 4,
Switzerland     www.sib.swiss - www.uniprot.org
Follow us at https://twitter.com/#!/uniprot
Received on Monday, 1 August 2016 09:20:16 UTC

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