W3C home > Mailing lists > Public > public-hydra@w3.org > July 2014

RE: Introduction and a question about JSON-LD

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Sun, 27 Jul 2014 14:15:44 -0400
To: <public-hydra@w3.org>
Message-ID: <040501cfa9c6$c9a387b0$5cea9710$@gmx.net>
On Sunday, July 27, 2014 2:34 AM, Dimitri van Hees wrote:
> Hi Markus,
> 
> Ok, I think I understand it now. However, would this be OK to do?
> 
> {
>   "@context": "http://schema.org",
>   "homeLocation": {
>     "@id": "http://dbpedia.org/page/Tilburg",
>     "@type": "http://schema.org/City",
>     "name": "Tilburg"
>   }
> }

Sure. That's perfectly fine. Thanks to http-range14 madness, you might however want to use http://dbpedia.org/resource/Tilburg instead of page/Tilburg to avoid a lot of unproductive discussions.


> Because even if homeLocation and birthplace are different properties,
> they both actually are cities. And if this is OK, can I also state
> that by just passing a context file through the header on a 'normal'
> JSON response can make it valid JSON-LD, but just for the properties?

Yeah, you can hide the JSON-LD context in an HTTP Link header. I wouldn't encourage that for a new API but if you really want, you can of course. What do you mean with "but just for the properties" at the end of the paragraph above?


--
Markus Lanthaler
@markuslanthaler
Received on Sunday, 27 July 2014 18:16:12 UTC

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