RE: Introduction and a question about JSON-LD

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