W3C home > Mailing lists > Public > public-schemaorg@w3.org > June 2015

Re: JSON-LD and multiple values

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Tue, 9 Jun 2015 19:00:26 -0700
Cc: Manu Sporny <msporny@digitalbazaar.com>, "schema.org Mailing List" <public-schemaorg@w3.org>, Dan Brickley <danbri@google.com>
Message-Id: <3467870E-EB81-4827-9981-2A9F7B9424B3@greggkellogg.net>
To: "mfhepp@gmail.com" <mfhepp@gmail.com>
The Linter now detects JSON errors as well as most HTML markup errors, which handles another class of previously silently failing use cases.

A future update should probably do some UI improvements to better warn when issues are found, so you don’t simply need to look down at Linter Messages.

Gregg Kellogg
gregg@greggkellogg.net

> On Jun 9, 2015, at 1:59 AM, mfhepp@gmail.com wrote:
> 
> Dear Gregg,
> dear Manu:
> 
> I think there is a need for clarifying the proper use of multiple values for the same property in JSON-LD because if I understand it properly, the behavior differs from any other RDF syntax and Microdata (see [1]), as you CANNOT simply repeat a property with different values, as in any other RDF syntax, like so
> 
> 
> <script type="application/ld+json">
> {
>  "@context": "http://schema.org",
>  "@type": "Offer",
>  "businessFunction" : "http://purl.org/goodrelations/v1#Repair", 
>  "businessFunction" : "http://purl.org/goodrelations/v1#Sell" 
> 
> }
> </script>
> 
> but instead must use a LIST of values, like so:
> 
> 
> <script type="application/ld+json">
> {
>  "@context": "http://schema.org",
>  "@type": "Offer",
>  "businessFunction": ["http://purl.org/goodrelations/v1#Repair", "http://purl.org/goodrelations/v1#Sell" ]
> 
> }
> </script>
> 
> The Google Structured Data Testing Tool shows only the value for the last use of the same property name, but in complex data structures, this will be easy to overlook. 
> 
> We should highlight this prominently (and review all of our examples in schema.org), because otherwise people will have a hard time understanding why only part of their data is understood.
> 
> In particular, product feature markup with many usages of "additionalProperty" will be prone to this.
> 
> Best
> 
> Martin
> 
> [1] http://webmasters.stackexchange.com/questions/81080/using-productontology-org-to-add-multiple-types/81081#81081
> 
> 
> -----------------------------------
> martin hepp  http://www.heppnetz.de
> mhepp@computer.org          @mfhepp
> 
> 
> 
> 
> 
> 
> 
Received on Wednesday, 10 June 2015 02:01:04 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 10 June 2015 02:01:05 UTC