structured-data.invalid-json
A JSON-LD <script> block contains invalid JSON and will be ignored entirely.
What to change
Fix the JSON syntax (trailing commas, unescaped quotes, HTML comments inside the script). Serialise with JSON.stringify instead of hand-writing it.
The documentation on developers.google.comA finding of this rule on a page carries the exact edits for that page: the markup it quotes, and what to write instead.
When it runs
Runs on every SEO audit: of a page, a crawl, a build directory or HTML. An error is a problem that keeps a page out of search or out of answers, or breaks how it shows there. Each finding takes 15 points off the page's score.
The severity here is the rule's usual one: a finding can be raised or lowered when the page gives a reason.
Run it, or skip it
Check a page for this rule alone, after a fix for instance:
npx @rivi-software/agentic-seo-check audit https://example.com --rule structured-data.invalid-json
Or from an assistant, with the MCP tool seo_audit_page:
{
"url": "https://example.com",
"rules": [
"structured-data.invalid-json"
]
}
To leave it out of an audit, pass --disable structured-data.invalid-json on the command, or disableRules: ["structured-data.invalid-json"] to a tool.
More in Structured data
All 14 rules- Info
structured-data.missingThe page has no structured data (JSON-LD or microdata). - Warning
structured-data.missing-contextA JSON-LD item has no @context or a context other than schema.org. - Warning
structured-data.missing-typeA structured data item has no @type (or itemtype). - Warning
structured-data.missing-requiredA structured data item of a known type is missing properties Google requires for rich results. - Info
structured-data.missing-recommendedA structured data item is missing properties Google recommends for richer results. - Warning
structured-data.invalid-dateDate properties in structured data that are not ISO 8601. - Info
structured-data.retired-typeThe page has structured data for a rich result Google no longer shows: FAQPage, HowTo, SpecialAnnouncement, ClaimReview, the sitelinks search box's SearchAction, Estimated Salary (Occupation), Learning Video (LearningResource on a VideoObject) or Book Actions (ReadAction, BorrowAction on a Book). - Warning
structured-data.invalid-valueA structured data value is in a form Google cannot use: a price with a currency symbol or a decimal comma, a currency that is not an ISO 4217 code, a rating outside its scale, a breadcrumb trail with fewer than two items, odd positions or crumbs without a URL, or an availability, itemCondition, eventStatus, eventAttendanceMode or employmentType that is not one of the values Google lists.