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

Comments

Projects
None yet
3 participants
@purewebnz

purewebnz commented Jan 20, 2016

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

This comment has been minimized.

Show comment
Hide comment
@vholland

vholland Jan 20, 2016

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

vholland commented Jan 20, 2016

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

This comment has been minimized.

Show comment
Hide comment
@vholland

vholland Jan 20, 2016

Contributor

I updated the example in pull request #966.

Contributor

vholland commented Jan 20, 2016

I updated the example in pull request #966.

@purewebnz

This comment has been minimized.

Show comment
Hide comment
@purewebnz

purewebnz Jan 20, 2016

Perfect, thanks.

purewebnz commented Jan 20, 2016

Perfect, thanks.

danbri added a commit that referenced this issue Jan 21, 2016

Merge pull request #970 from vholland/examples_fix
Issue #966: Fixed PropertyValue example in JSON-LD.
@danbri

This comment has been minimized.

Show comment
Hide comment
@danbri

danbri Jan 21, 2016

Contributor

Thanks! Merged for next release.

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 Feb 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment