PropertyValue JSON-LD example fails to validate #966

Closed
purewebnz opened this Issue Jan 20, 2016 · 4 comments

Projects

None yet

3 participants

@purewebnz

The JSON-LD sample for https://schema.org/PropertyValue has an example of multiple exifData properties for a photo. It fails validation using the Google Structured Data Testing tool due to the lack of commas between these properties. Adding the commas allows it to validate, however the validator only extracts the first exifData property, ignoring the subsequent ones.

What is the correct syntax for providing multiple exifData or additionalProperty properties in JSON-LD? Typically this type of data would use an array, i.e. additionalProperties?

@vholland
Contributor

The example should read:

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "ImageObject",
  "author": "Jane Doe",
  "contentLocation": "Puerto Vallarta, Mexico",
  "contentUrl": "mexico-beach.jpg",
  "datePublished": "2008-01-25",
  "description": "I took this picture while on vacation last year.",
  "name": "Beach in Mexico",
  "exifData": [
    {
      "@type": "PropertyValue",
      "name": "Exposure Time",
      "value": "1/659 sec."
    },
    {
     "@type": "PropertyValue",
      "name": "FNumber",
      "value": "f/4.0"
    },
    {
      "@type": "PropertyValue",
      "name": "MaxApertureValue",
      "value": "2.00"
    },
    {
      "@type": "PropertyValue",
      "name": "Metering Mode",
      "value": "Pattern"
    },
    {
      "@type": "PropertyValue",
      "name": "Flash",
      "value": "Flash did not fire."
    }
  ]    
}
</script>
@vholland
Contributor

I updated the example in pull request #966.

@purewebnz

Perfect, thanks.

@danbri
Contributor
danbri commented Jan 21, 2016

Thanks! Merged for next release.

@danbri danbri pushed a commit that referenced this issue Feb 5, 2016
Dan Brickley Release notes update - noted fix to #966 519966a
@danbri danbri closed this Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment