W3C home > Mailing lists > Public > public-vocabs@w3.org > August 2013

Re: Invalid "@context" in schema.org JSON-LD examples?

From: Dan Brickley <danbri@danbri.org>
Date: Wed, 14 Aug 2013 19:41:42 +0100
Message-ID: <CAFfrAFqyZK9YN60p-8S4+pj7WVBb211DUKXvv24cQHWnMLg93w@mail.gmail.com>
To: Dan Scott <dan@coffeecode.net>
Cc: "public-vocabs@w3.org" <public-vocabs@w3.org>
On 14 August 2013 19:37, Dan Scott <dan@coffeecode.net> wrote:

> Hi:
>
> I was comparing the JSON-LD examples in the likes of
> http://schema.org/Action and the "Looking inside tables" proposal with
> the latest JSON-LD spec at http://json-ld.org/spec/latest/json-ld/, and
> I'm pretty sure the use of @context in the schema.org examples is
> incorrect.
>
> Per http://json-ld.org/spec/latest/json-ld/#default-vocabulary, one
> specifies the default vocabulary like so:
>
> "@context": {
>     "@vocab": "http://schema.org/"
>   }
>
> ... and then the JSON-LD properties and types are all expanded
> automatically to use http://schema.org/ as a prefix.
>
> However, the schema.org examples currently use:
>
>   "@context": "http://schema.org",
>
> and then use unprefixed types and properties.
>
> If http://schema.org returned a JSON-LD context document, per
> http://json-ld.org/spec/latest/json-ld/#the-context, then this might be
> workable - but it doesn't. Even if that URL did return a JSON-LD context
> document, I think the examples would be stronger anyway (and would help
> avoid leading JSON-LD adopters down an invalid path) if they used the
> only-slightly-longer "@context:" { "@vocab": "http://schema.org/" }
> approach.


The issue is that a proper context  ought to have a pile more stuff in it
(notes on which properties have string values vs thing values, in
particular); we wanted to minimise the impact on the actual JSON files.

The intent is for 'http://schema.org' to dereference (if you send the right
HTTP headers) to a big JSON-LD context file. There are some other technical
pieces of work that need doing first - both with schema.org server side
hosting/implementation for content negotiation, but also putting together
the correct context definitions and integrating them with the site
management code. But we'll get there...

Dan
Received on Wednesday, 14 August 2013 18:42:08 UTC

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