Structured Data - HELP PLEASE !!

shags38

Junior Member
Joined
Apr 3, 2019
Messages
196
Reaction score
25
I am trying to markup an article and the Google Markup Tester Tool is throwing this error;

  • Uncategorized Errors1 ERROR
JSON-LD
Missing ',' or '}' in object declaration.

when it does this it shades out a particular character but the character is correct and the whole line is correct - everything seems OK but then again I am new at this.

here is the script I am using;

<!-- JSON-LD markup generated by Google Structured Data Markup Helper. -->

{
"@context" : "http://schema.org",
"@Type" : "Article",
"name" : "page title",
"author" : {
"@Type" : "Person",
"name" : "name"
},
"datePublished" : "2019-02-16",
“headline” : “headline”,
"image" : "https://mysite/images/475.gif",
"articleSection" : "text",
"articleBody" : "text",
"publisher" : {
"@Type" : "Organization",
"name" : "name"
“logo”: {
“@type”: “ImageObject”,
“url”: “https://mysite/images/logo.png”,
}
}
</script>

Can anyone pick any errors in this script? There are two '}' at the end of the script but only one '{' in the whole script ..... should there be another one somewhere??

The Google Structured Data Markup Helper does not allow for the tag "headline" : but without it it throws an error so I added it

cheers
 
put the code in code [ ] please

} <<< try another at the end?

or
Code:
"@context" : "http://schema.org",
"[USER=1002438]@Type[/USER]" : "Article",
"name" : "page title",
"author" : {
"[USER=1002438]@Type[/USER]" : "Person",
"name" : "name"
}
},
"datePublished" : "2019-02-16",
“headline” : “headline”,
"image" : "https://mysite/images/475.gif",
"articleSection" : "text",
"articleBody" : "text",
"publisher" : {
"@Type" : "Organization",
"name" : "name"
“logo”: {
“@type”: “ImageObject”,
“url”: “https://mysite/images/logo.png”,
}
}
</script>
 
Last edited by a moderator:
put the code in code [ ] please
OK - sorry

} <<< try anither at the end?
I checked the scripts for 'valid' products pages and they have the same '{' and '}' structure, i.e. one in the script and two at the end ... so that seems to be correct.
 
I am trying to markup an article and the Google Markup Tester Tool is throwing this error;

  • Uncategorized Errors1 ERROR
JSON-LD
Missing ',' or '}' in object declaration.

when it does this it shades out a particular character but the character is correct and the whole line is correct - everything seems OK but then again I am new at this.

here is the script I am using;

<!-- JSON-LD markup generated by Google Structured Data Markup Helper. -->

{
"@context" : "http://schema.org",
"@Type" : "Article",
"name" : "page title",
"author" : {
"@Type" : "Person",
"name" : "name"
},
"datePublished" : "2019-02-16",
“headline” : “headline”,
"image" : "https://mysite/images/475.gif",
"articleSection" : "text",
"articleBody" : "text",
"publisher" : {
"@Type" : "Organization",
"name" : "name"
“logo”: {
“@type”: “ImageObject”,
“url”: “https://mysite/images/logo.png”,
}
}
</script>

Can anyone pick any errors in this script? There are two '}' at the end of the script but only one '{' in the whole script ..... should there be another one somewhere??

The Google Structured Data Markup Helper does not allow for the tag "headline" : but without it it throws an error so I added it

cheers
You're missing a curly bracket
1. open at line 1 - closed at line 21.
2. open at line 5 - closed at line 8.
3. now there is 2 open brackets at line 14 and line 17 - but only one is closed at line 20. So you need to close the other open bracket.
 
You're missing a curly bracket
1. open at line 1 - closed at line 21.
2. open at line 5 - closed at line 8.
3. now there is 2 open brackets at line 14 and line 17 - but only one is closed at line 20. So you need to close the other open bracket.
Thanks heaps!! ......... I kinda figured it might be that but it too a second pair of eyes to pintpoint it .... so grateful ... I get to keep at least some of my hair now :)

Interestingly I had a number of issues other than that one which I stumbled upon by accident .... because Google Markup Helper was missing a number of tags required for an article (even though I used the article markup), I copied them from an article I found online ..... consistent and persistent error issue was as it turned out in the article the ( " ) commas were italic like so ( " ) which the code didn't recognize.
Live and learn I guess.

cheers,
 
@PHP-Rockstars .... another issue I have is that if I have a URL in my product description or article body then the structured data test shows the ( " ) commas as errors .... and also when using deprecated html, like, e.g. font size= "3" (Ihave thousands of product pages so too much hard work to upgrade html at present) - is it typical that when doing markup that you delete the urls and anything else that has ( " ) commas or is there a workaround?

cheers
 
Back
Top