W3C home > Mailing lists > Public > public-linked-json@w3.org > January 2015

Re: correct use of @id vs url

From: Thomas Hoppe <thomas.hoppe@n-fuse.de>
Date: Wed, 14 Jan 2015 21:24:00 +0100
Message-ID: <54B6D060.8050003@n-fuse.de>
To: public-linked-json@w3.org
Hi Paul,

On 01/13/2015 07:27 PM, Paul Mackay wrote:
> Could I check on the correct use of @ld, particularly with APIs (as 
> opposed to embedded data in webpages, etc)?
>
> My assumption is @id is intended to represent a IRI for an API object. 
> So if I call an API and get a list of objects, if @id is present in 
> each object, it should be an IRI of just that object in the API.

that's true, if the `@id` property name is used as a subject of a 
resource like below -- then it marks the IRI of this resource.

{
   "@id": "http://thomashoppe.me",
   "http://xmlns.com/foaf/0.1/workplaceHomepage": "http://www.n-fuse.de"
}

There are however other uses of the `@id` keyword:

{

|
"@context": {
...
"workplaceHomepage": {
"@type": "@id",
"@id": "foaf:workplaceHomepage"
}
},
...
"workplaceHomepage": "http://www.n-fuse.de"
} |

With this, for example, I declare that the value of the 
`workplaceHomepage` property
is a resource and sticking to linked data principles, can be 
dereferenced (is a link)
I hope this answers your next point as well.

>
> What I'm wondering is what is the best way to define a JSON value of a 
> URL to a webpage of the object, if the object has a webpage separate 
> from the API? Would "url" be the most logical option? I ask because 
> many examples in the JSON-LD spec and elsewhere often use @id for 
> something like object's webpage.
>
> Also is there a convention for representing links to other canonical 
> representations of a thing elsewhere on the web, e.g. Wikipedia pages?
A typical relation for this is `rdfs:sameAs` and `*owl:sameAs*`
Also see: http://answers.semanticweb.com/questions/356/seealso-or-sameas

>
> Many thanks,
>
> Paul

Greets, Thomas
Received on Wednesday, 14 January 2015 20:24:35 UTC

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