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

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

From: Dan Scott <dan@coffeecode.net>
Date: Wed, 14 Aug 2013 14:37:16 -0400
To: public-vocabs@w3.org
Message-ID: <20130814183714.GB25714@denials.eastlink.ca>

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

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/" }
Received on Wednesday, 14 August 2013 18:37:47 UTC

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