Re: Questions regarding the Schema.org validator

I can help with the last of your queries:

On 02/08/2023 16:09, Hédic Guibert wrote:

> Lastly, it is written in the specifications ([here](https://www.w3.org/TR/json-ld11/#specifying-the-type)) that
>
>> In addition to setting the type of nodes, @type can also be used to set the type of a value to create a typed value. This use of @type is similar to that used to define the type of a node object, but value objects are restricted to having just a single type.
>
> However, if I use the validator on the following JSON, it is considered a valid JSON-LD document.
>
> {
> "@context":"https://schema.org",
> "@type":"Organization",
> "member": {
> "@type": ["WPSideBar","WPHeader"],
> "description":"1977"
> }
> }

That's not what a [typed value](https://www.w3.org/TR/json-ld11/#dfn-typed-value) is. Typed values are about DataTypes, rather than RDF classes. See also https://www.w3.org/TR/json-ld11/#typed-values

In essence that section of the spec says that a literal vlaue cannot be two distinct datatypes, e.g. both a dateTime and an integer.

HTH Phil

--

[Phil Barker](http://people.pjjk.net/phil), http://people.pjjk.net/phil (he/him).
[CETIS LLP](https://www.cetis.org.uk): a cooperative consultancy for innovation in education technology.
[PJJK Limited](https://www.pjjk.co.uk): technology to enhance learning; information systems for education.

CETIS is a co-operative limited liability partnership, registered in England number OC399090
PJJK Limited is registered in Scotland as a private limited company, number SC569282.

Received on Thursday, 3 August 2023 09:45:07 UTC