Langsung ke konten
Skillpedia
SEO75k Β· #2906

json-ld-valid

Fungsinya

Skill ini memeriksa blok data terstruktur pada halaman untuk kesalahan sintaks dan kolom wajib yang hilang. Skill ini ditujukan untuk pemilik situs dan pengembang yang ingin hasil pencarian kaya.

Kapan dipakai

  • βœ“Saat hasil kaya Anda tidak muncul di Google Search Console.
  • βœ“Saat Anda menambahkan markup artikel, produk, FAQ, atau breadcrumb ke halaman.
  • βœ“Saat Anda membuat data terstruktur dengan kode atau template.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/json-ld-valid/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBisakah Anda memeriksa data terstruktur saya dan memberi tahu mengapa hasil kaya belum muncul?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent mengurai setiap blok JSON-LD, memeriksa context dan type, lalu memverifikasi properti wajib untuk tipe tersebut. Agent menyarankan perbaikan untuk kesalahan sintaks dan kolom yang hilang, serta merekomendasikan Rich Results Test dari Google.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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

Pertanyaan umum

Apakah Google menampilkan galat untuk data terstruktur yang tidak valid?

Skill ini menyebut JSON-LD yang tidak valid diabaikan tanpa pesan, sehingga satu-satunya tanda adalah hasil kaya yang tidak muncul.

Apa contoh masalah sintaks yang umum?

Skill ini menyebut koma berlebih, tanda kutip tunggal, dan kurung yang hilang sebagai penyebab umum.

Bagaimana markup bisa diuji?

Skill ini merekomendasikan Rich Results Test dari Google sebelum perubahan dipublikasikan.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
75k
Peringkat
#2906
Lisensi
MIT
Diperbarui
31/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa