RE: Introduction and a question about JSON-LD

Hi Markus,
 
> On July 26, 2014 at 6:37 AM Markus Lanthaler <markus.lanthaler@gmx.net> wrote:
>
>
> On 25 Jul 2014 at 13:37, john.walker wrote:
> > As you can see I used the Schema.org context off GitHub served
> > via RawGit so that it plays nice in the JSON-LD playground.
> > Ideally you would just need to use "http://schema.org/", but that
> > doesn't work in the playground (guess it sends wrong Accept
> > header when fetching the context).
>
> Which browser do you use? It works for me in the latest versions of Chrome,
> IE, and Firefox.
>
 
I'm using Chrome  Version 36.0.1985.125 m

It's not that it throws an error, more that the resulting N-Quads are not what I
expect.

EXAMPLE 1:

{
  "@context": [
    "http://schema.org/"
  ],
  "@id": "dimitri",
  "homeLocation": "Tilburg"
}

Yields:

<http://json-ld.org/playground/dimitri> <http://schema.org/homeLocation>
"Tilburg" .

EXAMPLE 2:

{
  "@context": [
    "https://rawgit.com/json-ld/json-ld.org/master/contexts/schema.org.jsonld"
  ],
  "@id": "dimitri",
  "homeLocation": "Tilburg"
}

Yields:

<http://json-ld.org/playground/dimitri> <http://schema.org/homeLocation>
<http://json-ld.org/playground/Tilburg> .

Note that in example 1 the object is a literal value, but in example 2 is a URI.

My mistake was assuming these two context documents had the same content.
However it seems that schema:hasLocation is not defined as having @id as the
@type in the context served from http://schema.org/

So in conclusion the playground is working fine :) , but the 'official'
Schema.org context could do with a few additions :(

Cheers,
John

Received on Saturday, 26 July 2014 06:06:32 UTC