Re: correct use of @id vs url

I hope others respond, but here's a start. 

If you use Cool URIs , the value of @id and url can be the same at your site. Your server can respond with HTML when a user's browser requests text/html and JSON-LD when a script requests application/ld+json. Not all servers use this Content Negotiation, however, so in those cases, you can use @id for the persistent URI/IRI of the thing being identified and schema:url [1], foaf:page [2] or schema:WebPage [3] for the HTML representation. I don't know the best way to specify a link to JSON-LD on a third-party server when http://example.org/myconcept returns RDF, but http://example.org/myconcept?type=json returns JSON-LD. 

If http://example.org/myconcept and http://dbpedia.org/something both refer to the exact same thing, you can use @id for the preferred IRI and owl:sameAs [4] for the other. 

Anders Riutta 

[1] http://schema.org/url 

[2] http://xmlns.com/foaf/0.1/page 

[3] http://schema.org/WebPage 

[4] http://www.w3.org/2002/07/owl#sameAs 
----- Original Message -----

> From: "Paul Mackay" <pauljmackay@gmail.com>
> To: public-linked-json@w3.org
> Sent: Tuesday, January 13, 2015 10:27:55 AM
> Subject: correct use of @id vs url

> 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.

> 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?

> Many thanks,

> Paul

Received on Wednesday, 14 January 2015 20:18:32 UTC