W3C home > Mailing lists > Public > public-linked-json@w3.org > July 2012

Re: Can json-ld convert identifiers to IRIs?

From: Kuno Woudt <kuno@frob.nl>
Date: Tue, 10 Jul 2012 19:34:49 +0200
Message-ID: <4FFC67B9.8080402@frob.nl>
To: public-linked-json@w3.org

On 07/10/2012 06:06 PM, Markus Lanthaler wrote:
>> To turn this into linked data the ids would somehow have to be turned
>> into full IRIs.  So fcbcdc39-8851-4efc-a02a-ab0e13be224f, which is a
>> recording would need to become:
>> http://musicbrainz.org/recording/fcbcdc39-8851-4efc-a02a-ab0e13be224f#_
>> And abcd76db-7d5f-3eb7-b386-051c97bfe2e4 should become
>> http://musicbrainz.org/release/abcd76db-7d5f-3eb7-b386-051c97bfe2e4#_
> ... and you definitely don't wanna include the full (or at least a relative)
> IRI in the JSON document? Any specific reasons for that?

There is lots of existing software out there which expects just the bare 
identifiers (our customers and other users of either the database or the 
existing xml webservice).

For example if you were writing a media player in python trying to get 
information on an album, you would do something like this:

 >>> import mutagen
 >>> f = mutagen.File ("14. BUT (KOZM_ Remix).mp3")
 >>> f["TXXX:MusicBrainz Album Id"].text[0]

Now you have the identifier for an album/release, if you want to send 
people to our website with that, you would construct:


Or if you wanted to look up metadata in our webservice you would construct:


If you wanted to get 500x500 front cover art image you would get:


The cover art archive is actually hosted by the internet archive, so 
this also works:


If you wanted to have a look at some listening statistics, I think
http://last.fm/mbid/8ea5b78d-bda6-497a-b191-2650b8e20ba0 should work 
(last.fm is currently having issues, so that is not online right now).

Or if you wanted to see if the artist has been played on the BBC radio 
recently, you would get the artist identifier from the file and construct:


So, in general there are many websites, services and applications which 
use just these bare identifiers.  Because of this, users of our 
webservice want to get just the identifier, so they can construct all 
these urls.

>> I fear this is a transformation which cannot be described in a
>> "@context", is that correct?  Any suggestions?
> That's true. We discussed that some time ago [1] but decided to not support
> it at this point in time. If you could give us some more insights on why you
> don't use an IRI directly we might reopen that issue.
 > [1] https://github.com/json-ld/json-ld.org/issues/108

MusicBrainz is not a new project (about 10 years old now I guess), we 
have a large community of users, customers, etc.. who all use and store 
these identifiers in their own databases, schemas, etc..

So, although the JSON representation of this data in our webservice is 
new, the data/graph itself is not.

-- kuno / warp.
Received on Tuesday, 10 July 2012 17:35:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:53:20 UTC