Re: Hydra Core namespace URI / @context ?

Hi Hendy,

(in addition to reply made by Pavlik)

for more detail please refer to JSON-LD W3C Recommendation on the
explanation of @context and @id [1] ("Contexts can either be directly
embedded into the document or be referenced.").

in the first definition, URI http://www.w3.org/ns/hydra/core# is mapped to
a term "hydra" to be used in the jsonld document (as a prefix). in the
second definition, the context definition is not embedded in the current
document but referenced in another document.

hydra itself is identified by http://www.w3.org/ns/hydra/core as pointed
out by the use of @id

the first URI that is mapped to "hydra" is used as a prefix to make the
jsonld document less verbose and still looks like a normal JSON.

e.g. the term "hydra:Class" is a short for URI "
http://www.w3.org/ns/hydra/core#Class"

Cheers,
Peb

[1] http://www.w3.org/TR/json-ld/#the-context

On Wed, Nov 12, 2014 at 6:17 PM, Hendy Irawan <ceefour666@gmail.com> wrote:
>
> In the Hydra spec I see hydra being represented as:
>
> 1. "@context": {
>   "hydra": "http://www.w3.org/ns/hydra/core#",
>
> 2. "@context": "http://www.w3.org/ns/hydra/context.jsonld",
>
> 3. "@id": "http://www.w3.org/ns/hydra/core",
>
> Which one is correct? How does a JSON-LD client knows that (presumably?)
all three URIs are the same thing?
>
> If I write a pure Hydra document with a single @context, what should I
use:
>
> 1.  "@context": "http://www.w3.org/ns/hydra/core#",
>
> 2. "@context": "http://www.w3.org/ns/hydra/context.jsonld",
>
> What's the difference? And which one is "easiest" for a (rather naive)
client to consume, but still ability to distinguish properties from
different namespaces? (Without being a "full" compliance to entire spec)
>
> Hendy

Received on Friday, 14 November 2014 08:40:08 UTC