Re: JSON-LD in examples invalid due to comments

Just my two cents: Would it be completely unthinkable to introduce a syntax for comments in JSON and JSON-LD?

On Nov 28, 2013, at 11:45 AM, Markus Lanthaler wrote:

> Hi,
> 
> I've just realized that all (?) JSON-LD examples in schema.org are invalid
> since they include comments. Just as JSON, JSON-LD doesn't support comments.
> 
> Example 1 of http://schema.org/Action for instance begins as follows:
> 
>  <script type="application/ld+json">
>    // John listened to Pink with Steve at Anna's appartment on his iPod.
>  {
>    "@context": "http://schema.org",
>    "@type": "ListenAction",
>    ...
> 
> The second line turns this into invalid JSON(-LD). It should thus be
> rewritten to
> 
>  <script type="application/ld+json">
>  {
>    "@context": "http://schema.org",
>    "@type": "ListenAction",
>    ...
> 
> 
> Would it be possible to remove those comments at the beginning of all
> examples? I fear that otherwise a lot of people will adapt this style which
> will lead to severe interoperability problems.
> 
> 
> Thanks,
> Markus
> 
> 
> --
> Markus Lanthaler
> @markuslanthaler
> 
> 

--------------------------------------------------------
martin hepp
e-business & web science research group
universitaet der bundeswehr muenchen

e-mail:  hepp@ebusiness-unibw.org
phone:   +49-(0)89-6004-4217
fax:     +49-(0)89-6004-4620
www:     http://www.unibw.de/ebusiness/ (group)
         http://www.heppnetz.de/ (personal)
skype:   mfhepp 
twitter: mfhepp

Check out GoodRelations for E-Commerce on the Web of Linked Data!
=================================================================
* Project Main Page: http://purl.org/goodrelations/

Received on Thursday, 28 November 2013 10:49:23 UTC