question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[SEO Audits] Structured data is valid

See original GitHub issue

Audit group: Content Best Practices Description: JSON-LD structured data syntax is valid Failure description: JSON-LD structured data syntax is invalid Help text: Structured data contains rich metadata about a web page. The data may be used to provide more context to users in search results or social sharing. This audit is only checking for JSON-LD structured data syntax errors. For a checkup of Google search eligibility, try the Structured Data Testing Tool.

Success conditions:

  • the JSON can be parsed
  • the keys are not duplicated
  • @ keywords are whitelisted in the JSON-LD spec
  • @context URLs are valid
  • validation using jsonld.js
  • @types are whitelisted on schema.org
  • object properties are whitelisted on schema.org

Notes:

  • defers Google search eligibility and other more advanced validation logic to the Structured Data Testing Tool (SDTT)
  • implementation logic is built into Lighthouse and not open sourced separately

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:36 (19 by maintainers)

github_iconTop GitHub Comments

2reactions
mattzeunertcommented, Apr 11, 2019

A few observations after running this on a few sites:

1. Case sensitivity

This is a failure because there’s no aggregateRating type, just a Thing.aggregateRating property. The type should be AggregateRating. It might not be clear to the user though, because the schema.org URL exists.

Screenshot 2019-04-11 at 09 42 08

JSON-LD is case sensitive, but the Structured Data Testing Tool doesn’t complain about it.

2. Empty elements

There’s a few JSON-LD elements with no content or just {}. SDTT doesn’t care, and it probably just means there’s no data, so nothing we need to do I think.

3. Parser errors

I’ve only seen one example of this, but if you try to escape a single quote in the JSON our error message isn’t super helpful. (JSON only allows a few escape sequences.)

Screenshot 2019-04-11 at 10 21 35

You get the same message if you have line breaks in your strings or a trailing comma somewhere. Maybe prefixing the message with "Parse error: " would make it clearer what the problem is.

1reaction
danbricommented, Aug 21, 2019

operating over the parsed graph (set of node-edge-node triples) from json-ld would establish a model well suited to allow dropping in rdf, microdata parsers. This is what we do at Google and what other public tools do.

On Wed, 21 Aug 2019, 19:52 Jarno van Driel, notifications@github.com wrote:

I’m happy to read about this initiative though I’m wondering whether microdata and RDFa have been considered as well?

Reason I ask is because even though JSON-LD is the ‘preferred’ syntax right now there’s still tons of microdata markup out there (and RDFa in lesser quantity as well) that’s actively maintained. It would be a real shame if these fall out of scope.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GoogleChrome/lighthouse/issues/4359?email_source=notifications&email_token=AABJSGLN42PZCGQMV2PJEGDQFWFGLA5CNFSM4ENWC24KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD42YJXA#issuecomment-523601116, or mute the thread https://github.com/notifications/unsubscribe-auth/AABJSGLUBD3W6QWKBI6SN3LQFWFGLANCNFSM4ENWC24A .

Read more comments on GitHub >

github_iconTop Results From Across the Web

What do the Structured Data Markup Items in Site Audit Mean?
The Site Audit tool can explore Structured Data items for each URL and identify which pages are eligible for being in Rich Results....
Read more >
Structured Data For SEO: Auditing For Errors, Gleaning ... - Botify
If you've already implemented structured data on your website, it's a good idea to audit it. During a structured data audit, you'll want...
Read more >
How to do a schema markup audit - Search Engine Land
Once you've identified and tested for structured data errors, now's a good time to start compiling your competitive schema gap analysis.
Read more >
How To Test & Validate Structured Data - Screaming Frog
Unfortunately, there isn't an API, it doesn't allow auditing of URLs in bulk and sometimes misses or miss-classifies validation issues between ...
Read more >
Google Says No: Structured Data That's Not Entirely Valid Will ...
An SEO professional was concerned about technical improvements they were making with their blog, along with some of its structured data.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found