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.mdSalin 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
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
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
- Parse the JSON-LD with
JSON.parse()β fix any syntax errors (trailing commas, single quotes, missing brackets). - Ensure
@contextis exactly"https://schema.org"(not"http://schema.org"or omitted). - Verify the
@typevalue against schema.org types. - 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
- Validate at https://search.google.com/test/rich-results
- 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.
Popularitas
- Bintang GitHub
- 75k
- Peringkat
- #2906
- Lisensi
- MIT
- Diperbarui
- 31/10/2026
Komentar
- β¦
Skill lain dari repositori ini
frontendchecklist
75kMemeriksa kode frontend dan halaman langsung terhadap lebih dari 380 aturan untuk aksesibilitas, kecepatan, SEO, dan keamanan, dengan alat baris perintah.
frontend-checklist-global
75kMengaudit proyek frontend terhadap seluruh 386 aturan Front-End Checklist, dan memberikan perbaikan spesifik untuk setiap masalah yang ditemukan.
404-page
75kMemeriksa bahwa halaman tidak ditemukan Anda menawarkan tautan yang membantu dan mengembalikan status 404 yang sebenarnya, untuk membantu pengunjung yang tersesat.
about-page
75kMeninjau apakah situs Anda memiliki halaman Tentang yang jelas yang menjelaskan siapa yang mengelolanya, untuk membangun kepercayaan pengunjung dan mesin pencari.
Skill serupa
competitive-platform-analysis
280kMembantu memahami kompetitor Anda. Skill ini mengidentifikasi, mengelompokkan, dan menyaring perusahaan pesaing sebelum analisis yang lebih dalam.
competitive-report-structure
280kMembuat laporan kompetitor yang komprehensif. Menggabungkan informasi untuk menunjukkan gambaran pasar, memberi rekomendasi, dan membantu menyelaraskan tim.
lead-intelligence
280kMembantu agent Anda mencari dan menghubungi orang-orang penting. Menganalisis lead, menyarankan pendekatan, dan mengelola outreach lewat email dan media sosial.