Skip to content

Safari throws when parsing JSON-LD #1280

@codeofsumit

Description

@codeofsumit

Describe the bug
Safari throws error on any page using structured data.

Your Nuxt version
2.17.0

Your nuxt-jsonld version
1.5.7

To Reproduce
Create an test.html and include the following code

<html>
  <head>
    <script type="application/ld+json">
      [
        {
          "@context": "http://schema.org",
          "@type": "Organization",
          "name": "Parqet",
          "url": "https://www.parqet.com/",
          "logo": "https://www.parqet.com/logos/parqet_logo_pos.svg",
          "sameAs": [
            "https://www.facebook.com/parqetcom",
            "https://twitter.com/ParqetApp",
            "https://www.instagram.com/ParqetApp/",
            "https://www.youtube.com/channel/UC4LOcElG8Z73Hvgbbp3m1KQ",
            "https://www.linkedin.com/company/parqet/",
            "https://github.com/tresorone"
          ]
        }
      ]
    </script>
  </head>
  <body>
    test
  </body>
</html>

Open in Safari in Mac and look into the console.

Screenshots
image

Additional context
Also asked on StackOverflow
https://stackoverflow.com/questions/76995140/safari-throws-when-parsing-json-ld

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions