I am guessing Google structured data testing tool behaves strange.
I wrote a code to create JSON-LD for multiple locations for one of my websites. But Google testing tool returns an error:
Missing '}' or object member name.
The error is related to missing }
, or ]
, but that's not all right. Because the syntax is correct.
Below is the code I used, maybe others are also in the same condition these days:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "LocalBusiness",
"name": "Company",
"url": "http://www.example.com",
[
{"address": {
"addressLocality": "United Arab Emirates",
"addressRegion": "Dubai",
"streetAddress": "Building 213",
"telephone" : "04 444 5555"
"openingHours": ["Su, Mo,Tu,We,Th, 09:00-18:00"],
},
{"address": {
"addressLocality": "Jordan",
"addressRegion": "Amman",
"postalCode":"XXXXXXX",
"streetAddress": "Building 213"
"openingHours": ["Su, Mo,Tu,We,Th, 09:00-18:00"],
},
{"address": {
"addressLocality": "Lebanon",
"addressRegion": "Beirut",
"streetAddress": "Building 213",
"telephone" : "+961 444 5555"
"openingHours": ["Su, Mo,Tu,We,Th, 09:00-18:00"],
},
{"address": {
"addressLocality": "Qatar",
"addressRegion": "Doha",
"streetAddress": "Building 213",
"telephone" : "+1(503) 444 5555"
"openingHours": ["Su, Mo,Tu,We,Th, 09:00-18:00"],
},
{"address": {
"addressLocality": "Saudi Arabia",
"addressRegion": "Riyadh",
"streetAddress": "Building 213",
"telephone" : "+966 1 4444 5555"
"openingHours": ["Su, Mo,Tu,We,Th, 09:00-18:00"],
},
{"address": {
"addressLocality": "Egypt",
"addressRegion": "New Cairo",
"streetAddress": "Building 213",
"telephone" : "+20 2 44445555"
"openingHours": ["Su, Mo,Tu,We,Th, 09:00-18:00"],
}
],
"description": "Company description",
"email":"[email protected]",
"logo": "http://www.example.com/w-logo.png",
"sameAs" : [ "https://www.facebook.com/Example",
"https://twitter.com/Example",
"https://plus.google.com/+Example",
"https://www.youtube.com/user/Example",
"http://www.slideshare.net/Example",
"https://www.linkedin.com/company/Example"]
}
</script>
{
and closing}
braces - you have 13 opening but only 7 closing - they should be equal.