Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PropertyValue JSON-LD example fails to validate#966

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

PropertyValue JSON-LD example fails to validate #966

purewebnz opened this issue Jan 20, 2016 · 4 comments

Comments

@purewebnz
Copy link

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
Copy link
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
Copy link
Contributor

I updated the example in pull request #966.

@purewebnz
Copy link
Author

Perfect, thanks.

danbri added a commit that referenced this issue Jan 21, 2016
Issue #966: Fixed PropertyValue example in JSON-LD.
@danbri
Copy link
Contributor

danbri commented Jan 21, 2016

Thanks! Merged for next release.

danbri added a commit that referenced this issue Feb 5, 2016
@danbri danbri closed this as completed Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants