W3C home > Mailing lists > Public > public-linked-json@w3.org > March 2013

Re: JSON-LD in HTML

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Sun, 17 Mar 2013 11:35:50 -0400
Message-ID: <5145E2D6.1070108@digitalbazaar.com>
To: 'JSON-LD JSON' <public-linked-json@w3.org>
CC: public-rdf-wg@w3.org
On 03/17/2013 10:38 AM, Markus Lanthaler wrote:
> - What problem are why trying to solve here? I mean which use case
> are we trying to address? Why would someone want to embed JSON-LD in
> HTML? I haven't seen much JSON embedded into HTML in the wild.. and
> JSON is extremely popular.

A large company that is also a W3C member company has asked for this
feature. They would like to give web authors the ability to mark up
Linked Data w/o having to go to the trouble of using RDFa, Microdata,
RDF/XML in XHTML, TURTLE in HTML, or some of the other Linked Data
options available to web developers today.

The thought is that most web developers know JSON pretty well, so they
may not have as much of a problem with it than the technologies listed
above. I think it's a fairly solid use case that we can support pretty
easily in the spec.

> - If we are embedding JSON-LD (not JSON), why do we need to add
> another mechanism to reference a context? People embedding JSON-LD
> obviously need to understand it.. so what's the problem with
> @context?

Good question... but if we use data-context, it might not be too bad
since it's a non-normative feature. If it were normative, I'd say that
we should introduce a new "@context" attribute name. I do agree with
your point about not re-using data-*, though I think it's the least of
all evils that Ivan outlined.

One argument is to use @data-context for now, and if the mechanism
becomes popular, we standardize @context. Then JSON-LD-in-HTML
processors would need to load from @data-context or @context (where the
latter overrides the former if both are on the same element). I'd expect
that we'd do this in JSON-LD 1.1 /if/ this feature becomes popular.

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny, G+: +Manu Sporny)
Founder/CEO - Digital Bazaar, Inc.
blog: Aaron Swartz, PaySwarm, and Academic Journals
http://manu.sporny.org/2013/payswarm-journals/
Received on Sunday, 17 March 2013 15:36:22 UTC

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