本文へスキップ
Skillpedia
SEO対策75k · #2906

json-ld-valid

できること

このスキルは、ページの構造化データブロックに構文エラーや必須項目の欠落がないか確認します。検索結果のリッチな表示を求めるサイト運営者や開発者向けです。

使う場面

  • ✓Google Search Consoleでリッチリザルトが表示されないとき。
  • ✓記事、商品、FAQ、パンくずのマークアップをページに追加したとき。
  • ✓コードやテンプレートで構造化データを生成しているとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/json-ld-valid/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/json-ld-valid/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私の構造化データを確認して、リッチリザルトが表示されない理由を教えてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは各JSON-LDブロックを解析し、contextとtypeを確認し、そのタイプに必要なプロパティがあるかを検証します。構文エラーや欠けている項目の修正を提案し、GoogleのRich Results Testの利用を勧めます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Use valid JSON-LD structured data

Invalid JSON-LD is silently ignored by Google — there are no error messages in search results, only the absence of rich results. Invalid structured data means no eligibility for rich results (stars, FAQs, breadcrumbs, etc.) that increase click-through rates.

Quick Reference

  • JSON-LD must be valid JSON, reference @context: 'https://schema.org', and include all required properties for the chosen @type
  • Invalid JSON (unclosed brackets, missing commas) causes the entire block to be silently ignored by Google
  • Validate with Google's Rich Results Test before deploying structured data changes

Check

Find all <script type='application/ld+json'> elements on the page. For each: (1) Attempt to parse the content as JSON — flag syntax errors. (2) Verify @context is set to 'https://schema.org'. (3) Verify @type is a valid schema.org type. (4) For the detected type, check required properties are present (e.g., Article requires headline, author, datePublished; Product requires name; FAQPage requires mainEntity). (5) Run through Google's Rich Results Test API if available.

Fix

  1. Parse the JSON-LD with JSON.parse() — fix any syntax errors (trailing commas, single quotes, missing brackets).
  2. Ensure @context is exactly "https://schema.org" (not "http://schema.org" or omitted).
  3. Verify the @type value against schema.org types.
  4. Add required properties for the type:
    • Article: headline, author (with @type Person and name), datePublished
    • Product: name (and ideally offers, description)
    • FAQPage: mainEntity array with Question and acceptedAnswer
    • BreadcrumbList: itemListElement array with ListItem, position, name, item
  5. Validate at https://search.google.com/test/rich-results
  6. Validate JSON syntax at https://jsonlint.com

Explain

Google uses JSON-LD structured data to generate rich results — enhanced search result formats that include stars, images, expandable Q&As, and other features. Invalid JSON-LD is ignored entirely: no rich results are generated, and no error is reported to you. Only by testing with the Rich Results Test can you discover validation failures. Correct, complete JSON-LD is a prerequisite for rich result eligibility.

Code Review

Extract all <script type='application/ld+json'> element contents. Run JSON.parse() on each — catch and report parse errors. Validate that @context equals 'https://schema.org'. Check @type against a whitelist of common valid types. For each type, validate required properties are present and non-empty. Report the first validation error found for each block.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/seo/json-ld-valid

よくある質問

無効な構造化データについて、Googleはエラーを表示しますか?

このスキルによると、無効なJSON-LDは静かに無視されるため、唯一の兆候はリッチリザルトが表示されないことです。

よくある構文の問題は何ですか?

このスキルは、末尾のカンマ、シングルクォート、括弧の閉じ忘れを一般的な原因として挙げています。

マークアップはどのようにテストできますか?

このスキルは、変更を公開する前にGoogleのRich Results Testを使うことを勧めています。

詳細

作者による元の説明

Use when generating or auditing any `<script type='application/ld+json'>` blocks, implementing structured data for articles, products, FAQs, breadcrumbs, or local businesses, or investigating why rich results are not appearing in Google Search Console.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#2906
ライセンス
MIT
更新日
2026/10/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル