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:20:57 -0400
To: <public-hydra@w3.org>
Message-ID: <040601cfa9c7$83fb6330$8bf22990$@gmx.net>
On 27 Jul 2014 at 04:41, john.walker wrote:
>> On July 27, 2014 at 2:59 AM Markus Lanthaler wrote:
>> As you know, you can always easily overlay those type-coercions
>> yourself:
>> 
>> {
>>   "@context": [
>>     "http://schema.org/",
>>     { "homeLocation": { "@type": "@id" } }
>>   ],
>>   "@id": "dimitri",
>>   "homeLocation": "Tilburg"
>> } 
> 
> Is it also possible to use this external/local structure in a standalone
> context document (that I can reference to in another JSON-LD document).
> So for example there might be one context with the minimal type
> definitions that could then be 'imported' in another context that
> overlays the more specific types.

Sure, remote contexts (as we call them) are processed exactly the same way as local ones. So feel free to move the context definition into a separate file instead of embedding it directly.


> As an example schema:birthDate is defined as @type schema:Date in
> the Schema.org context, but I know for my data that I always use
> xsd:dateTime so in my local context I override the type.
> 
> I assume it this works on "most-recently-defined-wins" basis.

Exactly.



--
Markus Lanthaler
@markuslanthaler
Received on Sunday, 27 July 2014 18:21:25 UTC

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