Re: JSON-LD in HTML

On Mar 17, 2013, at 16:35 , Manu Sporny <msporny@digitalbazaar.com> wrote:

> 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.

I think, actually, we can go one step further. A bunch of applications on the Web generate HTML on-the-fly based on data that is available to them in some sort of a database that is either JSON based or can provide JSON data. For those companies using embedded JSON-LD is the simplest way of expressing structured data.

B.t.w., there is also a symmetry with the turtle-in-HTML that is already a non-normative part of the Turtle syntax document. A consistency with that one is a good thing...

Ivan

> 
>> - 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/
> 


----
Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Sunday, 17 March 2013 16:03:32 UTC