Search code examples
jsonjson-ld

JSON-LD Missing '}' or object member name. error


I like to add json-ld to my website before that I want to add it to my dev site to test it

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Organization",
  "url": "xxxxxxxxxxxxxxxx",
  "contactPoint": [{
    "@type": "ContactPoint",
    "telephone": "+xx-xxx-xxx-xxxx",
    "contactType": "customer service"

  }]
}
</script>

I get the error stating that Missing '}' or object member name. what is this error,I have closed brackets correctly.how to fix it kindly help


Solution

  • This snippet is completely fine. It is both valid JSON as well as valid JSON-LD. You can test it with the JSON-LD playground and Google's Structured Data Testing tool.